From: Andreas Dilger Date: Tue, 7 Dec 2021 19:12:00 +0000 (-0700) Subject: LU-15338 tests: check whole jobid in sanity 205a X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=ab374f0f56fc1120482c2afce9d764901dfb57f4;p=fs%2Flustre-release.git LU-15338 tests: check whole jobid in sanity 205a Check the whole jobid string in sanity test_205a to avoid matching a substring of the jobid twice. This could only currently happen for the second "dd" test, at a rate about 1/8192, but might also fail in the future if other tests are added. Lustre-change: https://review.whamcloud.com/45774 Lustre-commit: 1ee894a4355ecec869754c0b6c566c0e187e27a7 Test-Parameters: trivial testlist=sanity env=ONLY=205a,ONLY_REPEAT=200 Signed-off-by: Andreas Dilger Change-Id: I34b7ed1a7825e3fbad9ea8666fccb2bdc53ebbe5 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52294 Tested-by: jenkins Tested-by: Maloo --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 4375a8d..90e2bac 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -18851,8 +18851,8 @@ verify_jobstats() { local stats="*.$(convert_facet2label $facet).job_stats" # strip out libtool wrappers for in-tree executables - if [ $(do_facet $facet lctl get_param $stats | - sed -e 's/\.lt-/./' | grep -c $JOBVAL) -ne 1 ]; then + if (( $(do_facet $facet lctl get_param $stats | + sed -e 's/\.lt-/./' | grep -cw $JOBVAL) != 1 )); then do_facet $facet lctl get_param $stats error "No jobstats for $JOBVAL found on $facet::$stats" fi