summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Mick <dan.mick@inktank.com>2012-11-26 21:29:53 -0800
committerDan Mick <dan.mick@inktank.com>2012-11-26 22:02:35 -0800
commitece11b0ed97ac6207980b412e3b2afe869065fff (patch)
tree32db0d0f89ddc4e1800e7e77474abeffd6440f6f
parent0be9b15b7972252505cbd838fd9d45e0e04404bf (diff)
downloadceph-ece11b0ed97ac6207980b412e3b2afe869065fff.tar.gz
rbd workunit: Add tests for clones across pools
Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
-rwxr-xr-xqa/workunits/rbd/copy.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/qa/workunits/rbd/copy.sh b/qa/workunits/rbd/copy.sh
index b265f299b02..94f2c7f73c3 100755
--- a/qa/workunits/rbd/copy.sh
+++ b/qa/workunits/rbd/copy.sh
@@ -282,6 +282,30 @@ test_pool_image_args() {
ceph osd pool create rbd 100
}
+test_clone() {
+ remove_images
+ rbd create test1 $RBD_CREATE_ARGS -s 1
+ rbd snap create test1@s1
+ rbd snap protect test1@s1
+
+ rados mkpool rbd2
+ rbd clone test1@s1 rbd2/clone
+ rbd -p rbd2 ls | grep clone
+ rbd -p rbd2 ls -l | grep clone | grep test1@s1
+ rbd ls | grep -v clone
+ rbd flatten rbd2/clone
+ rbd snap create rbd2/clone@s1
+ rbd snap protect rbd2/clone@s1
+ rbd clone rbd2/clone@s1 clone2
+ rbd ls | grep clone2
+ rbd ls -l | grep clone2 | grep rbd2/clone@s1
+ rbd -p rbd2 ls | grep -v clone2
+
+ rados rmpool rbd2
+ rados rmpool rbd
+ rados mkpool rbd
+}
+
test_pool_image_args
test_rename
test_ls
@@ -292,5 +316,6 @@ test_locking
RBD_CREATE_ARGS="--format 2"
test_others
test_locking
+test_clone
echo OK