[sheepdog] [PATCH] test: remove xxx.full file in 011 014
Liu Yuan
namei.unix at gmail.com
Sun Aug 26 04:25:39 CEST 2012
From: Liu Yuan <tailai.ly at taobao.com>
- also fix a bug in _wait_for_sheep
Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
tests/011 | 1 +
tests/014 | 4 ++--
tests/014.out | 1 +
tests/common.rc | 4 +++-
4 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/tests/011 b/tests/011
index b214c3c..975c283 100755
--- a/tests/011
+++ b/tests/011
@@ -23,6 +23,7 @@ _cleanup_devices()
umount $STORE/$i
rm -f $STORE/$i.img
done
+ rm $seq.full
}
_cleanup
diff --git a/tests/014 b/tests/014
index 442fc7e..9f8b625 100755
--- a/tests/014
+++ b/tests/014
@@ -19,9 +19,9 @@ for i in 0 2; do
_start_sheep $i
done
-sleep 1
+_wait_for_sheep 2
-$COLLIE cluster format -c 2 >> $0.full
+$COLLIE cluster format -c 2
$COLLIE vdi create test 4G
echo -n value > $STORE/tmp.dat
diff --git a/tests/014.out b/tests/014.out
index 0ea417e..a54c035 100644
--- a/tests/014.out
+++ b/tests/014.out
@@ -1,4 +1,5 @@
QA output created by 014
+using backend farm store
key shouldn't be found
Attribute 'key' not found
key shouldn't be found
diff --git a/tests/common.rc b/tests/common.rc
index 94192a4..a35c1e1 100644
--- a/tests/common.rc
+++ b/tests/common.rc
@@ -154,7 +154,9 @@ _wait_for_sheep()
_die "failed to get node list"
fi
- if [ $(echo "$node_list" | wc -l) -eq $(($1+1)) ]; then
+ nr_sheep="$(echo "$node_list" | wc -l)"
+
+ if [ ${nr_sheep} -eq $(($1+1)) ]; then
break
fi
if [ ${nr_sheep} -gt $(($1+1)) ]; then
--
1.7.1
More information about the sheepdog
mailing list