Whamcloud - gitweb
LU-17047 tests: sanity/77c ensure ost debug_path is valid 43/56643/5
authorRonnie Sahlberg <rsahlberg@whamcloud.com>
Thu, 10 Oct 2024 03:57:39 +0000 (23:57 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 18 Oct 2024 18:44:02 +0000 (18:44 +0000)
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 <rsahlberg@whamcloud.com>
Change-Id: I4aae3e422d8f492a7877fbe20a6c553afc35e998
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56643
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/tests/sanity.sh

index c347b80..5bb9064 100755 (executable)
@@ -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"