[sheepdog-users] [PATCH stable-0.7 1/3] tests/functional: add a new test for vdi check with the condition nr_zones < inode->nr_copies
Hitoshi Mitake
mitake.hitoshi at lab.ntt.co.jp
Mon Jan 27 09:51:10 CET 2014
The newly added test checks that "dog vdi check" can check and recover
lost inode objects well under the condition of nr_zones <
inode->nr_copies. Previous "dog vdi check" rises panic in such a case.
Reviewed-by: Marcin Mirosław <marcin at mejor.pl>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
Conflicts:
tests/functional/group
Conflicts were resolved by Hitoshi Mitake. In addition, the output of
the test is modified for adopting difference of vnode numbers (128 ->
64).
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
tests/functional/083 | 29 +++++++++++++++++++++++++++++
tests/functional/083.out | 11 +++++++++++
tests/functional/group | 1 +
3 files changed, 41 insertions(+)
create mode 100755 tests/functional/083
create mode 100644 tests/functional/083.out
diff --git a/tests/functional/083 b/tests/functional/083
new file mode 100755
index 0000000..c9ca224
--- /dev/null
+++ b/tests/functional/083
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# Test vdi repair functionality with the condition nr_zones < inode->nr_copies
+
+. ./common
+
+for i in `seq 0 1`; do
+ _start_sheep $i "-z 0"
+done
+
+_start_sheep 2 "-z 1"
+
+_wait_for_sheep 3
+
+$DOG node list
+
+# 3 copies, 2 zones
+_cluster_format
+
+$DOG vdi create test 12M
+_vdi_list
+
+echo "original data" | $DOG vdi write test
+
+rm $STORE/1/obj/007c2b2500000000
+
+$DOG vdi check test
+
+$DOG vdi read test 0 14
diff --git a/tests/functional/083.out b/tests/functional/083.out
new file mode 100644
index 0000000..126cf92
--- /dev/null
+++ b/tests/functional/083.out
@@ -0,0 +1,11 @@
+QA output created by 083
+ Id Host:Port V-Nodes Zone
+ 0 127.0.0.1:7000 64 0
+ 1 127.0.0.1:7001 64 0
+ 2 127.0.0.1:7002 64 1
+using backend plain store
+ Name Id Size Used Shared Creation time VDI id Copies Tag
+ test 0 12 MB 0.0 MB 0.0 MB DATE 7c2b25 3
+fixed missing 7c2b2500000000
+finish check&repair test
+original data
diff --git a/tests/functional/group b/tests/functional/group
index 96a31ce..135fce0 100644
--- a/tests/functional/group
+++ b/tests/functional/group
@@ -89,3 +89,4 @@
072 auto quick store
073 auto quick sheepfs
077 auto quick vdi
+083 auto quick vdi
--
1.7.10.4
More information about the sheepdog-users
mailing list