Commit a66a06c7 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

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: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 535115ee
...@@ -426,10 +426,14 @@ EOF ...@@ -426,10 +426,14 @@ EOF
done done
echo Check results $PID echo Check results $PID
stop_test $tdir $tname stop_test $tdir $tname || {
echo "Unable to stop $tname ($PID)"
return 2
}
sltime=1 sltime=1
for i in `seq 50`; do for i in `seq 50`; do
test -f $test.out && break kill -0 $PID > /dev/null 2>&1 || break;
echo Waiting... echo Waiting...
sleep 0.$sltime sleep 0.$sltime
[ $sltime -lt 9 ] && sltime=$((sltime+1)) [ $sltime -lt 9 ] && sltime=$((sltime+1))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment