From a66a06c7f073765c8de478100a99e44487a955e3 Mon Sep 17 00:00:00 2001 From: Andrey Vagin Date: Thu, 11 Jul 2013 15:31:22 +0400 Subject: [PATCH] zdtm: wait a test process instead of output file zdtm.sh reports error immediatly, if a test process exited or crashed. We should be fear, that pid can be reused. There are many place, which will fail in this case. And a chance to get this situation is really small. Signed-off-by: Andrey Vagin Signed-off-by: Pavel Emelyanov --- test/zdtm.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/zdtm.sh b/test/zdtm.sh index c11c2ccf3..9c65c141c 100755 --- a/test/zdtm.sh +++ b/test/zdtm.sh @@ -426,10 +426,14 @@ EOF done echo Check results $PID - stop_test $tdir $tname + stop_test $tdir $tname || { + echo "Unable to stop $tname ($PID)" + return 2 + } + sltime=1 for i in `seq 50`; do - test -f $test.out && break + kill -0 $PID > /dev/null 2>&1 || break; echo Waiting... sleep 0.$sltime [ $sltime -lt 9 ] && sltime=$((sltime+1))