[sheepdog] [PATCH v5 4/5] tests/functional: add a test case for VID recycling
Hitoshi Mitake
mitake.hitoshi at lab.ntt.co.jp
Sat May 30 11:34:26 CEST 2015
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
tests/functional/106 | 37 +++++++++++++++++++++++++++++++++++++
tests/functional/106.out | 39 +++++++++++++++++++++++++++++++++++++++
tests/functional/group | 1 +
3 files changed, 77 insertions(+)
create mode 100755 tests/functional/106
create mode 100644 tests/functional/106.out
diff --git a/tests/functional/106 b/tests/functional/106
new file mode 100755
index 0000000..c2a9746
--- /dev/null
+++ b/tests/functional/106
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+# Test a functionality of VID recycle
+
+. ./common
+
+for i in 0 1 2; do
+ _start_sheep $i
+done
+_wait_for_sheep 3
+_cluster_format -c 3 -R
+
+$DOG vdi create test 16M
+for i in `seq 0 7`; do
+ $DOG vdi snapshot test
+done
+
+_vdi_list
+_node_info
+
+echo "deletion a VDI with name \"test\""
+$DOG vdi delete test
+
+_vdi_list
+_node_info
+
+echo "create a VDI with name \"test\" again, it must fail"
+$DOG vdi create test 16M
+
+echo "delete snapshots of first \"test\""
+for i in `seq 1 8`; do
+ $DOG vdi delete test -s $i
+done
+
+echo "every inode object should be cleaned"
+_vdi_list
+_node_info
diff --git a/tests/functional/106.out b/tests/functional/106.out
new file mode 100644
index 0000000..e6bc9bd
--- /dev/null
+++ b/tests/functional/106.out
@@ -0,0 +1,39 @@
+QA output created by 106
+using backend plain store
+ Name Id Size Used Shared Creation time VDI id Copies Tag Block Size Shift
+s test 1 16 MB 0.0 MB 0.0 MB DATE 1 3 22
+s test 2 16 MB 0.0 MB 0.0 MB DATE 2 3 22
+s test 3 16 MB 0.0 MB 0.0 MB DATE 3 3 22
+s test 4 16 MB 0.0 MB 0.0 MB DATE 4 3 22
+s test 5 16 MB 0.0 MB 0.0 MB DATE 5 3 22
+s test 6 16 MB 0.0 MB 0.0 MB DATE 6 3 22
+s test 7 16 MB 0.0 MB 0.0 MB DATE 7 3 22
+s test 8 16 MB 0.0 MB 0.0 MB DATE 8 3 22
+ test 0 16 MB 0.0 MB 0.0 MB DATE 9 3 22
+STORE DATA VDI VMSTATE ATTR LEDGER STALE
+0 0 9 0 0 0 0
+1 0 9 0 0 0 0
+2 0 9 0 0 0 0
+deletion a VDI with name "test"
+ Name Id Size Used Shared Creation time VDI id Copies Tag Block Size Shift
+s test 1 16 MB 0.0 MB 0.0 MB DATE 1 3 22
+s test 2 16 MB 0.0 MB 0.0 MB DATE 2 3 22
+s test 3 16 MB 0.0 MB 0.0 MB DATE 3 3 22
+s test 4 16 MB 0.0 MB 0.0 MB DATE 4 3 22
+s test 5 16 MB 0.0 MB 0.0 MB DATE 5 3 22
+s test 6 16 MB 0.0 MB 0.0 MB DATE 6 3 22
+s test 7 16 MB 0.0 MB 0.0 MB DATE 7 3 22
+s test 8 16 MB 0.0 MB 0.0 MB DATE 8 3 22
+STORE DATA VDI VMSTATE ATTR LEDGER STALE
+0 0 9 0 0 0 0
+1 0 9 0 0 0 0
+2 0 9 0 0 0 0
+create a VDI with name "test" again, it must fail
+Failed to create VDI test: VDI exists already
+delete snapshots of first "test"
+every inode object should be cleaned
+ Name Id Size Used Shared Creation time VDI id Copies Tag Block Size Shift
+STORE DATA VDI VMSTATE ATTR LEDGER STALE
+0 0 0 0 0 0 0
+1 0 0 0 0 0 0
+2 0 0 0 0 0 0
diff --git a/tests/functional/group b/tests/functional/group
index 41a3aec..979c97b 100644
--- a/tests/functional/group
+++ b/tests/functional/group
@@ -120,3 +120,4 @@
103 auto quick store vdi
104 auto quick store vdi
105 auto quick vdi
+106 auto quick vdi
\ No newline at end of file
--
1.9.1
More information about the sheepdog
mailing list