[sheepdog] [PATCH 2/3] tests: add test of recovery when we have less zones availability

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Sat Aug 25 19:21:40 CEST 2012


Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 tests/032     |   55 ++++++++++++++++++++++++++++++++++++++
 tests/032.out |   82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/group   |    1 +
 3 files changed, 138 insertions(+), 0 deletions(-)
 create mode 100755 tests/032
 create mode 100644 tests/032.out

diff --git a/tests/032 b/tests/032
new file mode 100755
index 0000000..4f069f9
--- /dev/null
+++ b/tests/032
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+# Test recovery when we have less zones availability
+
+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
+    _start_sheep $i
+done
+
+_wait_for_sheep 8
+
+$COLLIE cluster format
+
+$COLLIE vdi create test 100MB
+# create 25 objects
+for i in `seq 0 24`; do
+    echo $i | $COLLIE vdi write test $((i * 4 * 1024 * 1024)) 512
+done
+
+$COLLIE vdi read test | md5sum
+
+for i in `seq 7 -1 0`; do
+    _wait_for_sheep_recovery 0
+    _kill_sheep $i
+done
+
+sleep 1
+
+# start master fast to avoid master transfer
+_start_sheep 0
+_wait_for_sheep 1
+for i in `seq 0 7`; do
+    _start_sheep $i
+done
+
+_wait_for_sheep_recovery 0
+
+ls $STORE/*/obj/807c2b2500000000 | sort
+for i in `seq 0 24`; do
+    ls $STORE/*/obj/007c2b25000000`printf "%02x" $i` | sort
+done
+
+$COLLIE vdi read test | md5sum
diff --git a/tests/032.out b/tests/032.out
new file mode 100644
index 0000000..9208b20
--- /dev/null
+++ b/tests/032.out
@@ -0,0 +1,82 @@
+QA output created by 032
+using backend farm store
+9c7766570b3be3aff2724f587c2f4107  -
+/tmp/sheepdog/0/obj/807c2b2500000000
+/tmp/sheepdog/1/obj/807c2b2500000000
+/tmp/sheepdog/2/obj/807c2b2500000000
+/tmp/sheepdog/0/obj/007c2b2500000000
+/tmp/sheepdog/1/obj/007c2b2500000000
+/tmp/sheepdog/2/obj/007c2b2500000000
+/tmp/sheepdog/0/obj/007c2b2500000001
+/tmp/sheepdog/1/obj/007c2b2500000001
+/tmp/sheepdog/4/obj/007c2b2500000001
+/tmp/sheepdog/0/obj/007c2b2500000002
+/tmp/sheepdog/1/obj/007c2b2500000002
+/tmp/sheepdog/4/obj/007c2b2500000002
+/tmp/sheepdog/2/obj/007c2b2500000003
+/tmp/sheepdog/6/obj/007c2b2500000003
+/tmp/sheepdog/7/obj/007c2b2500000003
+/tmp/sheepdog/0/obj/007c2b2500000004
+/tmp/sheepdog/3/obj/007c2b2500000004
+/tmp/sheepdog/4/obj/007c2b2500000004
+/tmp/sheepdog/0/obj/007c2b2500000005
+/tmp/sheepdog/3/obj/007c2b2500000005
+/tmp/sheepdog/5/obj/007c2b2500000005
+/tmp/sheepdog/4/obj/007c2b2500000006
+/tmp/sheepdog/5/obj/007c2b2500000006
+/tmp/sheepdog/7/obj/007c2b2500000006
+/tmp/sheepdog/3/obj/007c2b2500000007
+/tmp/sheepdog/5/obj/007c2b2500000007
+/tmp/sheepdog/7/obj/007c2b2500000007
+/tmp/sheepdog/1/obj/007c2b2500000008
+/tmp/sheepdog/3/obj/007c2b2500000008
+/tmp/sheepdog/6/obj/007c2b2500000008
+/tmp/sheepdog/3/obj/007c2b2500000009
+/tmp/sheepdog/5/obj/007c2b2500000009
+/tmp/sheepdog/7/obj/007c2b2500000009
+/tmp/sheepdog/0/obj/007c2b250000000a
+/tmp/sheepdog/2/obj/007c2b250000000a
+/tmp/sheepdog/5/obj/007c2b250000000a
+/tmp/sheepdog/1/obj/007c2b250000000b
+/tmp/sheepdog/4/obj/007c2b250000000b
+/tmp/sheepdog/5/obj/007c2b250000000b
+/tmp/sheepdog/3/obj/007c2b250000000c
+/tmp/sheepdog/4/obj/007c2b250000000c
+/tmp/sheepdog/5/obj/007c2b250000000c
+/tmp/sheepdog/0/obj/007c2b250000000d
+/tmp/sheepdog/2/obj/007c2b250000000d
+/tmp/sheepdog/3/obj/007c2b250000000d
+/tmp/sheepdog/1/obj/007c2b250000000e
+/tmp/sheepdog/3/obj/007c2b250000000e
+/tmp/sheepdog/7/obj/007c2b250000000e
+/tmp/sheepdog/2/obj/007c2b250000000f
+/tmp/sheepdog/4/obj/007c2b250000000f
+/tmp/sheepdog/5/obj/007c2b250000000f
+/tmp/sheepdog/0/obj/007c2b2500000010
+/tmp/sheepdog/1/obj/007c2b2500000010
+/tmp/sheepdog/4/obj/007c2b2500000010
+/tmp/sheepdog/3/obj/007c2b2500000011
+/tmp/sheepdog/5/obj/007c2b2500000011
+/tmp/sheepdog/7/obj/007c2b2500000011
+/tmp/sheepdog/2/obj/007c2b2500000012
+/tmp/sheepdog/4/obj/007c2b2500000012
+/tmp/sheepdog/6/obj/007c2b2500000012
+/tmp/sheepdog/0/obj/007c2b2500000013
+/tmp/sheepdog/5/obj/007c2b2500000013
+/tmp/sheepdog/6/obj/007c2b2500000013
+/tmp/sheepdog/0/obj/007c2b2500000014
+/tmp/sheepdog/5/obj/007c2b2500000014
+/tmp/sheepdog/6/obj/007c2b2500000014
+/tmp/sheepdog/0/obj/007c2b2500000015
+/tmp/sheepdog/2/obj/007c2b2500000015
+/tmp/sheepdog/3/obj/007c2b2500000015
+/tmp/sheepdog/1/obj/007c2b2500000016
+/tmp/sheepdog/5/obj/007c2b2500000016
+/tmp/sheepdog/6/obj/007c2b2500000016
+/tmp/sheepdog/2/obj/007c2b2500000017
+/tmp/sheepdog/5/obj/007c2b2500000017
+/tmp/sheepdog/6/obj/007c2b2500000017
+/tmp/sheepdog/0/obj/007c2b2500000018
+/tmp/sheepdog/1/obj/007c2b2500000018
+/tmp/sheepdog/5/obj/007c2b2500000018
+9c7766570b3be3aff2724f587c2f4107  -
diff --git a/tests/group b/tests/group
index 0de7942..6e988bf 100644
--- a/tests/group
+++ b/tests/group
@@ -43,3 +43,4 @@
 029 auto quick vdi
 030 auto quick store
 031 auto quick vdi
+032 auto quick store
-- 
1.7.2.5




More information about the sheepdog mailing list