New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: twister: fix false negative in device test #45943
test: twister: fix false negative in device test #45943
Conversation
a79a810
to
2e96836
Compare
d566c8a
to
d26d75a
Compare
11e8817
to
280b41e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment, thanks!
@gopiotr can you help to review this while anas is on vocation? |
Verified while test is hang, results matched both in log and xml.
with this patch:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't have time to go fully through the decision tree to see if this won't break anything else. However, I believe the status shouldn't be failure. Failures are reserved for failing asserts. If we cannot verify the result it is error
. I also opt for reason: Timeout
.
I am on a leave and will have limited online activity till ZDS. Please dismiss my review when you fix the status and reason, or when others say my comment is wrong.
in device test when harness is Test, if there is no console output, the self.state is None, as at this time self.instance.state is "pass", as the last step cmake is "pass". So it will report "pass", but actually there is no console output issue you can easily reproduce this issue by set line='' at the begining of the Test.handle function fixing: zephyrproject-rtos#45942 Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
I update the state to "error", and the reson is "No Console Output(Timeout)" |
280b41e
to
b190abb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the error message here is not a critical point and can be discussed. It fixed a problem that judges failed testcases as passed due to not giving them an initial state and also not getting the correct status.
@hakehuang can you please confirm that this will fix #45904 ? |
@gopiotr could you please review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a little confused with the reason "No Console Output", yes, nothing output is one condition, but also may get some output which is not our expected, or just half results due to test hang there. Anyway, it doesn't matter this fix.
the #45904 has two issues, one is the target board dead issue, which is not twister related. Two is the false pass report, which is fixed by this PR. |
if there is any console output, the output judge code will catch then, but if there is no console output at all for given cases, then this problem happens. |
Only when we catch
|
based on below code, PASS/FAIL/FAULT all will all impact result
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hakehuang thank you a lot for this bugfix :)
in device test when harness is Test, when there is no console output, the self.state is None,
as at this time the test instance self.instance.state is "pass", as the last step cmake is "pass".
so it will report "pass", but actually there is no console output issue
you can easily reproduce this issue by set
line='' at the begining of the Test.handle function
Fixes #45942
Fixes #45904
Signed-off-by: Hake Huang hake.huang@oss.nxp.com