Skip to content

Commit

Permalink
ZTS: Apply zfs_bclone_enabled to bclone tests
Browse files Browse the repository at this point in the history
If block cloning is disabled by default then enable it when running
the bclone tests.  Follow up to openzfs#15529.

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#15796
  • Loading branch information
behlendorf authored and lundman committed Mar 13, 2024
1 parent eda725b commit fda869d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/zfs-tests/tests/functional/bclone/cleanup.ksh
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,11 @@

log_must zfs destroy $TESTSRCFS
log_must zfs destroy $TESTDSTFS
default_cleanup

default_cleanup_noexit

if tunable_exists BCLONE_ENABLED ; then
log_must restore_tunable BCLONE_ENABLED
fi

log_pass
5 changes: 5 additions & 0 deletions tests/zfs-tests/tests/functional/bclone/setup.ksh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ if ! command -v clonefile > /dev/null ; then
log_unsupported "clonefile program required to test block cloning"
fi

if tunable_exists BCLONE_ENABLED ; then
log_must save_tunable BCLONE_ENABLED
log_must set_tunable32 BCLONE_ENABLED 1
fi

DISK=${DISKS%% *}

default_setup_noexit $DISK "true"
Expand Down

0 comments on commit fda869d

Please sign in to comment.