aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-11-15 00:13:29 -0800
committerMike Frysinger <vapier@gentoo.org>2015-11-15 07:55:48 -0500
commit5809534fe153fbbf925424716eb2e295f2217c65 (patch)
tree0615cfd000e0bdbe7b092cfee058a88ac39c1c05 /sim
parent02962cd9eae61acef03aea44afb7350bfa30bae7 (diff)
downloadgdb-5809534fe153fbbf925424716eb2e295f2217c65.zip
gdb-5809534fe153fbbf925424716eb2e295f2217c65.tar.gz
gdb-5809534fe153fbbf925424716eb2e295f2217c65.tar.bz2
sim: mcore: add a fail testcase
Diffstat (limited to 'sim')
-rw-r--r--sim/testsuite/sim/mcore/ChangeLog5
-rw-r--r--sim/testsuite/sim/mcore/fail.s8
-rw-r--r--sim/testsuite/sim/mcore/testutils.inc2
3 files changed, 14 insertions, 1 deletions
diff --git a/sim/testsuite/sim/mcore/ChangeLog b/sim/testsuite/sim/mcore/ChangeLog
index 2aa1f2c..b0e7908 100644
--- a/sim/testsuite/sim/mcore/ChangeLog
+++ b/sim/testsuite/sim/mcore/ChangeLog
@@ -1,3 +1,8 @@
+2015-11-15 Mike Frysinger <vapier@gentoo.org>
+
+ * fail.s: New test.
+ * testutils.inc (fail): Fix exit code.
+
2015-03-29 Mike Frysinger <vapier@gentoo.org>
* pass.s, allinsn.exp, testutils.inc: New files.
diff --git a/sim/testsuite/sim/mcore/fail.s b/sim/testsuite/sim/mcore/fail.s
new file mode 100644
index 0000000..10e3b23
--- /dev/null
+++ b/sim/testsuite/sim/mcore/fail.s
@@ -0,0 +1,8 @@
+# check that the sim doesn't die immediately.
+# mach: mcore
+# xerror:
+
+.include "testutils.inc"
+
+ start
+ fail
diff --git a/sim/testsuite/sim/mcore/testutils.inc b/sim/testsuite/sim/mcore/testutils.inc
index 0b82942..f5be06d 100644
--- a/sim/testsuite/sim/mcore/testutils.inc
+++ b/sim/testsuite/sim/mcore/testutils.inc
@@ -38,7 +38,7 @@
movi r4, 5;
# Trigger OS trap.
trap 1;
- exit 0
+ exit 1
.data
1: .asciz "fail\n"
.endm