[sheepdog] [PATCH] tests: ensure that sheep processes exit after calling pkill

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Fri Aug 31 12:05:55 CEST 2012


After send a signal, there is a delay until sheep exits.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
Hi Yuan,

I think this will fix the problem of test 038.


 tests/common.rc |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tests/common.rc b/tests/common.rc
index c9aaae7..0e086b1 100644
--- a/tests/common.rc
+++ b/tests/common.rc
@@ -191,6 +191,10 @@ _kill_sheep()
     if [ $? != 0 ]; then
         _die "cannot kill sheep $1"
     fi
+
+    while [ $? == 0 ]; do
+	pgrep -f "$SHEEP $STORE/$1" > /dev/null
+    done
 }
 
 _wait_for_sheep_recovery()
-- 
1.7.2.5




More information about the sheepdog mailing list