Skip to content

Commit

Permalink
ZTS: issue #14223: add check for /dev changes after snapshot rename
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
JKDingwall committed Oct 5, 2024
1 parent 1d45c54 commit 156c952
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,18 @@ log_must zfs set snapdev=visible $TESTPOOL
verify_inherited 'snapdev' 'hidden' $SUBZVOL $VOLFS
blockdev_missing $SUBSNAPDEV
blockdev_exists $SNAPDEV
log_must zfs destroy $SNAP

# 4. Verify "rename" is correctly reflected when "snapdev=visible"
# 4.1 First create a snapshot and verify the device is present
log_must zfs snapshot $SNAP
log_must zfs set snapdev=visible $ZVOL
blockdev_exists $SNAPDEV
# 4.2 rename the snapshot and verify the devices are updated
log_must zfs rename $SNAP $SNAP-new
blockdev_missing $SNAPDEV
blockdev_exists $SNAPDEV-new
# 4.3 cleanup
log_must zfs destroy $SNAP-new

log_pass "ZFS volume property 'snapdev' works as expected"

0 comments on commit 156c952

Please sign in to comment.