From: Hitoshi Mitake <[email protected]>

Cc: MORITA Kazutaka <[email protected]>
Tested-by: Valerio Pachera <[email protected]>
Cc: Alessandro Bolgia <[email protected]>
Signed-off-by: Hitoshi Mitake <[email protected]>
---
 tests/functional/093     | 32 ++++++++++++++++++++++++++++++++
 tests/functional/093.out | 26 ++++++++++++++++++++++++++
 tests/functional/group   |  1 +
 3 files changed, 59 insertions(+)
 create mode 100755 tests/functional/093
 create mode 100644 tests/functional/093.out

diff --git a/tests/functional/093 b/tests/functional/093
new file mode 100755
index 0000000..bf32e71
--- /dev/null
+++ b/tests/functional/093
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+# Test object reclaim for continuously snapshotted and partially updated VDI
+
+. ./common
+
+for i in 0 1 2; do
+    _start_sheep $i
+done
+_wait_for_sheep 3
+_cluster_format -c 3
+
+$DOG vdi create test 16M
+cat /dev/zero | $DOG vdi write test 0 512
+_node_info
+
+$DOG vdi snapshot test
+cat /dev/zero | $DOG vdi write test $((4 * 1024 * 1024)) 512
+_node_info
+
+$DOG vdi snapshot test
+cat /dev/zero | $DOG vdi write test $((4 * 1024 * 1024 * 2)) 512
+_node_info
+
+$DOG vdi delete test -s 2
+_node_info
+
+$DOG vdi delete test -s 1
+_node_info
+
+$DOG vdi delete test
+_node_info
diff --git a/tests/functional/093.out b/tests/functional/093.out
new file mode 100644
index 0000000..9d95ae5
--- /dev/null
+++ b/tests/functional/093.out
@@ -0,0 +1,26 @@
+QA output created by 093
+using backend plain store
+STORE  DATA    VDI     VMSTATE ATTR    LEDGER  STALE
+0      1       1       0       0       0       0
+1      1       1       0       0       0       0
+2      1       1       0       0       0       0
+STORE  DATA    VDI     VMSTATE ATTR    LEDGER  STALE
+0      2       2       0       0       0       0
+1      2       2       0       0       0       0
+2      2       2       0       0       0       0
+STORE  DATA    VDI     VMSTATE ATTR    LEDGER  STALE
+0      3       3       0       0       0       0
+1      3       3       0       0       0       0
+2      3       3       0       0       0       0
+STORE  DATA    VDI     VMSTATE ATTR    LEDGER  STALE
+0      3       3       0       0       2       0
+1      3       3       0       0       2       0
+2      3       3       0       0       2       0
+STORE  DATA    VDI     VMSTATE ATTR    LEDGER  STALE
+0      3       3       0       0       2       0
+1      3       3       0       0       2       0
+2      3       3       0       0       2       0
+STORE  DATA    VDI     VMSTATE ATTR    LEDGER  STALE
+0      0       3       0       0       0       0
+1      0       3       0       0       0       0
+2      0       3       0       0       0       0
diff --git a/tests/functional/group b/tests/functional/group
index d69f2d7..f3e9d30 100644
--- a/tests/functional/group
+++ b/tests/functional/group
@@ -107,3 +107,4 @@
 090 auto quick vdi md
 091 auto quick cluster md
 092 auto quick vdi
+093 auto quick vdi
-- 
1.9.1

-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to