[PATCH 1/7] cr_tests: epoll: Always thaw on error/exit trap

Matt Helsley matthltc at us.ibm.com
Thu Nov 12 22:45:29 PST 2009


Always thaw when run.sh triggers a trap. This reduces the number of
places we change the trap handlers and makes the code a little easier
to read.

Signed-off-by: Matt Helsley <matthltc at us.ibm.com>
---
 epoll/run.sh |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/epoll/run.sh b/epoll/run.sh
index 75c26a0..32b3068 100755
--- a/epoll/run.sh
+++ b/epoll/run.sh
@@ -38,6 +38,7 @@ function do_err()
        fi
        echo "${err_msg}"
        ((failed++))
+       thaw || /bin/true
        wait
 }
 
@@ -68,14 +69,12 @@ while [ $CURTEST -lt $NUMTESTS ]; do
 		sleep 1
 	done
 	freeze
-	trap 'thaw; do_err; break' ERR EXIT
 	sync
 	cp log.${T} log.${T}${LABEL}.pre-ckpt
 	err_msg="FAIL"
 	${CHECKPOINT} ${TEST_PID} > checkpoint-${T}${LABEL}
 	err_msg="BROK"
 	thaw
-	trap 'do_err; break' ERR EXIT
 	touch "./checkpoint-done"
 	wait ${TEST_PID}
 	retval=$?
-- 
1.6.3.3




More information about the Containers mailing list