sim: testsuite: allow tests to declare expected exit status
authorMike Frysinger <vapier@gentoo.org>
Tue, 5 Jan 2021 06:26:21 +0000 (01:26 -0500)
committerMike Frysinger <vapier@gentoo.org>
Fri, 15 Jan 2021 06:33:35 +0000 (01:33 -0500)
commit37a9c3a53e3705c5120506e457455642702845e6
treebd55d53db865c08ba94edebf9e9b3a44538f97ae
parent3624a6c15ce48e03d43983ec11d586d97ca08728
sim: testsuite: allow tests to declare expected exit status

Some tests want to verify they can control the exit status, and
allowing any non-zero value would allow tests to silently fail:
if it crashed & exited 1, or forced all non-zero to 1, then we
wouldn't be able to differentiate with a test exiting with a
status like 47.

Extend the test harness to allow tests to declare their expected
exit status that would be defined as a "pass".  This requires a
small tweak to the sim_run API to return the status directly, but
that shouldn't be a big deal as it's only used by sim code.
sim/testsuite/ChangeLog
sim/testsuite/lib/sim-defs.exp
sim/testsuite/sim/cris/ChangeLog
sim/testsuite/sim/cris/c/c.exp
sim/testsuite/sim/cris/hw/rv-n-cris/rvc.exp