btrfs-progs: tests: remove duplicated helper

The helper `check_min_kernel_version` is duplicated and can be removed.

Signed-off-by: Chung-Chiang Cheng <cccheng@synology.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Chung-Chiang Cheng 2022-08-02 11:11:10 +08:00 committed by David Sterba
parent 1781549688
commit 91a0881200

View File

@ -688,28 +688,6 @@ _get_subvolid()
} }
# compare running kernel version to the given parameter, return success
# if running is newer than requested (let caller decide if to fail or skip)
# $1: minimum version of running kernel in major.minor format (eg. 4.19)
check_min_kernel_version()
{
local unamemajor
local unameminor
local argmajor
local argminor
# 4.19.1-1-default
uname=$(uname -r)
# 4.19.1
uname=${uname%%-*}
IFS=. read unamemajor unameminor tmp <<< "$uname"
IFS=. read argmajor argminor tmp <<< "$1"
# "compare versions: ${unamemajor}.${unameminor} ? ${argmajor}.${argminor}"
[ "$unamemajor" -ge "$argmajor" ] || return 1
[ "$unameminor" -ge "$argminor" ] || return 1
return 0
}
# how many files to create. # how many files to create.
DATASET_SIZE=50 DATASET_SIZE=50