mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
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:
@@ -61,13 +61,8 @@ function compare_version_gte
|
||||
[ "$(printf "$1\n$2" | sort -V | tail -n1)" = "$1" ]
|
||||
}
|
||||
|
||||
# Linux kernel version comparison function
|
||||
#
|
||||
# $1 Linux version ("4.10", "2.6.32") or blank for installed Linux version
|
||||
#
|
||||
# Used for comparison: if [ $(linux_version) -ge $(linux_version "2.6.32") ]
|
||||
#
|
||||
function linux_version
|
||||
# Helper function used by linux_version() and freebsd_version()
|
||||
function kernel_version
|
||||
{
|
||||
typeset ver="$1"
|
||||
|
||||
@@ -83,6 +78,24 @@ function linux_version
|
||||
echo $((version * 100000 + major * 1000 + minor))
|
||||
}
|
||||
|
||||
# Linux kernel version comparison function
|
||||
#
|
||||
# $1 Linux version ("4.10", "2.6.32") or blank for installed Linux version
|
||||
#
|
||||
# Used for comparison: if [ $(linux_version) -ge $(linux_version "2.6.32") ]
|
||||
function linux_version {
|
||||
kernel_version "$1"
|
||||
}
|
||||
|
||||
# FreeBSD version comparison function
|
||||
#
|
||||
# $1 FreeBSD version ("13.2", "14.0") or blank for installed FreeBSD version
|
||||
#
|
||||
# Used for comparison: if [ $(freebsd_version) -ge $(freebsd_version "13.2") ]
|
||||
function freebsd_version {
|
||||
kernel_version "$1"
|
||||
}
|
||||
|
||||
# Determine if this is a Linux test system
|
||||
#
|
||||
# Return 0 if platform Linux, 1 if otherwise
|
||||
|
||||
Reference in New Issue
Block a user