binutils-gdb/sim/testsuite
Mike Frysinger bbda248c50 sim: v850: fix cpu_option testsuite handling
The v850 testsuite code has been testing the $opt variable, but this
was never actually set anywhere globally or v850-specific.  Instead,
this was a random variable leaking out of the sh testsuite code.  As
far as I can tell, it has always been this way.  That means the code
only ever tested the v850 cpu target (which is the default).

This failure can be easily seen in practice by running the v850 code
in isolation and seeing it crash:
$ runtest v850/allinsns.exp
...
Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using ../../../sim/testsuite/config/default.exp as tool-and-target-specific interface file.
WARNING: Assuming target board is the local machine (which is probably wrong).
You may need to set your DEJAGNU environment variable.
Running ../../../sim/testsuite/v850/allinsns.exp ...
ERROR: tcl error sourcing ../../../sim/testsuite/v850/allinsns.exp.
ERROR: tcl error code TCL LOOKUP VARNAME opt
ERROR: can't read "opt": no such variable
    while executing
"switch -regexp -- $opt {

Backing up a bit, the reason for this logic in the first place is
because the common sim testsuite code makes an assumption about the
assembler options with cpu_option -- the option and its value are
always separated by an =.  This is not the case with v850.  So tweak
the core sim logic a bit to support omitting the = so that we can
switch v850 to the standard all_machs setting and avoid opt entirely.
2021-11-20 23:13:50 -05:00
..
aarch64 sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
arm sim: testsuite: delete unused arm remote host logic 2021-11-10 21:58:08 -05:00
avr sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
bfin sim: bfin: fix short --env usage in testsuite 2021-11-19 21:27:50 -05:00
bpf sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
common sim: enable silent rules in common builds 2021-06-14 20:04:44 -04:00
config
cr16 sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
cris sim: testsuite: add support for $pwd replacements 2021-11-16 20:21:59 -05:00
d10v sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
example-synacor sim: synacor: simplify test generation 2021-11-10 21:45:43 -05:00
frv sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
ft32 sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
h8300 sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
iq2000 sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
lib sim: v850: fix cpu_option testsuite handling 2021-11-20 23:13:50 -05:00
lm32 sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
m32c sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
m32r sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
m68hc11 sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
mcore sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
microblaze sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
mips sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
mn10300 sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
moxie sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
msp430 sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
or1k sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
pru sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
riscv sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
sh sim: sh: simplify testsuite a bit 2021-11-09 01:22:06 -05:00
v850 sim: v850: fix cpu_option testsuite handling 2021-11-20 23:13:50 -05:00
.gitignore
ChangeLog-2021 sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
local.mk sim: testsuite: add more silent build rules 2021-11-16 19:33:57 -05:00