Whamcloud - gitweb
LU-16198 tests: increase margin for sanity/33hh 13/48713/3
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 30 Sep 2022 22:25:52 +0000 (16:25 -0600)
committerOleg Drokin <green@whamcloud.com>
Sat, 15 Oct 2022 05:57:38 +0000 (05:57 +0000)
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 <adilger@whamcloud.com>
Change-Id: If63528c4281e543975454d1d84306b0dfcfc0fff
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48713
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/tests/sanity.sh

index 2c1711b..f3d1618 100755 (executable)
@@ -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"
 }