scripts/common: Change name of the cmp() function
It could potentially override cmp binary, causing failures in some of the tests. Change-Id: Ia0bd88222c60e5b8a13d3809a6213b457b887b41 Signed-off-by: Michal Berger <michalx.berger@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5005 Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
42ec403b6a
commit
86eadb4d7c
@ -236,7 +236,7 @@ function nvme_in_userspace() {
|
||||
printf '%s\n' "${bdfs[@]}"
|
||||
}
|
||||
|
||||
cmp() {
|
||||
cmp_versions() {
|
||||
local ver1 ver1_l
|
||||
local ver2 ver2_l
|
||||
|
||||
@ -277,9 +277,9 @@ cmp() {
|
||||
[[ ${ver1[*]} == "${ver2[*]}" ]] && return "$eq"
|
||||
}
|
||||
|
||||
lt() { cmp "$1" "<" "$2"; }
|
||||
gt() { cmp "$1" ">" "$2"; }
|
||||
le() { cmp "$1" "<=" "$2"; }
|
||||
ge() { cmp "$1" ">=" "$2"; }
|
||||
eq() { cmp "$1" "==" "$2"; }
|
||||
lt() { cmp_versions "$1" "<" "$2"; }
|
||||
gt() { cmp_versions "$1" ">" "$2"; }
|
||||
le() { cmp_versions "$1" "<=" "$2"; }
|
||||
ge() { cmp_versions "$1" ">=" "$2"; }
|
||||
eq() { cmp_versions "$1" "==" "$2"; }
|
||||
neq() { ! eq "$1" "$2"; }
|
||||
|
Loading…
Reference in New Issue
Block a user