[sheepdog] [PATCH 4/4] tests: add a tests/063 to test unaligned read/write/create

Liu Yuan namei.unix at gmail.com
Wed May 22 10:36:07 CEST 2013


Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
 tests/062     |   36 ++++++++++++++++++++++++++++++++++++
 tests/062.out |    5 +++++
 tests/group   |    1 +
 3 files changed, 42 insertions(+)
 create mode 100755 tests/062
 create mode 100644 tests/062.out

diff --git a/tests/062 b/tests/062
new file mode 100755
index 0000000..22d242a
--- /dev/null
+++ b/tests/062
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+# Test unaligned collie vdi read/write
+
+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 2`; do
+    _start_sheep $i
+done
+
+_wait_for_sheep 3
+
+$COLLIE cluster format
+sleep 1
+
+$COLLIE vdi create test 1234
+sleep 1
+
+echo hello | $COLLIE vdi write test 1 6
+$COLLIE vdi read test 1 6
+echo world | $COLLIE vdi write test 1 6
+$COLLIE vdi read test 1 6
+
+echo ! | $COLLIE vdi write test 511 512
+$COLLIE vdi read test 511 2
diff --git a/tests/062.out b/tests/062.out
new file mode 100644
index 0000000..847401e
--- /dev/null
+++ b/tests/062.out
@@ -0,0 +1,5 @@
+QA output created by 062
+using backend plain store
+hello
+world
+!
diff --git a/tests/group b/tests/group
index 875f900..46364a6 100644
--- a/tests/group
+++ b/tests/group
@@ -75,3 +75,4 @@
 059 auto quick vdi md
 060 auto quick cluster md
 061 auto quick cluster md
+062 auto quick cluster md
-- 
1.7.9.5



More information about the sheepdog mailing list