From: Andreas Dilger Date: Tue, 10 Mar 2020 22:00:25 +0000 (-0600) Subject: LU-13352 tests: fix subtest duration for ONLY_REPEAT X-Git-Tag: 2.13.54~150 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=d76093613f063e58ec440145338dbea9d18a2a25;hp=e35b7751f49fb7044955e3fa65de5e1a6d638ca0 LU-13352 tests: fix subtest duration for ONLY_REPEAT 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 Change-Id: I0758df03ceb12c3c7c8d9cd62561d4ee7b3ebbe5 Reviewed-on: https://review.whamcloud.com/37872 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Wei Liu Reviewed-by: James Nunez Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index ec10c3f..d994b5a 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -6534,7 +6534,7 @@ run_one_logged() { 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