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
arm sim: testsuite: delete unused arm remote host logic 2021-11-10 21:58:08 -05:00
avr
bfin sim: bfin: fix short --env usage in testsuite 2021-11-19 21:27:50 -05:00
bpf
common
config
cr16
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
ft32
h8300
iq2000
lib sim: v850: fix cpu_option testsuite handling 2021-11-20 23:13:50 -05:00
lm32
m32c
m32r
m68hc11
mcore
microblaze
mips
mn10300
moxie
msp430
or1k
pru
riscv
sh
v850 sim: v850: fix cpu_option testsuite handling 2021-11-20 23:13:50 -05:00
.gitignore
ChangeLog-2021
local.mk sim: testsuite: add more silent build rules 2021-11-16 19:33:57 -05:00