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

Need help on coverage mode test #542

Open
trdthg opened this issue Oct 23, 2024 · 3 comments
Open

Need help on coverage mode test #542

trdthg opened this issue Oct 23, 2024 · 3 comments

Comments

@trdthg
Copy link
Contributor

trdthg commented Oct 23, 2024

I'm just running a very basic coverage test with the following command

riscof coverage --config=config.ini --suite=riscv-arch-test/riscv-test-suite/ --env=riscv-arch-test/riscv-test-suite/env \
    --cgf-file=./riscv-arch-test/coverage/dataset.cgf \
    --cgf-file=./riscv-arch-test/coverage/i/rv64i.cgf \
    --cgf-file=./riscv-arch-test/coverage/priv/rv64i_priv.cgf

spike_isa.yaml just enable RV64I:

hart_ids: [0]
hart0:
  ISA: RV64I
  physical_addr_sz: 56
  User_Spec_Version: '2.3'
  supported_xlen: [64]

but all the coverage are 0

image

Is this normal?

@trdthg
Copy link
Contributor Author

trdthg commented Oct 31, 2024

So anyone can help? The riscof coverage documentation does not seem to provide any useful information to help me debug

My other PR #494 has also been stalled due to this issue

@UmerShahidengr
Copy link
Collaborator

@trdthg, that's certainly not normal. Since your command is not giving any error, and doing exactly what its inputs are asking it to do, inputs to this command are sail log, database.yaml file, and MakeFile (generated automatically in riscof_work folder). The main issue can be in sail log, if possible, can you please check (and share) if sail log is getting generated correctly and tests are working fine?
In normal cases, tests are run on sail, its log is generated, and passed to ISAC for parsing. If the tests are not passing or sail log is empty, then ISAC will be getting empty files and will give no coverage.

@UmerShahidengr
Copy link
Collaborator

Or there is another possibility as well, recently I posted an issue at sail related to its log format change (details here), in response to that issue, sail has added a command line argument called --trace (more details here), adding this command line argument in riscof plugin (just like I have added here) will generate the sail log as required by ISAC.
Possibly you have not added this command line argument, and getting a wrong sail log format, which is causing this zero coverage issue.

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

2 participants