]> git.proxmox.com Git - mirror_zfs.git/commitdiff
ZTS: Apply zfs_bclone_enabled to bclone tests
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 23 Jan 2024 00:14:08 +0000 (16:14 -0800)
committerGitHub <noreply@github.com>
Tue, 23 Jan 2024 00:14:08 +0000 (16:14 -0800)
If block cloning is disabled by default then enable it when running
the bclone tests.  Follow up to #15529.

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #15796

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

index df6d9c08fecee8cf9d44d2558b4d56ee28fa9b8e..0021ccb57ae07c009bd2ac6bf046dc960f23eb42 100755 (executable)
 
 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
index c68719ee72a232016e259646c054c52b1b95de51..9d26088c5a8a90e13dfe944e160a9a7ace36d62c 100755 (executable)
@@ -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"