[sheepdog] [PATCH 1/2] functional: add 065 to test cache push

Liu Yuan namei.unix at gmail.com
Thu Jun 20 09:59:56 CEST 2013


This can reproduce the bug fixed by
"sheep: check local request if it is in recovery"

Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
 tests/functional/065     |   37 +++++++++++++++++++++++++++++++++++++
 tests/functional/065.out |   10 ++++++++++
 tests/functional/group   |    1 +
 3 files changed, 48 insertions(+)
 create mode 100755 tests/functional/065
 create mode 100644 tests/functional/065.out

diff --git a/tests/functional/065 b/tests/functional/065
new file mode 100755
index 0000000..5f82d67
--- /dev/null
+++ b/tests/functional/065
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+# Test cache push while in recovery
+
+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
+
+for i in `seq 0 1`; do
+    _start_sheep $i "-w size=400"
+done
+
+_wait_for_sheep 2
+_cluster_format -c 2
+
+$COLLIE vdi create t 1G -P
+
+# move objects into stale directory
+_kill_sheep 0
+_start_sheep 0 "-w size=400"
+_wait_for_sheep 2
+
+dd if=/dev/zero | $COLLIE vdi write -w t &
+
+_wait_for_sheep_recovery 1
+wait
+
+$COLLIE cluster info | _filter_cluster_info
diff --git a/tests/functional/065.out b/tests/functional/065.out
new file mode 100644
index 0000000..5605dd7
--- /dev/null
+++ b/tests/functional/065.out
@@ -0,0 +1,10 @@
+QA output created by 065
+using backend plain store
+Cluster status: running, auto-recovery enabled
+
+Cluster created at DATE
+
+Epoch Time           Version
+DATE      3 [127.0.0.1:7000, 127.0.0.1:7001]
+DATE      2 [127.0.0.1:7001]
+DATE      1 [127.0.0.1:7000, 127.0.0.1:7001]
diff --git a/tests/functional/group b/tests/functional/group
index 73ab542..4653979 100644
--- a/tests/functional/group
+++ b/tests/functional/group
@@ -78,3 +78,4 @@
 062 auto quick cluster md
 063 auto quick cluster
 064 auto quick cluster
+065 auto quick cluster md
-- 
1.7.9.5




More information about the sheepdog mailing list