Whamcloud - gitweb
LU-13352 tests: fix subtest duration for ONLY_REPEAT 72/37872/3
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 10 Mar 2020 22:00:25 +0000 (16:00 -0600)
committerOleg Drokin <green@whamcloud.com>
Fri, 1 May 2020 04:27:11 +0000 (04:27 +0000)
The subtest duration printed when the test passes was the total
elapsed time rather than the per-iteration time.  Print the
per-subtest time at the end of each iteration.

Fixes: e16e3d46ee8c ("LU-13169 tests: add ONLY_REPEAT parameter to repeat subtests")
Test-Parameters: trivial testlist=sanity env=ONLY=76,ONLY_REPEAT=10
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I0758df03ceb12c3c7c8d9cd62561d4ee7b3ebbe5
Reviewed-on: https://review.whamcloud.com/37872
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/test-framework.sh

index ec10c3f..d994b5a 100755 (executable)
@@ -6534,7 +6534,7 @@ run_one_logged() {
                        TEST_STATUS="PASS"
                fi
 
                        TEST_STATUS="PASS"
                fi
 
-               pass "$testnum" "($((SECONDS - before))s)"
+               pass "$testnum" "(${duration_sub}s)"
                log_sub_test_end $TEST_STATUS $duration_sub "$rc" "$test_error"
                [[ $rc != 0 ]] && break
        done
                log_sub_test_end $TEST_STATUS $duration_sub "$rc" "$test_error"
                [[ $rc != 0 ]] && break
        done