Skip to content

Commit

Permalink
qa: add krbd_get_features.t test
Browse files Browse the repository at this point in the history
Run it together with krbd_blkroset.t.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
  • Loading branch information
idryomov committed Nov 20, 2019
1 parent 366a369 commit 462e2ae
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
31 changes: 31 additions & 0 deletions qa/rbd/krbd_get_features.t
@@ -0,0 +1,31 @@

journaling makes the image only unreadable, rather than both unreadable
and unwritable:

$ rbd create --size 1 --image-feature layering,exclusive-lock,journaling img
$ rbd snap create img@snap
$ rbd snap protect img@snap
$ rbd clone --image-feature layering,exclusive-lock,journaling img@snap cloneimg

$ DEV=$(sudo rbd map img)
rbd: sysfs write failed
rbd: map failed: (6) No such device or address
[6]
$ DEV=$(sudo rbd map --read-only img)
$ blockdev --getro $DEV
1
$ sudo rbd unmap $DEV

$ DEV=$(sudo rbd map cloneimg)
rbd: sysfs write failed
rbd: map failed: (6) No such device or address
[6]
$ DEV=$(sudo rbd map --read-only cloneimg)
$ blockdev --getro $DEV
1
$ sudo rbd unmap $DEV

$ rbd rm --no-progress cloneimg
$ rbd snap unprotect img@snap
$ rbd snap rm --no-progress img@snap
$ rbd rm --no-progress img
Expand Up @@ -3,3 +3,4 @@ tasks:
clients:
client.0:
- qa/rbd/krbd_blkroset.t
- qa/rbd/krbd_get_features.t

0 comments on commit 462e2ae

Please sign in to comment.