From: Ronnie Sahlberg Date: Thu, 10 Oct 2024 03:57:39 +0000 (-0400) Subject: LU-17047 tests: sanity/77c ensure ost debug_path is valid X-Git-Tag: 2.16.0-RC3~7 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=0bb0b2938c41c4181d7f536675700606932699f6;p=fs%2Flustre-release.git LU-17047 tests: sanity/77c ensure ost debug_path is valid test_77c has been failing intermittently for a while due to either debug_param not being set properly before this test is invoked or due to silent failure of getting the param from the remote node. Try to avoid these spurios test flakiness by forcing the debug_path parameter to the expected setting during test startup. A test shouldn't depend on no residuals being present from unrelated prior tests anyway. If need be we can add a dedicated test that only verifies that we can set debug_path to a specific value and then read the value back. Test-Parameters: trivial testgroup=rolling-upgrade-client1 Test-Parameters: testgroup=rolling-downgrade-mds Test-Parameters: testgroup=rolling-downgrade-client2 Test-Parameters: testgroup=rolling-upgrade-client2 Signed-off-by: Ronnie Sahlberg Change-Id: I4aae3e422d8f492a7877fbe20a6c553afc35e998 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56643 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin Reviewed-by: Andreas Dilger --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index c347b8007..5bb9064 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -11563,11 +11563,15 @@ test_77c() { local osc_file_prefix local osc_file local check_ost=false - local ost_file_prefix + local ost_file_prefix="$TMP/lustre-log" local ost_file local orig_cksum local dump_cksum local fid + local old_ost_path=$(do_facet ost1 $LCTL get_param -n debug_path) + + stack_trap "do_facet ost1 $LCTL set_param debug_path=$old_ost_path" + do_facet ost1 $LCTL set_param debug_path=${ost_file_prefix} # ensure corruption will occur on first OSS/OST $LFS setstripe -i 0 $DIR/$tfile @@ -11580,7 +11584,6 @@ test_77c() { if [ $OST1_VERSION -ge $(version_code 2.9.57) ] then check_ost=true - ost_file_prefix=$(do_facet ost1 $LCTL get_param -n debug_path) ost_file_prefix=${ost_file_prefix}-checksum_dump-ost-\\${fid} else echo "OSS do not support bulk pages dump upon error"