[sheepdog] [PATCH v2 4/4] tests/functional: add a new test for checking fast deep copied snapshot

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Mon Jan 19 11:28:54 CET 2015


Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
 tests/functional/101     | 26 ++++++++++++++++++++++++++
 tests/functional/101.out | 16 ++++++++++++++++
 tests/functional/group   |  1 +
 3 files changed, 43 insertions(+)
 create mode 100755 tests/functional/101
 create mode 100644 tests/functional/101.out

diff --git a/tests/functional/101 b/tests/functional/101
new file mode 100755
index 0000000..c480778
--- /dev/null
+++ b/tests/functional/101
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# Test fast deepcopy snapshot can produce a same result with ordinal deepcopy snapshot
+
+. ./common
+
+for i in 0 1 2; do
+    _start_sheep $i
+done
+_wait_for_sheep 3
+_cluster_format -c 2
+
+$DOG vdi create test 128M -P
+$DOG vdi snapshot test --no-share
+
+_node_info
+_vdi_list
+
+$DOG vdi delete test
+$DOG vdi delete test -s 1
+
+$DOG vdi create test 128M -P
+$DOG vdi snapshot test --no-share --fast-deep-copy
+
+_node_info
+_vdi_list
diff --git a/tests/functional/101.out b/tests/functional/101.out
new file mode 100644
index 0000000..2d59109
--- /dev/null
+++ b/tests/functional/101.out
@@ -0,0 +1,16 @@
+QA output created by 101
+using backend plain store
+STORE	DATA	VDI	VMSTATE	ATTR	LEDGER	STALE
+0	37	1	0	0	23	0
+1	50	1	0	0	20	0
+2	41	2	0	0	21	0
+  Name        Id    Size    Used  Shared    Creation time   VDI id  Copies  Tag   Block Size Shift
+s test         1  128 MB  128 MB  0.0 MB DATE   7c2b25      2                22
+  test         0  128 MB  128 MB  0.0 MB DATE   7c2b26      2                22
+STORE	DATA	VDI	VMSTATE	ATTR	LEDGER	STALE
+0	37	1	0	0	23	0
+1	50	1	0	0	20	0
+2	41	2	0	0	21	0
+  Name        Id    Size    Used  Shared    Creation time   VDI id  Copies  Tag   Block Size Shift
+s test         1  128 MB  128 MB  0.0 MB DATE   7c2b25      2                22
+  test         0  128 MB  128 MB  0.0 MB DATE   7c2b26      2                22
diff --git a/tests/functional/group b/tests/functional/group
index 2e03738..43be6ea 100644
--- a/tests/functional/group
+++ b/tests/functional/group
@@ -115,3 +115,4 @@
 098 auto quick vdi cluster
 099 auto quick vdi cluster
 100 auto quick vdi
+101 auto quick vdi
-- 
1.9.1




More information about the sheepdog mailing list