[sheepdog] [PATCH] tests: ensure sheep starts up when using valgrind
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Wed Sep 5 11:37:46 CEST 2012
When using valgrind, there is a delay before sheep starts up. This
checks a lock file to ensure that sheep is running.
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
Yuan, does this fix the test 26 problem on your environment?
tests/common.rc | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tests/common.rc b/tests/common.rc
index d6590f9..166d392 100644
--- a/tests/common.rc
+++ b/tests/common.rc
@@ -180,6 +180,14 @@ _valgrind_sheep()
{
mkdir $1 > /dev/null 2>&1
sh -c "valgrind $SHEEP_PROG $@ -f -o > $1/sheep.log 2>&1 &"
+
+ # wait for sheep to start up
+ while true; do
+ ls $1/lock > /dev/null 2>&1
+ if [ $? == 0 ]; then
+ break
+ fi
+ done
}
_start_sheep()
--
1.7.9.5
More information about the sheepdog
mailing list