From: Andreas Dilger Date: Sat, 1 Feb 2020 00:55:23 +0000 (-0700) Subject: LU-12747 tests: wait properly for orhpan thread stop X-Git-Tag: 2.13.53~231 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=e5346a494fcb54b7f9fbc7ed4fb93003a8489231;hp=e16e3d46ee8c44e691c5cd3d25161f2f297fa0fd LU-12747 tests: wait properly for orhpan thread stop Use wait_update_facet() to check if the MDD orphan cleanup thread has exited, rather than a fixed 5s timeout. We can hope that most cases will finish faster than 5s, but don't gratuitously fail if it takes somewhat longer. We clearly aren't having a fatal problem here, or there would be serious failures at cleanup time. Fixes: fffef5c29e3b ("LU-11418 mdd: delete name if orphan doesn't exist") Test-Parameters: trivial testlist=sanity envdefinitions=ONLY=811,ONLY_REPEAT=100 Signed-off-by: Andreas Dilger Change-Id: I16b0281a519d47b5b98d495bf17040153c3ebbe5 Reviewed-on: https://review.whamcloud.com/37395 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Lai Siyao Reviewed-by: James Nunez Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 5ad991c..8ac81384 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -22681,8 +22681,7 @@ test_811() { stop mds1 start mds1 $(mdsdevname 1) $MDS_MOUNT_OPTS - sleep 5 - [[ $(do_facet mds1 pgrep orph_.*-MDD | wc -l) -eq 0 ]] || + wait_update_facet mds1 "pgrep orph_.*-MDD | wc -l" "0" || error "MDD orphan cleanup thread not quit" } run_test 811 "orphan name stub can be cleaned up in startup"