Skip to content

Commit 3c2f69a

Browse files
committed
ZTS: issue #14223: add check for /dev changes after snapshot rename
After renaming a snapshot with 'snapdev=visible' ensure that the /dev entries are updated to reflect the rename. Signed-off-by: James Dingwall <[email protected]>
1 parent 5a0616c commit 3c2f69a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_snapdev.ksh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,15 @@ verify_inherited 'snapdev' 'hidden' $SUBZVOL $VOLFS
118118
blockdev_missing $SUBSNAPDEV
119119
blockdev_exists $SNAPDEV
120120

121+
# 4. Verify "rename" is correctly reflected when "snapdev=visible"
122+
# 4.1 First create a snapshot and verify the device is present
123+
log_must zfs snapshot $SNAP
124+
log_must zfs set snapdev=visible $ZVOL
125+
blockdev_exists $SNAPDEV
126+
# 4.2 rename the snapshot and verify the devices are updated
127+
log_must zfs rename $SNAP $SNAP-new
128+
blockdev_missing $SNAPDEV
129+
blockdev_exists $SNAPDEV-new
130+
log_must zfs destroy $SNAP-new
131+
121132
log_pass "ZFS volume property 'snapdev' works as expected"

0 commit comments

Comments
 (0)