summaryrefslogtreecommitdiff
path: root/sim/testsuite/sim/cris/c/clone5.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/testsuite/sim/cris/c/clone5.c')
-rw-r--r--sim/testsuite/sim/cris/c/clone5.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/sim/testsuite/sim/cris/c/clone5.c b/sim/testsuite/sim/cris/c/clone5.c
new file mode 100644
index 00000000000..b642a2f1a35
--- /dev/null
+++ b/sim/testsuite/sim/cris/c/clone5.c
@@ -0,0 +1,32 @@
+/* Check that unimplemented clone syscalls get the right treatment.
+#notarget: cris*-*-elf
+#xerror:
+#output: Unimplemented clone syscall *
+#output: program stopped with signal 4.\n
+*/
+
+#include <stddef.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+int pip[2];
+
+int
+process (void *arg)
+{
+ return 0;
+}
+
+int
+main (void)
+{
+ int retcode;
+ long stack[16384];
+
+ clone (process, (char *) stack + sizeof (stack) - 64, 0, "cba");
+ printf ("xyzzy\n");
+ return 0;
+}