Whamcloud - gitweb
LU-15338 tests: check whole jobid in sanity 205a 74/45774/3
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 7 Dec 2021 19:12:00 +0000 (12:12 -0700)
committerOleg Drokin <green@whamcloud.com>
Thu, 23 Dec 2021 07:20:38 +0000 (07:20 +0000)
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.

Test-Parameters: trivial testlist=sanity env=ONLY=205a,ONLY_REPEAT=200
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I34b7ed1a7825e3fbad9ea8666fccb2bdc53ebbe5
Reviewed-on: https://review.whamcloud.com/45774
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Elena Gryaznova <elena.gryaznova@hpe.com>
Reviewed-by: Etienne AUJAMES <eaujames@ddn.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>

index feff64f..7d1d366 100755 (executable)
@@ -18319,8 +18319,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"