Skip to content

Commit

Permalink
rbd: fix qa tests to use --allow-shrink
Browse files Browse the repository at this point in the history
Fixes: ceph#4763
Signed-off-by: Sage Weil <[email protected]>
  • Loading branch information
Sage Weil committed Apr 19, 2013
1 parent f114fdc commit fe9d326
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions qa/workunits/rbd/copy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion qa/workunits/rbd/kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion qa/workunits/rbd/permissions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fe9d326

Please sign in to comment.