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

Restored *32 attributes to RV_TESTCASE for 7 RV32M tests #411

Merged
merged 3 commits into from
Nov 19, 2023

Conversation

davidharrishmc
Copy link
Contributor

Description

This PR restores the *32 attribute to RV_TESTCASE for 7 RV32M tests that lost the attributed in commit 9b503d7 that was pulled recently. When the *32 attributes are missing, I got the following errors while running riscof.

ERROR | Error in test: /home/harris/cvwtest/cvw/addins/riscv-arch-test/riscv-test-suite/rv32i_m/M/src/divu-01.S
Test Selected without the relevant extensions being available on DUT.
...

Related Issues

Similar to PR410. I somehow missed the RV32 cases.

Ratified/Unratified Extensions

  • [ x] Ratified
  • Unratified

List Extensions

M

Reference Model Used

  • [x ] SAIL
  • Spike
  • Other - < SPECIFY HERE >

Mandatory Checklist:

  • [ x] All tests are compliant with the test-format spec present in this repo ?
  • [x ] Ran the new tests on RISCOF with SAIL/Spike as reference model successfully ?
  • [n/a ] Ran the new tests on RISCOF in coverage mode
  • [ n/a] Link to Google-Drive folder containing the new coverage reports (See this for more info): < SPECIFY HERE >
  • [ n/a] Link to PR in RISCV-ISAC from which the reports were generated : < SPECIFY HERE >
  • [x ] Changelog entry created with a minor patch

Optional Checklist:

  • RISCV-V CTG PR link if tests were generated using it : < SPECIFY HERE >
  • [x ] Were the tests hand-written/modified ?
  • Have you run these on any hard DUT model ? Please specify name and provide link if possible in the description
  • If you have modified arch_test.h Please provide a detailed description of the changes in the Description section above.

Copy link
Collaborator

@allenjbaum allenjbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This completely fixes what appears to be a partial fix for RV32 in PR404, which PR410 fixed for RV64

@allenjbaum allenjbaum merged commit ede040f into riscv-non-isa:main Nov 19, 2023
1 check passed
@mariohoff
Copy link

mariohoff commented Nov 19, 2023

Hello, I just tried to run the riscof-framework against my RISC-V CPU and check my current state.
Yesterday the test ran fine (despite having some failing tests) and today I noticed that python gave me a syntax error. Now I have seen this pull-request and I am wondering if there is a typo in there. Shouldn't it be "regex(...)" instead of "regexp(...)"?
The test format spec only mentions "regex(...)", too.
https://github.com/riscv-non-isa/riscv-arch-test/blob/main/spec/TestFormatSpec.adoc#writing-the-arguments-for-rvtest_case-macro

Semi-related is my error output from the riscof-framework:
(Look like they only check for "regex" too https://github.com/riscv-software-src/riscof/blob/master/riscof/framework/test.py#L124 )
So I am not sure which one is wrong currently.

Traceback (most recent call last):
  File "/home/user/dev/FPGA_dev/mrv32/riscof/env/bin/riscof", line 8, in <module>
    sys.exit(cli())
  File "/home/user/dev/FPGA_dev/mrv32/riscof/env/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/user/dev/FPGA_dev/mrv32/riscof/env/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/user/dev/FPGA_dev/mrv32/riscof/env/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/user/dev/FPGA_dev/mrv32/riscof/env/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/user/dev/FPGA_dev/mrv32/riscof/env/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/user/dev/FPGA_dev/mrv32/riscof/env/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/user/dev/FPGA_dev/mrv32/riscof/env/lib/python3.10/site-packages/riscof/cli.py", line 236, in testlist
    test_routines.generate_test_pool(isa_specs, platform_specs, work_dir)
  File "/home/user/dev/FPGA_dev/mrv32/riscof/env/lib/python3.10/site-packages/riscof/framework/test.py", line 315, in generate_test_pool
    include = include and eval_cond(condition, spec)
  File "/home/user/dev/FPGA_dev/mrv32/riscof/env/lib/python3.10/site-packages/riscof/framework/test.py", line 131, in eval_cond
    elif ast.literal_eval(temp[1]) == node:
  File "/usr/lib/python3.10/ast.py", line 64, in literal_eval
    node_or_string = parse(node_or_string.lstrip(" \t"), mode='eval')
  File "/usr/lib/python3.10/ast.py", line 50, in parse
    return compile(source, filename, mode, flags,
  File "<unknown>", line 1
    regexp(.*32.*)
           ^
SyntaxError: invalid syntax

Edit: If I change it back to "regex", I get the same results as I did yesterday evening.
Edit2: Using this command: find . -type f -name '*.S' -exec sed -i 's/regexp(/regex(/g' {} \;

Kind regards,
Mario

@davidharrishmc
Copy link
Contributor Author

This was my mistake. I tested the PR in a different copy of the repository, then incorrectly transcribed six of the regexp into my fork to make the PR. I've submitted PR412 to fix this. Yikes.

@allenjbaum
Copy link
Collaborator

allenjbaum commented Nov 20, 2023 via email

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

Successfully merging this pull request may close these issues.

3 participants