From e17471792388e59f44040d48dd8138ec865663af Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 30 Sep 2022 16:25:52 -0600 Subject: [PATCH] LU-16198 tests: increase margin for sanity/33hh The filenames created by sanity test_33hh are randomly generated by "mktemp" and in some rare cases a larger number of filenames may fail the CRUSH2 hash detection for 'random' suffixes (all-numeric, all-uppercase, all-lowercase). This appears to be failing about 1/200 tests, but since sanity is run frequently (~1400 times/month) there are still occasional failures reported. Increase the maximum filename mismatch rate from 20% to 23%, which would have avoided all of the test failures in the past 3 months. Test-Parameters: trivial testlist=sanity mdscount=2 mdtcount=4 env=ONLY=33hh,ONLY_REPEAT=400 Fixes: 1ac4b9598a ("LU-15720 dne: add crush2 hash type") Signed-off-by: Andreas Dilger Change-Id: If63528c4281e543975454d1d84306b0dfcfc0fff Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48713 Reviewed-by: Arshad Hussain Reviewed-by: Sebastien Buisson Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- lustre/tests/sanity.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 2c1711b..f3d1618 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -4339,9 +4339,11 @@ sub_33h() { done done + # the number of "bad" hashes is random, as it depends on the random + # filenames generated by "mktemp". Allow some margin in the results. echo "$((same/${#patterns[*]}))/$count matches, expect ~$expect for $1" - (( same / ${#patterns[*]} < expect * 5 / 4 && - same / ${#patterns[*]} > expect * 4 / 5 )) || + (( same / ${#patterns[*]} <= expect * 9 / 7 && + same / ${#patterns[*]} > expect * 5 / 7 )) || error "MDT index match $((same / ${#patterns[*]}))/$count times" same=0 @@ -4363,9 +4365,11 @@ sub_33h() { done done + # the number of "bad" hashes is random, as it depends on the random + # filenames generated by "mktemp". Allow some margin in the results. echo "$((same/${#patterns[*]}))/$count matches, expect ~$expect for $1" - (( same / ${#patterns[*]} < expect * 5 / 4 && - same / ${#patterns[*]} > expect * 4 / 5 )) || + (( same / ${#patterns[*]} <= expect * 9 / 7 && + same / ${#patterns[*]} > expect * 5 / 7 )) || error "MDT index match $((same / ${#patterns[*]}))/$count times" } -- 1.8.3.1