Whamcloud - gitweb
LU-14613 tests: fix sanity/60f on a local setup 08/43308/3
authorAlex Zhuravlev <bzzz@whamcloud.com>
Wed, 14 Apr 2021 05:13:25 +0000 (08:13 +0300)
committerOleg Drokin <green@whamcloud.com>
Wed, 21 Apr 2021 03:15:38 +0000 (03:15 +0000)
as fail_loc is shared among client and server on a local setup,
it can hit just before rm -f $TMP/$tfile*. given it's marked
with FAIL_ONCE, the log won't be dumped again.
to fix this do cleanup rm earlier.

Test-Parameters: trivial
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ifd70335c44bfe2e1970e1441837dcb3545c40ab0
Reviewed-on: https://review.whamcloud.com/43308
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/tests/sanity.sh

index df4b8c8..8a58ac8 100755 (executable)
@@ -8054,10 +8054,10 @@ test_60f() {
 
        stack_trap "$LCTL set_param debug_path=$old_path"
        stack_trap "rm -f $TMP/$tfile*"
 
        stack_trap "$LCTL set_param debug_path=$old_path"
        stack_trap "rm -f $TMP/$tfile*"
+       rm -f $TMP/$tfile* 2> /dev/null
        #define OBD_FAIL_PTLRPC_DUMP_LOG         0x50e
        $LCTL set_param debug_path=$TMP/$tfile fail_loc=0x8000050e
        test_mkdir $DIR/$tdir
        #define OBD_FAIL_PTLRPC_DUMP_LOG         0x50e
        $LCTL set_param debug_path=$TMP/$tfile fail_loc=0x8000050e
        test_mkdir $DIR/$tdir
-       rm -f $TMP/$tfile* 2> /dev/null
        # retry in case the open is cached and not released
        for (( i = 0; i < 100 && $(ls $TMP/$tfile* | wc -l) == 0; i++ )); do
                echo $i > $DIR/$tdir/$tfile.$i && cat $DIR/$tdir/$tfile.$i
        # retry in case the open is cached and not released
        for (( i = 0; i < 100 && $(ls $TMP/$tfile* | wc -l) == 0; i++ )); do
                echo $i > $DIR/$tdir/$tfile.$i && cat $DIR/$tdir/$tfile.$i