Repository navigation
Conversation
An entry with 'retry: N' only marks a flaky test which should run again. It does not accept the failure as a known issue. Add find_retry_entry() to look it up, and make find_whitelist_entry() skip such entries. Both share the key walk, now in _find_entries().
| $result_export = $self->run_attempt($tinfo); | ||
| last unless ($self->{result} // '') eq 'fail'; | ||
|
|
||
| $entry = LTP::WhiteList->new()->find_retry_entry($self->{ltp_env}, $runfile, $test->{name}); |
There was a problem hiding this comment.
very nit: I'm always a bit scared of while (1), I'd prefer to have for loop, which somehow evaluates the conditions.
There was a problem hiding this comment.
very nit: I'm always a bit scared of
while (1), I'd prefer to have for loop, which somehow evaluates the conditions.
I can't think of any better way to avoid while (1) and I think it is fine with definite exit checks -
the run didn't fail, or no retries are left.
If the known issues have a 'retry: N' entry for a failed test, run it again in the same module, up to N more times. A passing run makes the module a softfail, otherwise it fails as before. 'retval' and 'log' regex limits the retry to a known failure message. run() now loops over run_attempt(), which holds its old body.
|
Something related to restarts (not to known issues): reconnect_mgmt_console sporadic failures would be great if they get restarted automatically. |
openQA can restart conditionally based on result, but I didn't try it. |
czerw
left a comment
There was a problem hiding this comment.
Two prose fixes: the second commit message says 'retval' and 'log' regex limits the retry - s/regex limits/regexes limit/; it stays in git history, so it needs an amend. In this description: s/cost machine time/costs machine time/.
|
|
||
| =cut | ||
|
|
||
| sub find_retry_entry { |
There was a problem hiding this comment.
No unit test covers find_retry_entry or the skip of retry entries in find_whitelist_entry, so a regression there would pass CI silently. Add cases to t/07_ltp_whitelist.t.
rbmarliere
left a comment
There was a problem hiding this comment.
Kselftests VR https://openqa.suse.de/tests/25347940 -- no regression
Overall LGTM!
Some LTP tests sporadically fail for known reasons and pass when run again, we do not add them in known issues to softfail, so that we do not hide any bugs. So the only remedy is to restart the job (several times), which reruns every test/module in that job and that cost machine time and delays QA process unnecessarily.
This provides an option to add
retry: Nentries for such issues to the known issues file. If a failed test has a matching entry, only that test is run again in the same module, up to N more times...._retry<N>).retryentry are not affected.retvaland the newlogselector (regex on the test fail log) limit the retry to the known failure.A
retryentry does not accept the failure as a known issue.find_whitelist_entry()skips it, so a known issue for the same test needs its own entry. Kernel errors on the serial console are checked once, after the last run, so a kernel error from a failed run still fails the module.Verification runs:
Baseline example: https://openqa.suse.de/tests/24866419 (check the failed tests and follow the cloned chain)
with this PR:
ksm0_* :
https://openqa.suse.de/tests/25314604#step/ksm04/16
https://openqa.suse.de/tests/25314596#step/ksm02/16
https://openqa.suse.de/tests/25314598#step/ksm04_1/16
with retry entry
memcg_ :
https://openqa.suse.de/tests/25317929#step/memcg_stat_rss/16
https://openqa.suse.de/tests/25317937#step/memcg_stat_rss/24
https://openqa.suse.de/tests/25317932#step/memcg_stat/16
https://openqa.suse.de/tests/25317941#step/memcg_subgroup_charge/16
https://openqa.suse.de/tests/25317933#step/memcg_move_charge_at_immigrate/24 (retries getting exhausted)
with retry entry
pids_9_ :
https://openqa.suse.de/tests/25255329#step/pids_9_100/16
https://openqa.suse.de/tests/25255331#step/pids_9_50/16
https://openqa.suse.de/tests/25255350#step/pids_9_10/16