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

---
 tests/024     |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 tests/024.out |   15 +++++++++++++++
 tests/group   |    1 +
 3 files changed, 62 insertions(+)
 create mode 100755 tests/024
 create mode 100644 tests/024.out

diff --git a/tests/024 b/tests/024
new file mode 100755
index 0000000..c8b7dd6
--- /dev/null
+++ b/tests/024
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+# Make sure data written to the cluster can be read from a newly joined node
+
+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="300M"
+
+echo "starting first sheep"
+for i in `seq 0 0`; do
+    $SHEEP $STORE/$i -d -z $i -p 700$i -c $DRIVER
+done
+_wait_for_sheep "1"
+
+echo "formatting cluster"
+$COLLIE cluster format -c 1
+
+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}"
+qemu-io -c "read 0 1m" sheepdog:${VDI_NAME} | _filter_qemu_io
+
+echo "starting second sheep"
+for i in `seq 1 1`; do
+    $SHEEP $STORE/$i -d -z $i -p 700$i -c $DRIVER
+done
+_wait_for_sheep "2"
+
+echo "reading data from second sheep"
+qemu-io -c "read 0 ${VDI_SIZE}" sheepdog:localhost:7001:${VDI_NAME} | 
_filter_qemu_io
diff --git a/tests/024.out b/tests/024.out
new file mode 100644
index 0000000..9f2b6d9
--- /dev/null
+++ b/tests/024.out
@@ -0,0 +1,15 @@
+QA output created by 024
+starting first sheep
+formatting cluster
+using backend farm store
+creating vdi 
+filling test with data
+wrote 314572800/314572800 bytes at offset 0
+300 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+reading back test
+read 1048576/1048576 bytes at offset 0
+1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+starting second sheep
+reading data from second sheep
+read 314572800/314572800 bytes at offset 0
+300 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
diff --git a/tests/group b/tests/group
index 79cf01d..7e90480 100644
--- a/tests/group
+++ b/tests/group
@@ -35,3 +35,4 @@
 021 auto quick cluster
 022 auto quick cluster
 023 auto quick cluster
+024 auto quick cluster
-- 
1.7.10.4


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

Reply via email to