Print the subtest iteration number/duration in the subtest banner
so that it is more visible across all of the nodes. Otherwise, it
is only printed via "echo" into the full test script run log, and
is not shown in most of the per-subtest logs in Maloo.
Test-Parameters: trivial testlist=sanity env=ONLY=1,ONLY_REPEAT=10
Fixes:
e16e3d46 ("LU-13169 tests: add ONLY_REPEAT parameter to repeat subtests")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ic13196e9bc17a51a1af7a0b5aecaafe3c5349a4c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56883
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
export ONLY_REPEAT_ITER=1
while true; do
local before_sub=$SECONDS
+ local iter
log_sub_test_begin $TESTNAME
# remove temp files between repetitions to avoid test failures
if [[ -n "$append" ]]; then
[[ -n "$tdir" ]] && rm -rvf $DIR/$tdir*
[[ -n "$tfile" ]] && rm -vf $DIR/$tfile*
- echo "subtest iteration $ONLY_REPEAT_ITER/$repeat " \
- "($(((SECONDS-before)/60))/$ONLY_MINUTES min)"
+ iter=" (repeat $ONLY_REPEAT_ITER/$repeat iter, $(((SECONDS-before)/60))/$ONLY_MINUTES min)"
fi
# loop around subshell so stack_trap EXIT triggers each time
- (run_one $testnum "$testmsg") 2>&1 | tee -i $append $test_log
+ (run_one $testnum "$testmsg$iter") 2>&1 | tee -i $append $test_log
rc=${PIPESTATUS[0]}
local append=-a
local duration_sub=$((SECONDS - before_sub))