aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2009-01-03 20:26:19 +0000
committerHans-Peter Nilsson <hp@axis.com>2009-01-03 20:26:19 +0000
commit2e1566c6dacb9e40d35df48b487364e6911f088e (patch)
treec076b302ecb84a76f501f4691863f6736fddd37f /sim
parente56b67eda787f2b925d1ca916e7bfc437bc4fc45 (diff)
downloadgdb-2e1566c6dacb9e40d35df48b487364e6911f088e.zip
gdb-2e1566c6dacb9e40d35df48b487364e6911f088e.tar.gz
gdb-2e1566c6dacb9e40d35df48b487364e6911f088e.tar.bz2
* sim/cris/c/exitg1.c, sim/cris/c/exitg2.c: New tests.
Diffstat (limited to 'sim')
-rw-r--r--sim/testsuite/ChangeLog1
-rw-r--r--sim/testsuite/sim/cris/c/exitg1.c20
-rw-r--r--sim/testsuite/sim/cris/c/exitg2.c7
3 files changed, 28 insertions, 0 deletions
diff --git a/sim/testsuite/ChangeLog b/sim/testsuite/ChangeLog
index 3756706..2d291f6 100644
--- a/sim/testsuite/ChangeLog
+++ b/sim/testsuite/ChangeLog
@@ -1,5 +1,6 @@
2009-01-03 Hans-Peter Nilsson <hp@axis.com>
+ * sim/cris/c/exitg1.c, sim/cris/c/exitg2.c: New tests.
* sim/cris/c/uname1.c: New test.
* sim/cris/c/mmap1.c (MMAP_FLAGS): Default-define to
MAP_PRIVATE and use this macro in the mmap call.
diff --git a/sim/testsuite/sim/cris/c/exitg1.c b/sim/testsuite/sim/cris/c/exitg1.c
new file mode 100644
index 0000000..0b4c425
--- /dev/null
+++ b/sim/testsuite/sim/cris/c/exitg1.c
@@ -0,0 +1,20 @@
+/* Check exit_group(2) trivially. Newlib doesn't have it and the
+ pre-v32 glibc requires updated headers we'd have to check or adjust
+ for.
+#notarget: cris-*-* *-*-elf
+#output: exit_group\n
+*/
+#include <unistd.h>
+#include <sys/syscall.h>
+#include <stdio.h>
+#include <stdlib.h>
+#ifndef EXITVAL
+#define EXITVAL 0
+#endif
+int main (int argc, char **argv)
+{
+ printf ("exit_group\n");
+ syscall (SYS_exit_group, EXITVAL);
+ printf ("failed\n");
+ abort ();
+}
diff --git a/sim/testsuite/sim/cris/c/exitg2.c b/sim/testsuite/sim/cris/c/exitg2.c
new file mode 100644
index 0000000..e222cc4
--- /dev/null
+++ b/sim/testsuite/sim/cris/c/exitg2.c
@@ -0,0 +1,7 @@
+/* Check exit_group(2) trivially with non-zero status.
+#notarget: cris-*-* *-*-elf
+#output: exit_group\n
+#xerror:
+*/
+#define EXITVAL 1
+#include "exitg1.c"