[sheepdog] [PATCH v3 2/2] test: add test case for data path with slash
Robin Dong
robin.k.dong at gmail.com
Tue Jun 17 07:37:30 CEST 2014
From: Robin Dong <sanbai at taobao.com>
Signed-off-by: Robin Dong <sanbai at taobao.com>
---
v1-->v2:
1. remove wrong 'exit' code from test case
2. add 095.out
v2-->v3:
1. use _make_device() instead of doing dd and mount
tests/functional/095 | 39 +++++++++++++++++++++++++++++++++++++++
tests/functional/095.out | 2 ++
tests/functional/group | 1 +
3 files changed, 42 insertions(+)
create mode 100755 tests/functional/095
create mode 100644 tests/functional/095.out
diff --git a/tests/functional/095 b/tests/functional/095
new file mode 100755
index 0000000..7a479a0
--- /dev/null
+++ b/tests/functional/095
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# Test disk error handling with full path name
+
+. ./common
+
+# make different size of devices
+for i in `seq 0 2`; do
+ _make_device $i $((100 * 1024 ** 2))
+ _make_device $i/d0 $((100 * 1024 ** 2))
+ _make_device $i/d1 $((100 * 1024 ** 2))
+done
+
+for i in `seq 0 2`; do
+ $SHEEP $STORE/$i/,$STORE/$i/d0/,$STORE/$i/d1/ -z $i -p $((7000+$i)) -c $DRIVER $SHEEP_OPTIONS
+done
+
+_wait_for_sheep 3
+
+_cluster_format -c 2:1
+
+_vdi_create test 99M
+
+_random | $DOG vdi write test
+
+$DOG vdi read test | md5sum > $STORE/csum.1
+
+# remove obj directory to occut EIO
+umount $STORE/0/d0
+rm -rf $STORE/0/d0
+
+$DOG vdi read test | md5sum > $STORE/csum.2
+
+diff -u $STORE/csum.1 $STORE/csum.2
+
+for i in `seq 0 2`; do
+ umount $STORE/$i/d0 &> /dev/null
+ umount $STORE/$i/d1 &> /dev/null
+done
diff --git a/tests/functional/095.out b/tests/functional/095.out
new file mode 100644
index 0000000..0ceeda3
--- /dev/null
+++ b/tests/functional/095.out
@@ -0,0 +1,2 @@
+QA output created by 095
+using backend plain store
diff --git a/tests/functional/group b/tests/functional/group
index 340a1cc..2094eab 100644
--- a/tests/functional/group
+++ b/tests/functional/group
@@ -109,3 +109,4 @@
092 auto quick vdi
093 auto quick vdi
094 auto quick store md
+095 auto quick store md
--
1.7.12.4
More information about the sheepdog
mailing list