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

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Sat May 30 11:34:24 CEST 2015


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

diff --git a/tests/functional/105 b/tests/functional/105
new file mode 100755
index 0000000..1fdf5c2
--- /dev/null
+++ b/tests/functional/105
@@ -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/105.out b/tests/functional/105.out
new file mode 100644
index 0000000..b74cbf3
--- /dev/null
+++ b/tests/functional/105.out
@@ -0,0 +1,34 @@
+QA output created by 105
+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 ee2b1f2..41a3aec 100644
--- a/tests/functional/group
+++ b/tests/functional/group
@@ -119,3 +119,4 @@
 102 auto quick store vdi
 103 auto quick store vdi
 104 auto quick store vdi
+105 auto quick vdi
-- 
1.9.1



More information about the sheepdog mailing list