[sheepdog] [PATCH stable-0.6 20/22] tests/func: test restart with missing object in stale directory
Hitoshi Mitake
mitake.hitoshi at gmail.com
Mon Aug 12 16:55:24 CEST 2013
From: Liu Yuan <namei.unix at gmail.com>
Current stable-0.6 can't pass this script but master can.
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
tests/functional/072 | 47 +++++++++++++++++++++++++++++++++++++++++++++++
tests/functional/072.out | 9 +++++++++
tests/functional/group | 1 +
3 files changed, 57 insertions(+)
create mode 100755 tests/functional/072
create mode 100644 tests/functional/072.out
diff --git a/tests/functional/072 b/tests/functional/072
new file mode 100755
index 0000000..b4e7792
--- /dev/null
+++ b/tests/functional/072
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+# Test restart with missing object in stale directory
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1 # failure is the default!
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+
+_cleanup
+
+MD=false
+
+for i in 0 1; do
+ _start_sheep $i
+done
+_wait_for_sheep 2
+
+_cluster_format -c 1
+
+_start_sheep 2
+_wait_for_sheep 3
+
+$COLLIE vdi create test 8M -P
+$COLLIE cluster shutdown
+
+mv $STORE/0/obj/007c2b2500000001 $STORE/0/obj/.stale/007c2b2500000001.1
+mv $STORE/1/obj/807c2b2500000000 $STORE/1/obj/.stale/807c2b2500000000.1
+
+for i in 0 1 2; do
+ _start_sheep $i
+done
+
+_wait_for_sheep 3
+_wait_for_sheep_recovery 0
+
+for i in 0 1 2; do
+ $COLLIE vdi list -p $((7000+$i)) | _filter_short_date
+done
+
+$COLLIE vdi check test
diff --git a/tests/functional/072.out b/tests/functional/072.out
new file mode 100644
index 0000000..90b71d7
--- /dev/null
+++ b/tests/functional/072.out
@@ -0,0 +1,9 @@
+QA output created by 072
+using backend plain store
+ Name Id Size Used Shared Creation time VDI id Copies Tag
+ test 0 8.0 MB 8.0 MB 0.0 MB DATE 7c2b25 1
+ Name Id Size Used Shared Creation time VDI id Copies Tag
+ test 0 8.0 MB 8.0 MB 0.0 MB DATE 7c2b25 1
+ Name Id Size Used Shared Creation time VDI id Copies Tag
+ test 0 8.0 MB 8.0 MB 0.0 MB DATE 7c2b25 1
+finish check&repair test
diff --git a/tests/functional/group b/tests/functional/group
index 489248d..dfa6558 100644
--- a/tests/functional/group
+++ b/tests/functional/group
@@ -85,3 +85,4 @@
069 auto quick cluster md
070 auto quick cluster md
071 auto quick store md
+072 auto quick store
--
1.8.1.2
More information about the sheepdog
mailing list