Whamcloud - gitweb
LU-10848 test: wait to process inodes in phase2
authorHongchao Zhang <hongchao@whamcloud.com>
Thu, 23 Sep 2021 21:41:06 +0000 (05:41 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 1 Oct 2021 00:16:46 +0000 (00:16 +0000)
In test_8 of sanity-lfsck, the "LF_INCONSISTENT" flag was set
when processing the inodes with corrupted LinkEA in phase2,
LFSCK could have no chance to process it yet because of the delay
OBD_FAIL_LFSCK_DELAY3.

Lustre-change: https://review.whamcloud.com/44658
Lustre-commit: 4efcd6f9b8f9bb768c6167a880777413950619c4

Test-Parameters: trivial testlist=sanity-lfsck env=ONLY=8,ONLY_REPEAT=20
Change-Id: Id414728c998d527fbc27f877c6d31dcedcc12457
Signed-off-by: Hongchao Zhagn <hongchao@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/45013
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/tests/sanity-lfsck.sh

index 78afb86..7521e78 100644 (file)
@@ -1100,6 +1100,9 @@ test_8()
                error "(22) unexpected status"
        }
 
+       # wait to process one inode at least (OBD_FAIL_LFSCK_DELAY3)
+       sleep 3
+
        local FLAGS=$($SHOW_NAMESPACE | awk '/^flags/ { print $2 }')
        [ "$FLAGS" == "scanned-once,inconsistent" ] ||
                error "(23) Expect 'scanned-once,inconsistent',but got '$FLAGS'"