[sheepdog] [PATCH v5 4/5] tests: add a tests/063 to test unaligned read/write/create
Liu Yuan
namei.unix at gmail.com
Thu May 23 06:54:29 CEST 2013
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
tests/062 | 44 ++++++++++++++++++++++++++++++++++++++++++++
tests/062.out | 10 ++++++++++
tests/group | 1 +
3 files changed, 55 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..0292b1d
--- /dev/null
+++ b/tests/062
@@ -0,0 +1,44 @@
+#!/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
+$COLLIE vdi list -r test | awk '{$7="MASKED";print $0}'
+
+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 h*** | $COLLIE vdi write test 510 512
+echo h!!! | $COLLIE vdi write test 510 512
+$COLLIE vdi read test 510 5
+echo ?? | $COLLIE vdi write test 511 2
+$COLLIE vdi read test 510 5
+echo xxx | $COLLIE vdi write test 1020 4
+$COLLIE vdi read test 1020 4
+$COLLIE vdi read test 510 5
+$COLLIE vdi read test 1 6
diff --git a/tests/062.out b/tests/062.out
new file mode 100644
index 0000000..98a9738
--- /dev/null
+++ b/tests/062.out
@@ -0,0 +1,10 @@
+QA output created by 062
+using backend plain store
+= test 0 1234 0 0 MASKED 7c2b25 3
+hello
+world
+h!!!
+h??!
+xxx
+h??!
+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