[sheepdog] [PATCH 2/2] test: test vdi create operation during node changes
Liu Yuan
namei.unix at gmail.com
Fri Aug 17 07:56:44 CEST 2012
From: Liu Yuan <tailai.ly at taobao.com>
Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
tests/021 | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
tests/021.out | 3 +++
tests/group | 1 +
3 files changed, 57 insertions(+)
create mode 100755 tests/021
create mode 100644 tests/021.out
diff --git a/tests/021 b/tests/021
new file mode 100755
index 0000000..2392eda
--- /dev/null
+++ b/tests/021
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+# Test vdi create operation during node changes
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1 # failure is the default!
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+
+_cleanup
+
+for i in `seq 0 7`; do
+ $SHEEP $STORE/$i -d -z $i -p 700$i -c $DRIVER
+done
+
+_wait_for_sheep "8"
+
+$COLLIE cluster format
+
+# create new vdis
+(
+for i in `seq 0 40`;do
+ $COLLIE vdi create test$i 4M
+done
+) &
+
+# kill nodes and join them back
+sleep 1
+for i in `seq 1 5`; do pkill -f "sheep $STORE/$i";done
+sleep 10
+for i in `seq 1 5`; do
+ $SHEEP $STORE/$i -d -w 20 -z $i -p 700$i -c $DRIVER
+done
+
+_wait_for_collie
+
+# wait vdi create to completion
+while true; do
+ nr1=`$COLLIE vdi list | wc -l`
+ sleep 1
+ nr2=`$COLLIE vdi list | wc -l`
+ if [ $nr1 -eq $nr2 ]; then
+ break;
+ fi
+done
+
+echo $nr1
diff --git a/tests/021.out b/tests/021.out
new file mode 100644
index 0000000..08c1e20
--- /dev/null
+++ b/tests/021.out
@@ -0,0 +1,3 @@
+QA output created by 021
+using backend farm store
+42
diff --git a/tests/group b/tests/group
index e1e9da6..d07ec22 100644
--- a/tests/group
+++ b/tests/group
@@ -32,3 +32,4 @@
018 auto quick cache
019 auto quick cache
020 auto quick cache
+021 auto quick vdi
--
1.7.10.2
More information about the sheepdog
mailing list