[sheepdog] [PATCH v2 3/5] test/039: add test of rollbacking to the non-snapshot vdi

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Mon Mar 11 08:07:09 CET 2013


We cannot rollback to the current vdi.  This patch adds check for it.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 tests/039     | 4 ++++
 tests/039.out | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/tests/039 b/tests/039
index f31a413..2d737f6 100755
--- a/tests/039
+++ b/tests/039
@@ -57,6 +57,10 @@ $COLLIE vdi snapshot test -s snap3
 qemu-io -c "write 0 512 -P 4" sheepdog:test | _filter_qemu_io
 $COLLIE vdi snapshot test -s snap4
 
+# these fail since the snap ids don't belong to snapshots
+$COLLIE vdi rollback test -s 0
+$COLLIE vdi rollback test -s 5
+
 $COLLIE vdi rollback test -s snap3
 qemu-io -c "read 0 512 -P 3" sheepdog:test | _filter_qemu_io
 $COLLIE vdi tree | _filter_short_date
diff --git a/tests/039.out b/tests/039.out
index b17b696..2b412ea 100644
--- a/tests/039.out
+++ b/tests/039.out
@@ -41,6 +41,9 @@ wrote 512/512 bytes at offset 0
 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 wrote 512/512 bytes at offset 0
 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+The snapshot id must be larger than zero
+Cannot get VDI info for test 5 : Invalid parameters
+Failed to open VDI test
 read 512/512 bytes at offset 0
 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 test---[DATE]-+-[DATE]
-- 
1.8.1.3.566.gaa39828




More information about the sheepdog mailing list