mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 21:38:16 +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:
parent
535115eecd
commit
a66a06c7f0
@ -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))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user