twister: Twister cannot properly handle runners errors (flashing) #32478
Labels
area: Twister
Twister
bug
The issue is a bug, or the PR is fixing a bug
priority: medium
Medium impact/importance bug
Describe the bug
Errors occurring during flashing devices are not handled properly. There are several scenarios related to this issue.
I am able to reliably reproduce it on nrf5340 board, which raises errors during programming when app protected is not disabled, however, I see the same issues occasionally on other boards when an error occurs during programming.
Scenarios:
1.) configuration: when '--ninja' is used (both with and without
--hardware-map
): the test fails as soon as there is an error (which is good). However, the fail is reported asFAILED Cmake build failure (device)
and treated as build error. Therefore, using--retry-failed
does not retries such failures (which is bad).--retry-failed
is used2.) configuration: without
--ninja
and without--hardware-map
: the test ends only after timeout, even though "make" reports earlier there was a fail (Makefile:748: recipe for target 'flash' failed
). This adds ~60s of wasted time to the test suite which can stack to some meaningful time in big test suites. In this scenario,--retry-failed
works as it should3.) configuration: without
--ninja
and with--hardware-map
: Similar to 2.). This time, the output aboutmake flash
failing is not printed out. The rest is the same. Tests can be retried but are terminated only by timeouts.The fact that hardware-related errors are seen as build errors results in printing out/saving in the report a lot of useless information which hinders the real issues. In such a case the full build log is dumped, even though the building was fine.
Impact
Can significantly increase the execution time for big test suites. Failed tests might not get retried. Hinders real errors with full build logs.
Environment (please complete the following information):
Additional context
@nashif I also wonder if this could be the cause for "log mixing" problem #25719. I saw in my setups, that when flashing failed, the already programmed app can be executed giving not matching output.
The text was updated successfully, but these errors were encountered: