From 5046ce07c8fdfdaefc03a74be158bb1fdeba25e4 Mon Sep 17 00:00:00 2001 From: Arshad Hussain Date: Wed, 23 Oct 2024 07:08:52 -0400 Subject: [PATCH] LU-16870 tests: Make 413a/b work on server 2.14 with client master This patch makes 413a/b interop work on server 2.14 with client master. First, this patch removes general redirect of cmd execution (fallocate/dd) to dev/null from generate_uneven_mdts(). For 'dd' it might get little verbose however on failure it will dump output to stdout giving more info. Second, it adds check under check_fallocate_supported() to check is fallocate is issued on MDS. If yes it check for version when this feature was added. If not it falls back to 'dd' command Third, under unload_modules() it check for version where unload_modules_local() was added. If not it falls back to non-unload_modules_local() version to unload module. Test-Parameters: trivial testlist=sanity serverversion=2.14 env=ONLY=413a,413b,ONLY_REPEAT=10 Signed-off-by: Arshad Hussain Change-Id: I8a8843dd32f7e88d6d0938b67ce24353c9f9cb65 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56768 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Alex Deiter Reviewed-by: Oleg Drokin --- lustre/tests/sanity.sh | 2 +- lustre/tests/test-framework.sh | 22 +++++++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 45d33b9..26dec88 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -30136,7 +30136,7 @@ generate_uneven_mdts() { error "setstripe $testdir failed" start=$SECONDS for (( f = 0; f < TEST413_COUNT; f++ )); do - $cmd$testdir/f.$f &> /dev/null || error "$cmd $f failed" + $cmd$testdir/f.$f || error "$cmd$testdir $f failed" done sync; sleep 1; sync diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index e06e5f7..80366b2 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -1218,9 +1218,22 @@ unload_modules() { if $LOAD_MODULES_REMOTE; then local list=$(comma_list $(remote_nodes_list)) - if [ -n "$list" ]; then - echo "unloading modules on: '$list'" - do_rpc_nodes "$list" unload_modules_local + + if (( MDS1_VERSION >= $(version_code 2.15.51) )); then + # unload_module_local is only available after 2.15.51 + if [ -n "$list" ]; then + echo "unloading modules via unload_modules_local on: '$list'" + do_rpc_nodes "$list" unload_modules_local + fi + else + if [ -n "$list" ]; then + echo "unloading modules on: '$list'" + do_rpc_nodes "$list" $LUSTRE_RMMOD ldiskfs + do_rpc_nodes "$list" check_mem_leak + do_rpc_nodes "$list" "rm -f /etc/udev/rules.d/99-lustre-test.rules" + do_rpc_nodes "$list" "udevadm control --reload-rules" + do_rpc_nodes "$list" "udevadm trigger" + fi fi fi @@ -12036,6 +12049,9 @@ function check_fallocate_supported() local fa_mode="osd-ldiskfs.$(facet_svc $facet).fallocate_zero_blocks" local mode=$(do_facet $facet $LCTL get_param -n $fa_mode 2>/dev/null | head -n 1) + ! [[ "$facet" =~ "mds" ]] || # older MDS doesn't support fallocate + (( MDS1_VERSION >= $(version_code v2_14_53-10-g163870abfb) )) || + mode="" if [[ -z "$mode" ]]; then echo "fallocate not supported on $facet" 1>&2 -- 1.8.3.1