sim: mcore: add a fail testcase
authorMike Frysinger <vapier@gentoo.org>
Sun, 15 Nov 2015 08:13:29 +0000 (00:13 -0800)
committerMike Frysinger <vapier@gentoo.org>
Sun, 15 Nov 2015 12:55:48 +0000 (07:55 -0500)
sim/testsuite/sim/mcore/ChangeLog
sim/testsuite/sim/mcore/fail.s [new file with mode: 0644]
sim/testsuite/sim/mcore/testutils.inc

index 2aa1f2cd791d1b2f1ec284cc3a54b28891543309..b0e79088ae6b067780ef7af2c736ed16392b1ea8 100644 (file)
@@ -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 (file)
index 0000000..10e3b23
--- /dev/null
@@ -0,0 +1,8 @@
+# check that the sim doesn't die immediately.
+# mach: mcore
+# xerror:
+
+.include "testutils.inc"
+
+       start
+       fail
index 0b82942e1abbbe411e5fb092d4d5c976618103f3..f5be06da66321d54210dcedae0215e0ede512b39 100644 (file)
@@ -38,7 +38,7 @@
        movi r4, 5;
        # Trigger OS trap.
        trap 1;
-       exit 0
+       exit 1
        .data
        1: .asciz "fail\n"
        .endm