[CRIU] [PATCH 2/2] zdtm: wait a test process instead of output file

Andrey Vagin avagin at openvz.org
Thu Jul 4 04:21:11 EDT 2013


A test should be completed if a test process exited.

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 test/zdtm.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/test/zdtm.sh b/test/zdtm.sh
index f28d33a..530379a 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -425,10 +425,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 || break
 		echo Waiting...
 		sleep 0.$sltime
 		[ $sltime -lt 9 ] && sltime=$((sltime+1))
-- 
1.8.3.1



More information about the CRIU mailing list