]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: don't assume that /dev/sda or /dev/vda is present in unmap.t 67077/head
authorIlya Dryomov <idryomov@gmail.com>
Fri, 23 Jan 2026 13:48:53 +0000 (14:48 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 26 Jan 2026 08:54:24 +0000 (09:54 +0100)
Instead of hard-coding the block device name, use the block device that
is backing the filesystem that the test is running on.  We can be quite
sure it won't be an RBD device ;)

Fixes: https://tracker.ceph.com/issues/74529
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 2b5f0f4e7396114f9944a4987c38e18d4ecfbb1f)

src/test/cli-integration/rbd/unmap.t

index 3fdac43d7c0377ed857fcd634f5917de98b6d7bb..9da5d2c1e79e45d949104679b87012890eae0f76 100644 (file)
@@ -70,8 +70,9 @@ Not a block device - device that's just been unmapped:
 
 A block device, but not rbd:
 
-  $ sudo rbd device unmap /dev/[sv]da
-  rbd: '/dev/?da' is not an rbd device (glob)
+  $ THIS_FS_DEV=$(findmnt -n -o SOURCE -T .)
+  $ sudo rbd device unmap $THIS_FS_DEV
+  rbd: '/dev/.+' is not an rbd device (re)
   rbd: unmap failed: (22) Invalid argument
   [22]