2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-29 13:28:27 +00:00

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 <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrey Vagin 2013-07-11 15:31:22 +04:00 committed by Pavel Emelyanov
parent 535115eecd
commit a66a06c7f0

View File

@ -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))