-
Notifications
You must be signed in to change notification settings - Fork 7.4k
twister: Adjust status for quarantined instances #90617
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
Conversation
5f04812
to
b7939b7
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.
Don't you want to have also information about quarantined tests on the console in Summary report?
Summary
├── Total test suites: 6
├── Processed test suites: 6
│ ├── Filtered test suites: 5
│ │ ├── Filtered test suites (static): 5
│ │ └── Filtered test suites (at runtime): 0
│ └── Selected test suites: 1
│ ├── Skipped test suites: 0
│ ├── Passed test suites: 1
│ ├── Built only test suites: 0
│ ├── Failed test suites: 0
│ └── Errors in test suites: 0
└── Total test cases: 7
├── Filtered test cases: 5
└── Selected test cases: 2
├── Passed test cases: 2
├── Skipped test cases: 0
├── Built only test cases: 0
├── Blocked test cases: 0
├── Failed test cases: 0
└── Errors in test cases: 0
I've tested with command:
./scripts/twister -T samples/hello_world -T samples/subsys/testsuite/pytest/shell -T samples/basic/blinky -vv --west-flash --device-testing --hardware-map hardware_map.yml --quarantine-list quarantine.yaml --no-clean
where quarantine file:
- scenarios:
- sample.basic.helloworld
platforms:
- nrf54l15dk/nrf54l15/cpuapp
- scenarios:
- .*.vt100_colors_off
- sample.harness.shell
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 do not know if someone is using generated files: twister_suite_report.xml
and twister_report.xml
:
see line 778:
self.xunit_report(json_file, filename + ".xml", full_report=False)
self.xunit_report(json_file, filename + "_report.xml", full_report=True)
self.xunit_report_suites(json_file, filename + "_suite_report.xml")
but in generated files the skipped
counters is set to 0 (proper value only in twister.xml
)
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.
this is an oversight on my side, I will fix it. thanks
why does this need to be a new status? Did you consider using SKIPPED instead with a reason that indicates it is because of quarantine? |
@nashif I believe that having a dedicated (native) status for quarantined tests would signify the difference between such tests and tests that where skipped/filtered by other reasons. I think there is a psychological effect, where people would ignore filtered/skipped tests (as something that is expected) but seeing quarantined could raise their awareness (similarly to a warning in logs). However, I am opened to suggestions/counter opinions. We can briefly ask other testers what's their take on this. |
Moving them from FILTERED to SKIPPED would get you this visibility IMO, anything we have marked as SKIPPED right now, should have exactly the same scrutiny and attention, there is not much special about quarantine beside the fact it is managed, however, if a test is skipped because of overflows, it is a test that was not executed and needs exactly the same attention. see here https://github.com/zephyrproject-rtos/zephyr/runs/43108372284 for example, skipped tests are already listed, nothing special to be done and it is already supported by various tooling. |
@gchwier I didn't want to change counting in this PR. My idea was to first fix quarantine test not present in reports and achieve this by introducing a new status. In a follow up PR I plan to further modify some behaviors, like having separate counter and addressing if quarantine tests should be more verbose in twisters output. |
@nashif I understand that there are multiple ways to address quarantine tests in reports:
IMO the most transparent solution is to have the dedicated status. |
skipped is not necessarily "runtime". Those things that are being skipped right now could be considered quarantied at runtime as well, we could also list those test with 'skip: True' as skipped and report them.
That does not provide any value, filtered are things I really do not care about. Those are tests that not supppoed to be run and do not need tracking
The way I see it, this is the intended usecase for skipped, coming up with another status is an overkill, non-standard and requires lots of adaption to tooling. In the past we used skipped for many other things, but looking at what we have right now, those are actually things we can act on and need attention. |
Verbosity >1 should be enough to see filtered tests. Coupling it with debug logging level makes the output messy. Signed-off-by: Maciej Perkowski <maciej.perkowski@nordicsemi.no>
@nashif As suggested, I change quarantined statuses to skipped |
@@ -114,7 +114,7 @@ def twister(options: argparse.Namespace, default_options: argparse.Namespace): | |||
if i.status == TwisterStatus.FILTER: | |||
if options.platform and not tplan.check_platform(i.platform, options.platform): | |||
continue | |||
logger.debug( | |||
logger.info( |
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.
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.
If I understand the issue is the length of messages, and not the change in logger level, right?
I am worried that unify field for a number might not work, since quarantine is not only for upstream zephyr. We use it also linking to internal tickets, and I assume some users might not even care that much about such linking in their projects.
What about some simplified generic comment: "Quarantined, check reports for details", or even just "Quarantined"?
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.
If I understand the issue is the length of messages, and not the change in logger level, right?
yes, putting a freestyle comment in the output here is asking for trouble. A comment might be anything.
I am worried that unify field for a number might not work, since quarantine is not only for upstream zephyr.
Then do not use it downstream, or use your own numbering scheme or whatever, not using it downstream is not a good reason for not adding features and usabiliy upstream.
We use it also linking to internal tickets, and I assume some users might not even care that much about such linking in their projects. What about some simplified generic comment: "Quarantined, check reports for details", or even just "Quarantined"?
This is not linking anything, this is a reference only, if an issue field exists, it will be shown as:
Quarantied: see #<issue number>
instead of a full link based on a comment.
issue number can be anything and you can use your own numbering/reference scheme downstream.
For now, you can just leave it as "Quarantined", that reference field thing can be done later.
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.
btw now we already will need some differentiation between "quarantine" skips and "other" skips, (not showing the whole reason in logs). I like the idea of some extra formatting field for issue number, but please keep in mind that it will add even more tricky handling of skip types at reporting level. that's why I preferred to have a dedicated status for quarantined items.
ok, i can see those reported as skipped in twister.json, but shouldnt those skipped tests actually be reported on the screen as skipped as well? I am getting nothing righ now:
|
Also
that one is correct.
That one is not. AFAIK those skipped tests were never built? |
These outputs are "locked" with verbosity >1 to follow how "filtered" is handled. With the change to the logging level there, adding extra -v will enable skipped and filtered on the screen as well (before it also required adding Do you think skips should be visible already at verbosity>0? |
Skipped status fits quarantined items better than filtered. Filtered tests are by default removed from reports, which shouldn't be the case for quarantined tests. Adjust tests unit and blackbox tests accordingly. Signed-off-by: Maciej Perkowski <maciej.perkowski@nordicsemi.no>
|
Skipped status fits quarantined items better than filtered.
Filtered tests are by default removed from reports, which
shouldn't be the case for quarantined tests.
Adjust tests unit and blackbox tests accordingly.