ZTS: Skip cross-fs bclone tests if FreeBSD < 14.0

Skip cross filesystem block cloning tests on FreeBSD if running
less than version 14.0.  Cross filesystem copy_file_range() was
added in FreeBSD 14.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #15901
This commit is contained in:
Tony Hutter
2024-02-16 08:59:56 -08:00
parent d92fbe2150
commit b62fd2cef9
5 changed files with 51 additions and 14 deletions
@@ -42,6 +42,12 @@ function verify_crossfs_block_cloning
if is_linux && [[ $(linux_version) -lt $(linux_version "5.3") ]]; then
log_unsupported "copy_file_range can't copy cross-filesystem before Linux 5.3"
fi
# Cross dataset block cloning only supported on FreeBSD 14+
# https://github.com/freebsd/freebsd-src/commit/969071be938c
if is_freebsd && [ $(freebsd_version) -lt $(freebsd_version 14.0) ] ; then
log_unsupported "Cloning across datasets not supported in $(uname -r)"
fi
}
# Unused.
@@ -26,12 +26,11 @@
. $STF_SUITE/include/libtest.shlib
. $STF_SUITE/tests/functional/block_cloning/block_cloning.kshlib
. $STF_SUITE/tests/functional/bclone/bclone_common.kshlib
verify_runnable "global"
if is_linux && [[ $(linux_version) -lt $(linux_version "5.3") ]]; then
log_unsupported "copy_file_range can't copy cross-filesystem before Linux 5.3"
fi
verify_crossfs_block_cloning
claim="The copy_file_range syscall can clone across datasets."
@@ -26,12 +26,11 @@
. $STF_SUITE/include/libtest.shlib
. $STF_SUITE/tests/functional/block_cloning/block_cloning.kshlib
. $STF_SUITE/tests/functional/bclone/bclone_common.kshlib
verify_runnable "global"
if is_linux && [[ $(linux_version) -lt $(linux_version "5.3") ]]; then
log_unsupported "copy_file_range can't copy cross-filesystem before Linux 5.3"
fi
verify_crossfs_block_cloning
claim="Block cloning across encrypted datasets."