Comments (7)
Yep, that's very wrong. A lot of these inline assertions are wrong -- the only correct way to run the tests is to compile the test suite without them, via make RISCV_TARGET=spike
.
from riscv-arch-test.
I don't think a lot of assertions are wrong, infact for the rv32i
testset this is the only one that doesn't work for my port.
from riscv-arch-test.
Well, some of the assertion macros are wrong even though they pass on most platforms, since they introduce side effects that change the outcome of the test. I-ADD-01.S is an example; line 84 asserts that a register should be 0 when it should be 1; however, the assertion passes anyway because the register ends up getting set to 0 by the macro itself. See below email from a few days ago to the compliance working group:
The macros are target dependent and are implemented in compliance_io.h, e.g. RVTEST_IO_ASSERT_GPR_EQ. Some registers are said to be reserved and are used by the tests.
False errors get reported by macros because the checked value is a side effect of the macro implementation. As an example rv32i/src/I-ADD-01.S line 84: the code asserts x5 is 0, but the signature checks it should be 1.
The macros are pretty useful because they basically run in many environments. The asserted value should check the real value, and not a side effect of the checking macro. If a macro is using reserved registers, then it should check it and not execute it if a conflict occurs. It is likely possible to use target specific macros that can use fixed memory locations to swap registers and thus avoid solve reserved register issues.
Last comment: by not implementing the macros, it is possible to skip it. If macros are choosen, it is however not possible to skip saving the signature to memory. It would probably save memory and accelerate tests if it was possible to disable signature saving when using self-checking macros.
from riscv-arch-test.
I believe this assertion is incorrect as it uses a fixed value in an address.
In fact it is not a good idea to assert on any register whose value is derived from a relocatable address (from the linker script)
Additionally use of the pre-defined reserved registers is also not compatible with the ASSERT.
This specific ASSERT needs to be removed, and we need to do a sweep of the tests to ensure reserved registers are not used in ASSERTs
from riscv-arch-test.
I just cloned the riscv repo, run the compliance suite and encountered these failures. So the good news is its repeatable. 😄 However, this issue has not been commented on for almost 10 months and is currently not assigned to anyone. How can we move this issue along?
from riscv-arch-test.
I just looked at the latest code, and it doesn't resemble the code above. The newest version has an explicit scratch register in the macro arguments, and doesn't check the contents of the scratch register. Could you ensure you ran this with the latest? E.g. the example above has : RVTEST_IO_ASSERT_GPR_EQ(x27, 0x89ABCDEF) while the latests tests look like RVTEST_IO_ASSERT_GPR_EQ(x2, x26, 0x7654321)
from riscv-arch-test.
This issue no longer exists as the macros have been updated in the test and there is no longer checks on the contents on the signature section
from riscv-arch-test.
Related Issues (20)
- Trap Handler Issue in S Mode with Virtualization Enabled HOT 3
- e7d4b281 & bf5ca309 in the ref's signature HOT 2
- RVTEST_ISA for privileged spec 1.12 HOT 4
- mtrap_sigptr issue HOT 2
- How to generate tests for RV64D and RV64F using riscv-ctg? HOT 5
- privilege spec 1.11 (2019) is generating mstatush CSR in trap handler which is not defined in that version. HOT 3
- Need to check minsret for all tests that have deterministic# of instructioni
- Hypervisor Extension enable issue HOT 5
- Compiling Zca tests HOT 5
- Wrong satp setup in arch_test.h HOT 7
- Should cgfs be checked in instead of generated tests HOT 8
- Continued missing coverage for x0/non-x0 on registers (when all registers are the same)
- Atomic Test cases for amominu (and potentially others) Sail is not generating the correect signature HOT 1
- RVMODEL_IO_ASSERT_GPR_RQ used for float point registers HOT 2
- Example models where asserts are actually defined/used? HOT 6
- ecall check fails in CLIC mode HOT 5
- mode bits inside "vector" entry in signature
- Test misalign-jal-01.S generates compressed instruction for platforms that support only RV32I HOT 7
- Floating point tests are enormous HOT 4
- jalr-01.S fails with illegal operands on latest binutils 2.42 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from riscv-arch-test.