summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-03-28 21:53:30 -0700
committerJosh Durgin <josh.durgin@inktank.com>2013-03-31 23:32:41 -0700
commitf67f62abab2816e87a8526ed5c726920fac5d641 (patch)
treefdaba14f7d5183562e9ee007442670d1d3346665 /qa
parent9946c69cd1b83c90129c88a6866e95482dffbc8a (diff)
downloadceph-f67f62abab2816e87a8526ed5c726920fac5d641.tar.gz
rbd: prevent import-diff if start snapshot is not already present
Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'qa')
-rwxr-xr-xqa/workunits/rbd/diff.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/qa/workunits/rbd/diff.sh b/qa/workunits/rbd/diff.sh
index 8218ae28dab..48ab5bb2232 100755
--- a/qa/workunits/rbd/diff.sh
+++ b/qa/workunits/rbd/diff.sh
@@ -5,6 +5,8 @@ function cleanup() {
rbd rm foo || :
rbd snap purge foo.copy || :
rbd rm foo.copy || :
+ rbd snap purge foo.copy2 || :
+ rbd rm foo.copy2 || :
rm -f foo.diff foo.out
}
@@ -30,6 +32,9 @@ rbd import-diff foo.diff foo.copy
rbd import-diff foo.diff foo.copy && exit 1 || true # this should fail with EEXIST on the end snap
rbd snap ls foo.copy | grep three
+rbd create foo.copy2 --size 1000
+rbd import-diff foo.diff foo.copy2 && exit 1 || true # this should fail bc the start snap dne
+
rbd export foo foo.out
orig=`md5sum foo.out | awk '{print $1}'`
rm foo.out