-
Notifications
You must be signed in to change notification settings - Fork 1
sim_trim_path_from_arch
- Status: WITHDRAWN
(Mike Frysinger fixed the bug with different approach) - Branch:
sim-trim-path-from-arch
- Tracking PR: #26 (view Pull Request and Diff)
- Mailing List:
- PATCH v1 (2022-07-14)
- PATCH v1 (resend to gdb-patches with new cover letter) (2022-08-27)
- PATCH v1 (PING 2) (2022-09-14)
- PATCH v1 (PING 3) (2022-09-21)
- PATCH v1 (PING 4) (2022-10-09)
When I tried to run make check-sim
on RISC-V (to test that I fixed a simulator bug on Zmmul
PATCH v2, I noticed that make check-sim
is somehow blocked.
This is an excerpt from sim/testsuite/riscv/allinsn/testrun.log
after I run make check-sim
for riscv64-unknown-elf
Binutils.
Running /path/to/binutils/sim/testsuite/./riscv/allinsn.exp ...
Can't find a compatible assembler
Executing on host: false /path/to/binutils/sim/testsuite/lib/compilercheck.c -E -o testsuite/./riscv/allinsn/compilercheck.x (timeout = 300)
spawn -ignore SIGHUP false /path/to/binutils/sim/testsuite/lib/compilercheck.c -E -o testsuite/./riscv/allinsn/compilercheck.x^M
compiler exited with status 1
Can't find a compatible C compiler
Testing pass.s on machine riscv.
UNTESTED: ./riscv/pass.s
testcase /path/to/binutils/sim/testsuite/./riscv/allinsn.exp completed in 0 seconds
=== Summary ===
# of untested testcases 1
It should be fixed if we give CC_FOR_TARGET_RISCV
variable to the configure
script but it turns out that it doesn't work.
I searched for a cause and I found that arch
variable (the return value of sim_arch
function) has a problem. On the RISC-V simulator testsuite, arch
is supposed to be riscv
but it was ./riscv
. Clearly, sim_arch
has failed to trim extra path components.
Also, it is found that it only occurs on parallel testing (found after a CNR report by Andrew Burgess).
For instance, make -C sim check-DEJAGNU-parallel
can force parallel testing.
This commit fixes that by extra file tail
call.
After this, sim/testsuite/riscv/allinsn/testrun.log
looks like this:
Running /src/binutils/sim/testsuite/./riscv/allinsn.exp ...
Found a compatible assembler
Executing on host: riscv64-unknown-elf-gcc /path/to/binutils/sim/testsuite/lib/compilercheck.c -E -o testsuite/./riscv/allinsn/compilercheck.x (timeout = 300)
spawn -ignore SIGHUP riscv64-unknown-elf-gcc /path/to/binutils/sim/testsuite/lib/compilercheck.c -E -o testsuite/./riscv/allinsn/compilercheck.x^M
Executing on host: riscv64-unknown-elf-gcc /path/to/binutils/sim/testsuite/lib/newlibcheck.c -lm -o testsuite/./riscv/allinsn/compilercheck.x (timeout = 300)
spawn -ignore SIGHUP riscv64-unknown-elf-gcc /path/to/binutils/sim/testsuite/lib/newlibcheck.c -lm -o testsuite/./riscv/allinsn/compilercheck.x^M
Found newlib C compiler
Testing pass.s on machine riscv.
Executing on host: /path/to/binutils-build/./gas/as-new /path/to/binutils/sim/testsuite/./riscv/pass.s -I/path/to/binutils/sim/testsuite/./riscv -o testsuite/./riscv/allinsn/pass.s.o (timeout = 300)
spawn -ignore SIGHUP /path/to/binutils-build/./gas/as-new /path/to/binutils/sim/testsuite/./riscv/pass.s -I/path/to/binutils/sim/testsuite/./riscv -o testsuite/./riscv/allinsn/pass.s.o^M
Executing on host: /path/to/binutils-build/./ld/ld-new testsuite/./riscv/allinsn/pass.s.o -o testsuite/./riscv/allinsn/pass.s.x (timeout = 300)
spawn -ignore SIGHUP /path/to/binutils-build/./ld/ld-new testsuite/./riscv/allinsn/pass.s.o -o testsuite/./riscv/allinsn/pass.s.x^M
./riscv/run testsuite/./riscv/allinsn/pass.s.x
spawn ./riscv/run testsuite/./riscv/allinsn/pass.s.x^M
pass^M
PASS: riscv pass.s
testcase /path/to/binutils/sim/testsuite/./riscv/allinsn.exp completed in 0 seconds
=== Summary ===
# of expected passes 1