[sheepdog] [PATCH 1/2] tests: add test to check partial read and write
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Thu Sep 20 21:33:52 CEST 2012
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
tests/045 | 35 +++++++++++++++++++++++++++++++++++
tests/045.out | 11 +++++++++++
tests/group | 1 +
3 files changed, 47 insertions(+), 0 deletions(-)
create mode 100755 tests/045
create mode 100644 tests/045.out
diff --git a/tests/045 b/tests/045
new file mode 100755
index 0000000..796cb84
--- /dev/null
+++ b/tests/045
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+# Test partial vdi read and 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 0 1 2; do
+ _start_sheep $i
+done
+
+_wait_for_sheep 3
+
+$COLLIE cluster format -c 2
+$COLLIE vdi create test 4M
+
+for i in `seq 0 7`; do
+ echo $i | $COLLIE vdi write test $(($i * 1536 + 512)) 512
+done
+
+for i in `seq 0 7`; do
+ $COLLIE vdi read test $(($i * 1536 + 512)) 512 | md5sum
+done
+
+$COLLIE vdi read test | md5sum
diff --git a/tests/045.out b/tests/045.out
new file mode 100644
index 0000000..e342606
--- /dev/null
+++ b/tests/045.out
@@ -0,0 +1,11 @@
+QA output created by 045
+using backend farm store
+e0b27e7466a3c21d0a4dedfed8bb9184 -
+f35835c0a25be5ee75a536d1816c1db4 -
+0faf5f38c28a38a6db1e6dfcdf259141 -
+83bffbfb00dbcb7d6b4a2fa9274175b9 -
+a8775e30ddc5eda14d76e5361a514392 -
+8124234db4755d4772c3440f2cbd1ecb -
+62630992718e77c73873ce1672d80786 -
+19b9d4d75a5a71bfad364628880fa913 -
+2471b1f99fe89885e2267c5d4f94723b -
diff --git a/tests/group b/tests/group
index 0db3c6c..356c791 100644
--- a/tests/group
+++ b/tests/group
@@ -56,3 +56,4 @@
042 auto quick store
043 auto quick store
044 auto quick vdi
+045 auto quick store
--
1.7.2.5
More information about the sheepdog
mailing list