From 6725e748e9e5b19bbb70d2dc8d183e695ecd5759 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 21 Jun 2011 20:31:00 -0700 Subject: [PATCH] qa: simple rbd import/export test Fixes: #1211 Signed-off-by: Sage Weil --- qa/workunits/rbd/import_export.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 qa/workunits/rbd/import_export.sh diff --git a/qa/workunits/rbd/import_export.sh b/qa/workunits/rbd/import_export.sh new file mode 100755 index 0000000000000..a2af194b43a1e --- /dev/null +++ b/qa/workunits/rbd/import_export.sh @@ -0,0 +1,20 @@ +#!/bin/sh -ex + +# create a sparse file +dd if=/bin/sh of=/tmp/img bs=1k count=1 seek=10 +dd if=/bin/dd of=/tmp/img bs=1k count=10 seek=100 +dd if=/bin/rm of=/tmp/img bs=1k count=100 seek=1000 +dd if=/bin/ls of=/tmp/img bs=1k seek=10000 +dd if=/bin/ln of=/tmp/img bs=1k seek=100000 +dd if=/bin/grep of=/tmp/img bs=1k seek=1000000 + +rbd rm testimg || true + +rbd import /tmp/img testimg +rbd export testimg /tmp/img2 + +cmp /tmp/img /tmp/img2 + +rm /tmp/img /tmp/img2 + +echo OK \ No newline at end of file -- 2.39.5