From: Emoly Liu Date: Mon, 20 Jan 2025 03:17:58 +0000 (+0800) Subject: LU-18114 tests: fix the version checks X-Git-Tag: 2.16.53~142 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=6d9cfdeda92613f09eabd0b9f2f3402432691bc8;p=fs%2Flustre-release.git LU-18114 tests: fix the version checks Fix the version checks for the following patches: Fixes: fec78d4568 ("LU-18114 lctl: split "lctl net_delay_*" group into subcommands") Fixes: 79a76faa48 ("LU-18114 lctl: split "lctl net_drop_*" group into subcommands") Fixes: 77e98c10b3 ("LU-18114 changelog: split "lctl changelog_*" group into subcommands Fixes: 166c48c1c3 ("LU-18114 snapshot: split "lctl snapshot_*" group into subcommands") Fixes: 441adeced3 ("LU-18114 barrier: split "lctl barrier_*" group into subcommands") Fixes: 89b0bcdab5 ("LU-18114 lfsck: split "lctl lfsck_*" group into subcommands") Test-Parameters: trivial testlist=sanity-lnet serverversion=2.16 Test-Parameters: trivial testlist=sanity env=ONLY="60i 801c" serverversion=2.16 Test-Parameters: trivial fstype=zfs testlist=sanity-lsnapshot serverversion=2.16 Test-Parameters: trivial testlist=sanity-lfsck env=ONLY=12a serverversion=2.16 Signed-off-by: Emoly Liu Change-Id: I16786e31113a4bd6c8e2e334afa10a795d0b03d9 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57824 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Frederick Dilger Reviewed-by: Oleg Drokin Reviewed-by: Andreas Dilger --- diff --git a/lustre/tests/sanity-lfsck.sh b/lustre/tests/sanity-lfsck.sh index da477c7..51479fc 100755 --- a/lustre/tests/sanity-lfsck.sh +++ b/lustre/tests/sanity-lfsck.sh @@ -1483,7 +1483,7 @@ test_12a() { [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" (( $MDS1_VERSION > $(version_code 2.5.55) )) || skip "MDS older than 2.5.55, LU-3950" - if (( $MDS1_VERSION >= $(version_code 2.15.65) )); then + if (( $MDS1_VERSION >= $(version_code 2.15.90) )); then lfsck_start="lfsck start" lfsck_stop="lfsck stop" else diff --git a/lustre/tests/sanity-lnet.sh b/lustre/tests/sanity-lnet.sh index 36217cd..e76faf1 100755 --- a/lustre/tests/sanity-lnet.sh +++ b/lustre/tests/sanity-lnet.sh @@ -2147,15 +2147,10 @@ cleanup_health_test() { add_health_test_drop_rules() { local args="-m GET -r 1 -e ${1}" local src dst - if (( $MDS1_VERSION >= $(version_code 2.15.65) )); then - net_drop_add="net_drop add" - else - net_drop_add="net_drop_add" - fi for src in "${LNIDS[@]}"; do for dst in "${RNIDS[@]}" "${LNIDS[@]}"; do - $LCTL $net_drop_add -s $src -d $dst ${args} || + $LCTL net_drop add -s $src -d $dst ${args} || error "Failed to add drop rule $src $dst $args" done done @@ -2163,11 +2158,6 @@ add_health_test_drop_rules() { do_lnet_health_ping_test() { local hstatus="$1" - if (( $MDS1_VERSION >= $(version_code 2.15.65) )); then - net_drop_del="net_drop del" - else - net_drop_del="net_drop_del" - fi echo "Simulate $hstatus" @@ -2179,7 +2169,7 @@ do_lnet_health_ping_test() { lnet_health_post - $LCTL $net_drop_del -a + $LCTL net_drop del -a return 0 } @@ -3761,17 +3751,9 @@ do_expired_message_drop_test() { delay=$((tto + 1)) - if (( $MDS1_VERSION >= $(version_code 2.15.65) )); then - net_delay_add="net_delay add" - net_delay_del="net_delay del" - else - net_delay_add="net_delay_add" - net_delay_del="net_delay_del" - fi - for lnid in "${LNIDS[@]}"; do for rnid in "${RNIDS[@]}"; do - $LCTL $net_delay_add -s "${lnid}" -d "${rnid}" \ + $LCTL net_delay add -s "${lnid}" -d "${rnid}" \ -l "${delay}" -r 1 -m GET || error "Failed to add delay rule" done @@ -3812,7 +3794,7 @@ do_expired_message_drop_test() { sleep ${delay} - $LCTL $net_delay_del -a + $LCTL net_delay del -a wait diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 6aadbae..c4c008f 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -32603,7 +32603,7 @@ post_801() { } barrier_stat() { - if (( $MDS1_VERSION >= $(version_code 2.15.65) )); then + if (( $MDS1_VERSION >= $(version_code 2.16.50) )); then barrier_stat="barrier stat" else barrier_stat="barrier_stat" @@ -32770,7 +32770,7 @@ run_test 801b "modification will be blocked by write barrier" test_801c() { [[ $MDSCOUNT -lt 2 ]] && skip_env "needs >= 2 MDTs" - if (( $MDS1_VERSION >= $(version_code 2.15.65) )); then + if (( $MDS1_VERSION >= $(version_code 2.16.50) )); then barrier_freeze="barrier freeze" barrier_thaw="barrier thaw" barrier_rescan="barrier rescan" diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 88a5bca..f03bed3a 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -10721,7 +10721,7 @@ lsnapshot () { local cmd=$1 shift - if (( $MDS1_VERSION >= $(version_code 2.15.65) )); then + if (( $MDS1_VERSION >= $(version_code 2.16.50) )); then do_facet mgs "$LCTL snapshot $cmd -F $FSNAME $*" else do_facet mgs "$LCTL snapshot_$cmd -F $FSNAME $*" @@ -11031,7 +11031,7 @@ __changelog_deregister() { local cl_user=$2 local rc=0 - if (( $MDS1_VERSION >= $(version_code 2.15.65) )); then + if (( $MDS1_VERSION >= $(version_code 2.16.50) )); then changelog_deregister="changelog deregister" else changelog_deregister="changelog_deregister" @@ -11051,7 +11051,7 @@ __changelog_deregister() { declare -Ax CL_USERS changelog_register() { - if (( $MDS1_VERSION >= $(version_code 2.15.65) )); then + if (( $MDS1_VERSION >= $(version_code 2.16.50) )); then changelog_register="changelog register" else changelog_register="changelog_register"