[sheepdog] [PATCH 1/2] tests/functional: test a case of orphan object revival
Hitoshi Mitake
mitake.hitoshi at lab.ntt.co.jp
Thu Dec 11 08:00:14 CET 2014
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
tests/functional/099 | 31 +++++++++++++++++++++++++++++++
tests/functional/099.out | 24 ++++++++++++++++++++++++
tests/functional/group | 3 ++-
3 files changed, 57 insertions(+), 1 deletion(-)
create mode 100755 tests/functional/099
create mode 100644 tests/functional/099.out
diff --git a/tests/functional/099 b/tests/functional/099
new file mode 100755
index 0000000..37f5229
--- /dev/null
+++ b/tests/functional/099
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+# Test recovery process orphan object revival
+
+. ./common
+
+for i in 0 1 2 3; do
+ _start_sheep $i
+done
+_wait_for_sheep 4
+_cluster_format -c 3
+
+$DOG vdi create test 16M -P
+
+$DOG vdi list | _filter_short_date
+
+ls $STORE/*/{obj,d[0-9]*}/* 2> /dev/null | \
+ _filter_store | _filter_md_store | sort
+
+_kill_sheep 3
+_wait_for_sheep_stop 3
+
+$DOG vdi delete test
+
+$DOG vdi list | _filter_short_date
+
+_start_sheep 3
+_wait_for_sheep 4
+
+ls $STORE/*/{obj,d[0-9]*}/* 2> /dev/null | \
+ _filter_store | _filter_md_store | sort
diff --git a/tests/functional/099.out b/tests/functional/099.out
new file mode 100644
index 0000000..9d3ab4d
--- /dev/null
+++ b/tests/functional/099.out
@@ -0,0 +1,24 @@
+QA output created by 099
+using backend plain store
+ Name Id Size Used Shared Creation time VDI id Copies Tag
+ test 0 16 MB 16 MB 0.0 MB DATE 7c2b25 3
+STORE/0/obj/007c2b2500000000
+STORE/0/obj/007c2b2500000001
+STORE/0/obj/007c2b2500000002
+STORE/1/obj/007c2b2500000000
+STORE/1/obj/007c2b2500000001
+STORE/1/obj/007c2b2500000003
+STORE/1/obj/807c2b2500000000
+STORE/2/obj/007c2b2500000002
+STORE/2/obj/007c2b2500000003
+STORE/2/obj/807c2b2500000000
+STORE/3/obj/007c2b2500000000
+STORE/3/obj/007c2b2500000001
+STORE/3/obj/007c2b2500000002
+STORE/3/obj/007c2b2500000003
+STORE/3/obj/807c2b2500000000
+ Name Id Size Used Shared Creation time VDI id Copies Tag
+STORE/0/obj/807c2b2500000000
+STORE/1/obj/807c2b2500000000
+STORE/2/obj/807c2b2500000000
+STORE/3/obj/807c2b2500000000
diff --git a/tests/functional/group b/tests/functional/group
index 3e331c9..15edbf7 100644
--- a/tests/functional/group
+++ b/tests/functional/group
@@ -112,4 +112,5 @@
095 auto quick store md
096 auto quick cluster
097 vdi cluster
-098 auto quick vdi cluster
\ No newline at end of file
+098 auto quick vdi cluster
+099 auto quick vdi cluster
--
1.8.3.2
More information about the sheepdog
mailing list