[sheepdog] [PATCH] tests: make _valgrind_collie return the collie exit status

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Thu Apr 4 11:26:58 CEST 2013


Without this, _wait_for_sheep and _wait_for_sheep_recovery don't work
as we expect.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 tests/common.rc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/common.rc b/tests/common.rc
index 753b352..cfa94fa 100644
--- a/tests/common.rc
+++ b/tests/common.rc
@@ -199,10 +199,12 @@ _valgrind_collie()
 {
     logfile=$(mktemp)
     valgrind --log-file=$logfile --error-exitcode=99 $COLLIE_PROG "$@"
-    if [ $? == 99 ]; then
+    ret=$?
+    if [ $ret == 99 ]; then
         cat $logfile 1>&2
     fi
     rm $logfile
+    return $ret
 }
 
 _start_sheep()
-- 
1.8.1.3.566.gaa39828




More information about the sheepdog mailing list