[sheepdog] [PATCH 2/4] 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
Fri Jan 10 07:20:43 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>
---
tests/functional/083 | 40 ++++++++++++++++++++++++++++++++++++++++
tests/functional/083.out | 11 +++++++++++
tests/functional/group | 1 +
3 files changed, 52 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..c9280bc
--- /dev/null
+++ b/tests/functional/083
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+# Test vdi repair functionality with the condition nr_zones < inode->nr_copies
+
+. ./common
+
+for i in `seq 0 1`; do
+ _start_sheep_with_zone $i 0
+done
+
+_start_sheep_with_zone 2 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
+
+$DOG cluster shutdown
+
+rm $STORE/1/obj/007c2b2500000000
+
+for i in `seq 0 1`; do
+ _start_sheep_with_zone $i 0
+done
+
+_start_sheep_with_zone 2 1
+
+_wait_for_sheep 3
+
+$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..0f4cb8a
--- /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 128 0
+ 1 127.0.0.1:7001 128 0
+ 2 127.0.0.1:7002 128 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 4015610..9b17e97 100644
--- a/tests/functional/group
+++ b/tests/functional/group
@@ -97,3 +97,4 @@
080 auto quick vdi md
081 auto quick vdi md
082 auto quick vdi md
+083 auto quick vdi
--
1.7.10.4
More information about the sheepdog
mailing list