From e5346a494fcb54b7f9fbc7ed4fb93003a8489231 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 31 Jan 2020 17:55:23 -0700 Subject: [PATCH] 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 --- lustre/tests/sanity.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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" -- 1.8.3.1