diff options
author | Sage Weil <sage@inktank.com> | 2013-05-21 12:15:49 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-21 12:16:24 -0700 |
commit | cbff720ff54ac6948f455cf82c4c2eee31d703f4 (patch) | |
tree | 90e101b32952b8dbbd97421bd5b737173dc5887a /qa | |
parent | ebc0913677d587037f69e24157cfdf51c01bec61 (diff) | |
download | ceph-cbff720ff54ac6948f455cf82c4c2eee31d703f4.tar.gz |
rbd: prevent import of a dir
Fixes: #2865
Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'qa')
-rwxr-xr-x | qa/workunits/rbd/import_export.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/qa/workunits/rbd/import_export.sh b/qa/workunits/rbd/import_export.sh index bbbdbe62999..353a47fffbe 100755 --- a/qa/workunits/rbd/import_export.sh +++ b/qa/workunits/rbd/import_export.sh @@ -22,6 +22,11 @@ compare_files_and_ondisk_sizes () { [ $origsize = $exportsize ] } +# cannot import a dir +mkdir foo.$$ +rbd import foo.$$ foo.dir && exit 1 || true # should fail +rmdir foo.$$ + # 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 |