[sheepdog] [PATCH v4 2/3] tests/functional: add a test case for VID overflow

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Sun Mar 8 05:08:34 CET 2015


Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
 tests/functional/101     | 39 +++++++++++++++++++++++++++++++++++++++
 tests/functional/101.out | 34 ++++++++++++++++++++++++++++++++++
 tests/functional/group   |  1 +
 3 files changed, 74 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..1fdf5c2
--- /dev/null
+++ b/tests/functional/101
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# Test a case of VID overflow
+
+. ./common
+
+for i in 0 1 2; do
+    _start_sheep $i
+done
+_wait_for_sheep 3
+_cluster_format -c 3
+
+$DOG vdi create 01909709 16M
+$DOG vdi create 05421217 16M
+
+$DOG vdi create 00471718 16M
+
+for i in `seq 0 7`; do
+    $DOG vdi snapshot 00471718
+done
+
+_vdi_list
+
+echo "deletion with wrap around"
+
+for i in `seq 1 7`; do
+    $DOG vdi delete 00471718 -s $i
+done
+
+_vdi_list
+
+echo "create snapshots again"
+
+for i in `seq 0 7`; do
+    $DOG vdi snapshot 00471718
+done
+
+_vdi_list
+
diff --git a/tests/functional/101.out b/tests/functional/101.out
new file mode 100644
index 0000000..1d949d5
--- /dev/null
+++ b/tests/functional/101.out
@@ -0,0 +1,34 @@
+QA output created by 101
+using backend plain store
+  Name        Id    Size    Used  Shared    Creation time   VDI id  Copies  Tag   Block Size Shift
+  01909709     0   16 MB  0.0 MB  0.0 MB DATE        1      3                22
+s 00471718     7   16 MB  0.0 MB  0.0 MB DATE        2      3                22
+s 00471718     8   16 MB  0.0 MB  0.0 MB DATE        3      3                22
+  00471718     0   16 MB  0.0 MB  0.0 MB DATE        4      3                22
+s 00471718     1   16 MB  0.0 MB  0.0 MB DATE   fffff9      3                22
+s 00471718     2   16 MB  0.0 MB  0.0 MB DATE   fffffa      3                22
+s 00471718     3   16 MB  0.0 MB  0.0 MB DATE   fffffb      3                22
+s 00471718     4   16 MB  0.0 MB  0.0 MB DATE   fffffc      3                22
+s 00471718     5   16 MB  0.0 MB  0.0 MB DATE   fffffd      3                22
+s 00471718     6   16 MB  0.0 MB  0.0 MB DATE   fffffe      3                22
+  05421217     0   16 MB  0.0 MB  0.0 MB DATE   ffffff      3                22
+deletion with wrap around
+  Name        Id    Size    Used  Shared    Creation time   VDI id  Copies  Tag   Block Size Shift
+  01909709     0   16 MB  0.0 MB  0.0 MB DATE        1      3                22
+s 00471718     8   16 MB  0.0 MB  0.0 MB DATE        3      3                22
+  00471718     0   16 MB  0.0 MB  0.0 MB DATE        4      3                22
+  05421217     0   16 MB  0.0 MB  0.0 MB DATE   ffffff      3                22
+create snapshots again
+  Name        Id    Size    Used  Shared    Creation time   VDI id  Copies  Tag   Block Size Shift
+  01909709     0   16 MB  0.0 MB  0.0 MB DATE        1      3                22
+s 00471718     8   16 MB  0.0 MB  0.0 MB DATE        3      3                22
+s 00471718     9   16 MB  0.0 MB  0.0 MB DATE        4      3                22
+s 00471718    10   16 MB  0.0 MB  0.0 MB DATE        5      3                22
+s 00471718    11   16 MB  0.0 MB  0.0 MB DATE        6      3                22
+s 00471718    12   16 MB  0.0 MB  0.0 MB DATE        7      3                22
+s 00471718    13   16 MB  0.0 MB  0.0 MB DATE        8      3                22
+s 00471718    14   16 MB  0.0 MB  0.0 MB DATE        9      3                22
+s 00471718    15   16 MB  0.0 MB  0.0 MB DATE        a      3                22
+s 00471718    16   16 MB  0.0 MB  0.0 MB DATE        b      3                22
+  00471718     0   16 MB  0.0 MB  0.0 MB DATE        c      3                22
+  05421217     0   16 MB  0.0 MB  0.0 MB DATE   ffffff      3                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