mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-08-04 15:53:44 +00:00
test/zdtm.sh: kill the test case process if crtools failed
Do not leave it running Signed-off-by: Kir Kolyshkin <kir@openvz.org> Signed-off-by: Andrey Vagin <avagin@gmail.com>
This commit is contained in:
parent
6f5cf13f29
commit
f9408a054e
1 changed files with 4 additions and 1 deletions
|
|
@ -51,6 +51,7 @@ run_test()
|
|||
local args=$*
|
||||
local tname=`basename $test`
|
||||
local tdir=`dirname $test`
|
||||
local ret
|
||||
|
||||
killall -9 $tname
|
||||
make -C $tdir cleanout $tname.pid
|
||||
|
|
@ -62,12 +63,14 @@ run_test()
|
|||
|
||||
echo Dump $pid
|
||||
mkdir -p $ddump
|
||||
setsid $CRTOOLS dump -D $ddump -o dump.log -t $pid $args || return 1
|
||||
setsid $CRTOOLS dump -D $ddump -o dump.log -t $pid $args
|
||||
ret=$?
|
||||
while :; do
|
||||
killall -9 $tname &> /dev/null || break
|
||||
echo Waiting...
|
||||
sleep 1
|
||||
done
|
||||
[ "$ret" -eq 0 ] || return 1
|
||||
|
||||
echo Restore $pid
|
||||
setsid $CRTOOLS restore -D $ddump -o restore.log -d -t $pid $args || return 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue