Signed-off-by: Christoph Hellwig <[email protected]>

---
 tests/025     |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/025.out |   42 ++++++++++++++++++++++++++++++++++++++++++
 tests/group   |    1 +
 3 files changed, 98 insertions(+)
 create mode 100755 tests/025
 create mode 100644 tests/025.out

diff --git a/tests/025 b/tests/025
new file mode 100755
index 0000000..8941618
--- /dev/null
+++ b/tests/025
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+# Check for a recovery segfault in older versions
+
+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
+
+VDI_NAME="test"
+VDI_SIZE="20M"
+
+echo "starting two sheep in the first zone"
+for i in `seq 0 1`; do
+    $SHEEP $STORE/$i -d -z 0 -p 700$i -c $DRIVER
+done
+
+echo "starting a sheep in the second zone"
+for i in `seq 2 2`; do
+    $SHEEP $STORE/$i -d -z 1 -p 700$i -c $DRIVER
+done
+
+_wait_for_sheep "3"
+
+echo "formatting cluster"
+$COLLIE cluster format -c 2
+
+echo "creating vdi ${NAME}"
+$COLLIE vdi create ${VDI_NAME} ${VDI_SIZE}
+
+echo "filling ${VDI_NAME} with data"
+qemu-io -c "write 0 ${VDI_SIZE}" sheepdog:${VDI_NAME} | _filter_qemu_io
+
+echo "reading back ${VDI_NAME} from second zone"
+qemu-io -c "read 0 1m" sheepdog:localhost:7002:${VDI_NAME} | _filter_qemu_io
+
+echo "starting a sheep in the third zone"
+for i in `seq 3 3`; do
+    $SHEEP $STORE/$i -d -z 2 -p 700$i -c $DRIVER
+done
+
+sleep 10
+
+echo "check that all sheep are alive"
+for i in `seq 0 3`; do
+    $COLLIE cluster info -p 700$i | _filter_cluster_info
+done
diff --git a/tests/025.out b/tests/025.out
new file mode 100644
index 0000000..3921e72
--- /dev/null
+++ b/tests/025.out
@@ -0,0 +1,42 @@
+QA output created by 025
+starting two sheep in the first zone
+starting a sheep in the second zone
+formatting cluster
+using backend farm store
+creating vdi 
+filling test with data
+wrote 20971520/20971520 bytes at offset 0
+20 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+reading back test from second zone
+read 1048576/1048576 bytes at offset 0
+1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+starting a sheep in the third zone
+check that all sheep are alive
+Cluster status: running
+
+Cluster created at DATE
+
+Epoch Time           Version
+DATE      2 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002, 127.0.0.1:7003]
+DATE      1 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
+Cluster status: running
+
+Cluster created at DATE
+
+Epoch Time           Version
+DATE      2 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002, 127.0.0.1:7003]
+DATE      1 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
+Cluster status: running
+
+Cluster created at DATE
+
+Epoch Time           Version
+DATE      2 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002, 127.0.0.1:7003]
+DATE      1 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
+Cluster status: running
+
+Cluster created at DATE
+
+Epoch Time           Version
+DATE      2 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002, 127.0.0.1:7003]
+DATE      1 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
diff --git a/tests/group b/tests/group
index 7e90480..5ff66b4 100644
--- a/tests/group
+++ b/tests/group
@@ -36,3 +36,4 @@
 022 auto quick cluster
 023 auto quick cluster
 024 auto quick cluster
+025 auto quick cluster
-- 
1.7.10.4


-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to