[sheepdog] [PATCH v2 2/2] test/func: add test case for fixing cluster-wide snapshot inconsistency

Ruoyu liangry at ucweb.com
Wed Aug 20 12:06:54 CEST 2014


Test suite 030 is updated.

Reported-by: Valerio Pachera <sirio81 at gmail.com>
Cc: Liu Yuan <namei.unix at gmail.com>
Signed-off-by: Ruoyu <liangry at ucweb.com>
---
 tests/functional/030     | 14 ++++++++++++++
 tests/functional/030.out | 13 +++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/tests/functional/030 b/tests/functional/030
index 90800b5..dfa3cf2 100755
--- a/tests/functional/030
+++ b/tests/functional/030
@@ -140,3 +140,17 @@ for i in 0 4 8; do
 	$DOG vdi read test$i | md5sum > $STORE/csum.${i}3.new
 	diff -u $STORE/csum.${i}3.org $STORE/csum.${i}3.new
 done
+
+
+# delete vdi snapshot before saving cluster snapshot
+
+echo "yes" | _cluster_format
+$DOG vdi create test 10M
+_random | $DOG vdi write test
+$DOG vdi snapshot -s vs1 test
+$DOG cluster snapshot save s4 $TMPDIR
+$DOG vdi delete -s 1 test
+$DOG vdi snapshot -s vs2 test
+$DOG cluster snapshot save s5 $TMPDIR
+echo "yes" | $DOG cluster snapshot load s5 $TMPDIR
+_vdi_list
diff --git a/tests/functional/030.out b/tests/functional/030.out
index e54237e..29063d2 100644
--- a/tests/functional/030.out
+++ b/tests/functional/030.out
@@ -99,3 +99,16 @@ s test0        1   10 MB   12 MB  0.0 MB DATE   fd34af      3          snap
   test0        0   10 MB  0.0 MB   12 MB DATE   fd34b0      3              
 s test8        1   10 MB   12 MB  0.0 MB DATE   fd4247      3          snap
   test8        0   10 MB  0.0 MB   12 MB DATE   fd4248      3              
+    __
+   ()'`;
+   /\|`
+  /  |   Caution! The cluster is not empty.
+(/_)_|_  Are you sure you want to continue? [yes/no]: using backend plain store
+    __
+   ()'`;
+   /\|`
+  /  |   Caution! The cluster is not empty.
+(/_)_|_  Are you sure you want to continue? [yes/no]: using backend plain store
+  Name        Id    Size    Used  Shared    Creation time   VDI id  Copies  Tag
+s test         2   10 MB  0.0 MB   12 MB DATE   7c2b26      3           vs2
+  test         0   10 MB  0.0 MB   12 MB DATE   7c2b27      3              
-- 
1.8.3.2





More information about the sheepdog mailing list