[sheepdog] [PATCH] tests/func: test restart with missing object in stale directory

Liu Yuan namei.unix at gmail.com
Sun Aug 11 04:46:10 CEST 2013


Current stable-0.6 can't pass this script but master can.

Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
 tests/functional/072     |   44 ++++++++++++++++++++++++++++++++++++++++++++
 tests/functional/072.out |    9 +++++++++
 tests/functional/group   |    1 +
 3 files changed, 54 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..98063bb
--- /dev/null
+++ b/tests/functional/072
@@ -0,0 +1,44 @@
+#!/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 2; do
+    _start_sheep $i
+done
+
+_wait_for_sheep 3
+
+_cluster_format -c 1
+
+$COLLIE vdi create test 8M -P
+
+mv $STORE/0/obj/007c2b2500000001 $STORE/0/obj/.stale/
+$COLLIE cluster shutdown
+
+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.7.9.5




More information about the sheepdog mailing list