[sheepdog] [PATCH 4/4] tests/functional: a new test for erasure coding recovery
Hitoshi Mitake
mitake.hitoshi at lab.ntt.co.jp
Mon Oct 20 09:07:14 CEST 2014
This new test case checks recovery process for a case of nr nodes < nr
data stripes.
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
tests/functional/098 | 46 ++++++++++++++++++++++++++++++++++++++++++++++
tests/functional/098.out | 36 ++++++++++++++++++++++++++++++++++++
tests/functional/group | 1 +
3 files changed, 83 insertions(+)
create mode 100755 tests/functional/098
create mode 100644 tests/functional/098.out
diff --git a/tests/functional/098 b/tests/functional/098
new file mode 100755
index 0000000..c0956c2
--- /dev/null
+++ b/tests/functional/098
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+# Test recovery process of erasure coding in a case of nr nodes < nr data stripe
+
+. ./common
+
+for i in 0 1 2; do
+ _start_sheep $i
+done
+_wait_for_sheep 3
+_cluster_format -c 2:1
+
+$DOG vdi create test 64M
+
+_random | $DOG vdi write test 0 $((4 * 1024 * 1024 * 64))
+
+$DOG node list
+
+BEFORE=`$DOG vdi read test | md5sum`
+
+_kill_sheep 1
+_wait_for_sheep_stop 1
+$DOG cluster info | _filter_cluster_info
+
+_kill_sheep 2
+_wait_for_sheep_stop 2
+$DOG cluster info | _filter_cluster_info
+
+for i in 1 2; do
+ _start_sheep $i
+done
+_wait_for_sheep 3
+$DOG cluster info | _filter_cluster_info
+
+$DOG node list
+
+AFTER=`$DOG vdi read test | md5sum`
+
+if [[ $BEFORE = $AFTER ]]
+then
+ echo "checksum matched, success"
+else
+ echo "checksum not matched, fail"
+ echo "before: " $BEFORE
+ echo "after: " $AFTER
+fi
diff --git a/tests/functional/098.out b/tests/functional/098.out
new file mode 100644
index 0000000..ff9b461
--- /dev/null
+++ b/tests/functional/098.out
@@ -0,0 +1,36 @@
+QA output created by 098
+using backend plain store
+ Id Host:Port V-Nodes Zone
+ 0 127.0.0.1:7000 128 0
+ 1 127.0.0.1:7001 128 1
+ 2 127.0.0.1:7002 128 2
+Cluster status: running, auto-recovery enabled
+
+Cluster created at DATE
+
+Epoch Time Version
+DATE 2 [127.0.0.1:7000, 127.0.0.1:7002]
+DATE 1 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
+Cluster status: running, auto-recovery enabled
+
+Cluster created at DATE
+
+Epoch Time Version
+DATE 3 [127.0.0.1:7000]
+DATE 2 [127.0.0.1:7000, 127.0.0.1:7002]
+DATE 1 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
+Cluster status: running, auto-recovery enabled
+
+Cluster created at DATE
+
+Epoch Time Version
+DATE 5 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
+DATE 4 [127.0.0.1:7000, 127.0.0.1:7001]
+DATE 3 [127.0.0.1:7000]
+DATE 2 [127.0.0.1:7000, 127.0.0.1:7002]
+DATE 1 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
+ Id Host:Port V-Nodes Zone
+ 0 127.0.0.1:7000 128 0
+ 1 127.0.0.1:7001 128 1
+ 2 127.0.0.1:7002 128 2
+checksum matched, success
diff --git a/tests/functional/group b/tests/functional/group
index 3c49815..3e331c9 100644
--- a/tests/functional/group
+++ b/tests/functional/group
@@ -112,3 +112,4 @@
095 auto quick store md
096 auto quick cluster
097 vdi cluster
+098 auto quick vdi cluster
\ No newline at end of file
--
1.8.3.2
More information about the sheepdog
mailing list