[Devel] [PATCH 09/11] cr_tests: Checkpoint/restart the logs produced by futex/run.sh

Matt Helsley matthltc at us.ibm.com
Wed Aug 19 21:58:12 PDT 2009


Checkpoint/restart the logs produced by futex/run.sh, keeping copies of
the originals for later comparison between resumed and restarted runs.

Signed-off-by: Matt Helsley <matthltc at us.ibm.com>
Cc: containers at lists.linux-foundation.org
---
 futex/run.sh |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/futex/run.sh b/futex/run.sh
index 0e0b2eb..ae80111 100755
--- a/futex/run.sh
+++ b/futex/run.sh
@@ -67,6 +67,8 @@ while [ $CURTEST -lt $NUMTESTS ]; do
 	done
 	freeze
 	trap 'thaw; do_err; break' ERR EXIT
+	sync
+	cp log.${T} log.${T}.pre-ckpt
 	err_msg="FAIL"
 	ckpt ${TEST_PID} > checkpoint-${T}
 	err_msg="BROK"
@@ -86,6 +88,8 @@ while [ $CURTEST -lt $NUMTESTS ]; do
 	echo PASS
 
 	# now try restarting
+	mv log.${T} log.${T}.post-ckpt
+	cp log.${T}.pre-ckpt log.${T}
 	err_msg="FAIL"
 	# We need to pass -p to mktree since futexes often store the
 	# pid of the task that owns the futex in the futex, even in
@@ -94,6 +98,9 @@ while [ $CURTEST -lt $NUMTESTS ]; do
 	${MKTREE} -p --copy-status < checkpoint-${T}
 	retval=$?
 	err_msg="BROK"
+	mv log.${T} log.${T}.post-rstr
+	# Now we can do something _like_:
+	#         diff log.${T}.post-ckpt log.${T}.post-rstr
 	echo "Restart of test ${T} done, returned $retval"
 	err_msg="FAIL"
 	[ $retval -eq 0 ];
-- 
1.5.6.3


_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list