Skip to content
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

debug: Fix tests so they pass/not_applicable on HiFive1 #488

Open
timsifive opened this issue Jun 30, 2023 · 3 comments
Open

debug: Fix tests so they pass/not_applicable on HiFive1 #488

timsifive opened this issue Jun 30, 2023 · 3 comments
Assignees

Comments

@timsifive
Copy link
Collaborator

#485 introduces a list of tests that are known to cause an error on HiFive1. This issue is to go through that list, and fix the tests/infrastructure/whatever so that all these tests either pass, or return not_applicable.

@timsifive timsifive changed the title Fix tests so they pass/not_applicable on HiFive1 debug: Fix tests so they pass/not_applicable on HiFive1 Jun 30, 2023
@TommyMurphyTM1234
Copy link
Contributor

Hi @timsifive (and/or others) - I'm a bit confused about the how exactly specific tests are categorised as "not_applicable".
If I use the following (i.e. without appending --exclude-tests hifive1_excludes.yaml to specify the HiFive1 specific exclude list):

./gdbserver.py targets/SiFive/HiFive1.py

then I get this:

:::::::::::::::::::::::::::[ ran 72 tests in 355s ]:::::::::::::::::::::::::::
18 tests returned not_applicable
43 tests returned pass
5 tests returned fail
   EtriggerTest > logs/20231006-114621-HiFive1-EtriggerTest.log
   IcountTest > logs/20231006-114642-HiFive1-IcountTest.log
   InstantHaltTest > logs/20231006-114655-HiFive1-InstantHaltTest.log
   Semihosting > logs/20231006-114937-HiFive1-Semihosting.log
   SemihostingFileio > logs/20231006-114944-HiFive1-SemihostingFileio.log
6 tests returned exception
   Hwbp2 > logs/20231006-114632-HiFive1-Hwbp2.log
   ItriggerTest > logs/20231006-114713-HiFive1-ItriggerTest.log
   MemTestReadInvalid > logs/20231006-114826-HiFive1-MemTestReadInvalid.log
   MemorySampleMixed > logs/20231006-114833-HiFive1-MemorySampleMixed.log
   MemorySampleSingle > logs/20231006-114845-HiFive1-MemorySampleSingle.log
   RepeatReadTest > logs/20231006-114931-HiFive1-RepeatReadTest.log

What I don't understand is what dictates this:

18 tests returned not_applicable

I've skimmed the Python scripts but cannot answer this question so far.
Can anybody else?
Thanks.

@TommyMurphyTM1234
Copy link
Contributor

TommyMurphyTM1234 commented Oct 6, 2023

Ah - I think I get it now - class Target sets certain attributes to default values that disable certain tests because they depend on specific target capabilities/features. Those tests are only enabled if a specific target derived from class Target (e.g. class HiFive1) overrides the relevant attributes in order to declare support for the tests/required capabities?

Specifically - the following tests are assumed to be "not_applicable" by default and the list links to the relevant class Target attributes and checks in gdbserver.py:

@timsifive
Copy link
Collaborator Author

Right. The not_applicable() method is older than the HiFive1 exclusion list. In theory it's more flexible if we add support for more hardware in the future. In practice I haven't really kept it up-to-date. Ideally the tests/target definitions would be updated so that HiFive1 wouldn't need the separate exclusion list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants