Skip to content

Commit 435b173

Browse files
authored
ZTS: Apply zfs_bclone_enabled to bclone tests
If block cloning is disabled by default then enable it when running the bclone tests. Follow up to #15529. Reviewed-by: Brian Atkinson <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #15796
1 parent d9cb42d commit 435b173

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

tests/zfs-tests/tests/functional/bclone/cleanup.ksh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,11 @@
3434

3535
log_must zfs destroy $TESTSRCFS
3636
log_must zfs destroy $TESTDSTFS
37-
default_cleanup
37+
38+
default_cleanup_noexit
39+
40+
if tunable_exists BCLONE_ENABLED ; then
41+
log_must restore_tunable BCLONE_ENABLED
42+
fi
43+
44+
log_pass

tests/zfs-tests/tests/functional/bclone/setup.ksh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ if ! command -v clonefile > /dev/null ; then
3636
log_unsupported "clonefile program required to test block cloning"
3737
fi
3838

39+
if tunable_exists BCLONE_ENABLED ; then
40+
log_must save_tunable BCLONE_ENABLED
41+
log_must set_tunable32 BCLONE_ENABLED 1
42+
fi
43+
3944
DISK=${DISKS%% *}
4045

4146
default_setup_noexit $DISK "true"

0 commit comments

Comments
 (0)