Whamcloud - gitweb
LU-15166 tests: restore osp-syn threads after test_818 75/45375/4
authorVladimir Saveliev <c17830@cray.com>
Tue, 26 Oct 2021 16:53:01 +0000 (19:53 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 30 Nov 2021 03:52:16 +0000 (03:52 +0000)
test_818() is supposed to leave osp-syn threads up after the test end,
otherwise, following tests get "logging isn't available, run LFSCK".

Use fail $SINGLEMDS for that.

Test-Parameters: trivial testlist=sanity
HPE-bug-id: LUS-10495
Change-Id: Ib4876f4c4d39fc87f86788d8611838b8078e4aac
Signed-off-by: Vladimir Saveliev <vlaidimir.saveliev@hpe.com>
Reviewed-on: https://review.whamcloud.com/45375
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh

index 9edc416..094c3bd 100755 (executable)
@@ -27559,15 +27559,24 @@ test_817() {
 run_test 817 "nfsd won't cache write lock for exec file"
 
 test_818() {
-       mkdir $DIR/$tdir
-       $LFS setstripe -c1 -i0 $DIR/$tfile
-       $LFS setstripe -c1 -i1 $DIR/$tfile
+       test_mkdir -i0 -c1 $DIR/$tdir
+       $LFS setstripe -c1 -i0 $DIR/$tdir/$tfile
+       $LFS setstripe -c1 -i1 $DIR/$tdir/$tfile
        stop $SINGLEMDS
+
+       # restore osp-syn threads
+       stack_trap "fail $SINGLEMDS"
+
        #define OBD_FAIL_OSP_CANT_PROCESS_LLOG          0x2105
        do_facet $SINGLEMDS lctl set_param fail_loc=0x80002105
        start $SINGLEMDS $(mdsdevname ${SINGLEMDS//mds/}) $MDS_MOUNT_OPTS ||
                error "start $SINGLEMDS failed"
        rm -rf $DIR/$tdir
+
+       local testid=$(echo $TESTNAME | tr '_' ' ')
+
+       do_facet mds1 dmesg | tac | sed "/$testid/,$ d" |
+               grep "run LFSCK" || error "run LFSCK is not suggested"
 }
 run_test 818 "unlink with failed llog"