rbd: fix qa tests to use --allow-shrink

Fixes: #4763
Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2013-04-19 14:08:51 -07:00
parent f114fdc40a
commit fe9d326099
3 changed files with 5 additions and 4 deletions

View File

@ -29,10 +29,11 @@ test_others() {
# import, snapshot
rbd import $RBD_CREATE_ARGS /tmp/img1 testimg1
rbd resize testimg1 --size=256
rbd resize testimg1 --size=256 --allow-shrink
rbd export testimg1 /tmp/img2
rbd snap create testimg1 --snap=snap1
rbd resize testimg1 --size=128
rbd resize testimg1 --size=128 && exit 1 || true # shrink should fail
rbd resize testimg1 --size=128 --allow-shrink
rbd export testimg1 /tmp/img3
# info

View File

@ -72,7 +72,7 @@ sudo dd if=/dev/rbd/rbd/testimg1@snap1 of=/tmp/img1.snap1
cmp /tmp/img1 /tmp/img1.snap1
# resize
rbd resize testimg1 --size=40
rbd resize testimg1 --size=40 --allow-shrink
echo 1 | sudo tee /sys/bus/rbd/devices/$DEV_ID1/refresh
cat /sys/bus/rbd/devices/$DEV_ID1/size | grep 41943040
echo 1 | sudo tee /sys/bus/rbd/devices/$DEV_ID2/refresh

View File

@ -64,7 +64,7 @@ test_volumes_access() {
rbd -k $KEYRING --id volumes lock list images/foo
# commands that fail with read-only access
! rbd -k $KEYRING --id volumes resize -s 2 images/foo
! rbd -k $KEYRING --id volumes resize -s 2 images/foo --allow-shrink
! rbd -k $KEYRING --id volumes snap create images/foo@2
! rbd -k $KEYRING --id volumes snap rollback images/foo@snap
! rbd -k $KEYRING --id volumes snap remove images/foo@snap