]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: add test for rbd map and snapshots
authorSage Weil <sage@inktank.com>
Wed, 30 Jan 2013 09:06:03 +0000 (01:06 -0800)
committerSage Weil <sage@inktank.com>
Wed, 30 Jan 2013 09:06:03 +0000 (01:06 -0800)
This tests for the behavior reported in #3964.  It passes on the current
code, but fails on 3.2 in squeeze (and 32-bit?).

Signed-off-by: Sage Weil <sage@inktank.com>
qa/workunits/rbd/map-snapshot-io.sh [new file with mode: 0644]

diff --git a/qa/workunits/rbd/map-snapshot-io.sh b/qa/workunits/rbd/map-snapshot-io.sh
new file mode 100644 (file)
index 0000000..6edcd4d
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -e
+
+# http://tracker.ceph.com/issues/3964
+
+rbd create image -s 100
+rbd map image
+udevadm settle  # note: newer versions of rbd do this for you.
+dd if=/dev/zero of=/dev/rbd/rbd/image oflag=direct count=10
+rbd snap create image@s1
+dd if=/dev/zero of=/dev/rbd/rbd/image oflag=direct count=10   # used to fail
+rbd snap rm image@s1
+dd if=/dev/zero of=/dev/rbd/rbd/image oflag=direct count=10
+
+echo OK