[sheepdog] [PATCH v2 6/6] tests: add test to check live snapshot

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Wed May 1 10:41:49 CEST 2013


Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 tests/059     | 45 +++++++++++++++++++++++++++++++++++++++++++++
 tests/059.out | 25 +++++++++++++++++++++++++
 tests/group   |  1 +
 3 files changed, 71 insertions(+)
 create mode 100755 tests/059
 create mode 100644 tests/059.out

diff --git a/tests/059 b/tests/059
new file mode 100755
index 0000000..d818fcc
--- /dev/null
+++ b/tests/059
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+# Test live snapshot
+
+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 2`; do
+    _start_sheep $i
+done
+
+_wait_for_sheep 3
+
+$COLLIE cluster format -c 3
+$COLLIE vdi create test 4M
+
+_input()
+{
+    for i in `seq 1 10`; do
+	echo "multiwrite -P $i 0 1k ; 2k 1k ; 4k 1k ; 8k 1k"
+	sleep 1
+	$COLLIE vdi snapshot test -s snap$i
+    done
+
+    echo quit
+}
+
+_input | qemu-io sheepdog:test > /dev/null
+
+$COLLIE vdi list | _filter_short_date
+$COLLIE vdi tree | _filter_short_date
+
+for i in `seq 1 10`; do
+    $COLLIE vdi read test -s snap$i | md5sum
+done
diff --git a/tests/059.out b/tests/059.out
new file mode 100644
index 0000000..97e7001
--- /dev/null
+++ b/tests/059.out
@@ -0,0 +1,25 @@
+QA output created by 059
+using backend farm store
+  Name        Id    Size    Used  Shared    Creation time   VDI id  Copies  Tag
+s test         1  4.0 MB  4.0 MB  0.0 MB DATE   7c2b25     3         snap1
+s test         2  4.0 MB  4.0 MB  0.0 MB DATE   7c2b26     3         snap2
+s test         3  4.0 MB  4.0 MB  0.0 MB DATE   7c2b27     3         snap3
+s test         4  4.0 MB  4.0 MB  0.0 MB DATE   7c2b28     3         snap4
+s test         5  4.0 MB  4.0 MB  0.0 MB DATE   7c2b29     3         snap5
+s test         6  4.0 MB  4.0 MB  0.0 MB DATE   7c2b2a     3         snap6
+s test         7  4.0 MB  4.0 MB  0.0 MB DATE   7c2b2b     3         snap7
+s test         8  4.0 MB  4.0 MB  0.0 MB DATE   7c2b2c     3         snap8
+s test         9  4.0 MB  4.0 MB  0.0 MB DATE   7c2b2d     3         snap9
+s test        10  4.0 MB  4.0 MB  0.0 MB DATE   7c2b2e     3        snap10
+  test         0  4.0 MB  0.0 MB  4.0 MB DATE   7c2b2f     3              
+test---[DATE]---[DATE]---[DATE]---[DATE]---[DATE]---[DATE]---[DATE]---[DATE]---[DATE]---[DATE]---(you are here)
+4a05c5b1cc8b68058475dc9b07ddb012  -
+12775f311aea71153b7259d33735db26  -
+c444cb984d237149fff9ac81344c1c4c  -
+7caccccbe3f5f45dd8d081e13533c1a3  -
+7aa9135c03d6e9ae45f13cdf3c4108b8  -
+9a49f9ab047d216e73fe36555d3f48cb  -
+32d5e290baf0545a58a96fe731fc38d1  -
+cefd77da2d1ad90e7c041730ce3dd347  -
+696d60bae05faebc7890b5239f33c3bf  -
+2dd0d4ec25d3d6416309790c59f9b83a  -
diff --git a/tests/group b/tests/group
index 09f2857..abef17e 100644
--- a/tests/group
+++ b/tests/group
@@ -72,3 +72,4 @@
 056 auto quick cluster md
 057 auto quick cluster md
 058 auto quick cluster md
+059 auto quick vdi md
-- 
1.8.1.3.566.gaa39828




More information about the sheepdog mailing list