[LU-13352] Test duration not reset when using ONLY_REPEAT test parameter Created: 10/Mar/20  Updated: 01/May/20  Resolved: 01/May/20

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.14.0
Fix Version/s: Lustre 2.14.0

Type: Bug Priority: Minor
Reporter: James Nunez (Inactive) Assignee: Andreas Dilger
Resolution: Fixed Votes: 0
Labels: test_script_improvements

Issue Links:
Related
is related to LU-13169 Allow test-framework to repeat subtests Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Since the patch that added the ability to repeat tests landed, LU-13169 patch https://review.whamcloud.com/37321/, the individual test timer does not reset. We only see this when using the ONLY_REPEAT test parameter.

Patch https://review.whamcloud.com/37827/ uses the test parameters:
Test-Parameters: trivial testlist=sanity env=ONLY=76,ONLY_REPEAT=100

Looking at the suite_log for https://testing.whamcloud.com/test_sessions/50e48384-6222-4d06-ace3-35582f9710a2, we see

…
CMD: trevis-67vm1.trevis.whamcloud.com,trevis-67vm2,trevis-67vm3,trevis-67vm4 dmesg
PASS 76 (36s)
== sanity test 76: confirm clients recycle inodes properly =========================================== 01:01:29 (1583542889)
before inodes: 24
after inodes: 24
…
CMD: trevis-67vm1.trevis.whamcloud.com,trevis-67vm2,trevis-67vm3,trevis-67vm4 dmesg
PASS 76 (359s)
== sanity test 76: confirm clients recycle inodes properly =========================================== 01:06:52 (1583543212)
…
CMD: trevis-67vm1.trevis.whamcloud.com,trevis-67vm2,trevis-67vm3,trevis-67vm4 dmesg
PASS 76 (363s)
== sanity test 76: confirm clients recycle inodes properly =========================================== 01:06:56 (1583543216)
before inodes: 24
after inodes: 24
…
PASS 76 (367s)

Maloo prints the Duration for each test correctly. The problem is in the suite log.

I think that we should be sending pass() duration_sub or use before_sub instead of before when calling pass()

6486         for testiter in $(seq ${repeat:-1}); do
6487                 local before_sub=$SECONDS
6488                 log_sub_test_begin $TESTNAME
6489 
6490                 # remove temp files between repetitions to avoid test failures
6491                 [ -n "$append" -a -n "$DIR" -a -n "$tdir" -a -n "$tfile" ] &&
6492                         rm -rf $DIR/$tdir* $DIR/$tfile*
6493                 # loop around subshell so stack_trap EXIT triggers each time
6494                 (run_one $testnum "$testmsg") 2>&1 | tee -i $append $test_log
6495                 rc=${PIPESTATUS[0]}
6496                 local append=-a
6497                 local duration_sub=$((SECONDS - before_sub))
6498                 local test_error
6499 
…
6514 
6515                 pass "$testnum" "($((SECONDS - before))s)"
6516                 log_sub_test_end $TEST_STATUS $duration_sub "$rc" "$test_error"
6517                 [[ $rc != 0 ]] && break
6518         done



 Comments   
Comment by Gerrit Updater [ 10/Mar/20 ]

Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/37872
Subject: LU-13352 tests: fix subtest duration for ONLY_REPEAT
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 71fdc54cfdbcf5af8f27f639dc2025052b71ca81

Comment by Gerrit Updater [ 01/May/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/37872/
Subject: LU-13352 tests: fix subtest duration for ONLY_REPEAT
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: d76093613f063e58ec440145338dbea9d18a2a25

Comment by Peter Jones [ 01/May/20 ]

Landed for 2.14

Generated at Sat Feb 10 03:00:32 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.