lowRISC / lowRISC/opentitan

[dvsim] Do not fail build step if build_fail_patterns matches, but exit code is 0

Open
#7,348 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component:DV Component:Tooling Earlgrey-PROD Triaged
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

FuseSoC returns a non-zero exit code it if failed, but a zero exit-code otherwise. If the exit code is 0, the STDOUT should be ignored and not parsed for additional error messages.

In https://github.com/lowRISC/opentitan/pull/6875 we disabled the fail patterns completely for the build step, but a better solution would be:

> I think a better approach is to look for the set fail patterns only if non-zero exit code is returned. That would of course apply only to the build step - simulation runs return zero exit code even the test actually failed so we do need to look for the error patterns in the log.

See https://github.com/lowRISC/opentitan/pull/6875 for detailed information on what caused this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the dvsim build-step handling and review the behavior described in pull request 6875. Verify that build output is handled differently for zero and non-zero exit codes, while simulation runs still use the configured error patterns; done means the build no longer fails on matching output when its exit code is zero.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.