2
0
mirror of https://sourceware.org/git/binutils-gdb.git synced 2024-12-21 04:42:53 +08:00
binutils-gdb/sim/testsuite/cris/c/clone5.c
Mike Frysinger 1368b914e9 sim: testsuite: flatten tree
Now that all port tests live under testsuite/sim/*/, and none live
in testsuite/ directly, flatten the structure by moving all of the
dirs under testsuite/sim/ to testsuite/ directly.

We need to stop passing --tool to dejagnu so that it searches all
dirs and not just ones that start with "sim".  Since we have no
other dirs in this tree, and no plans to add any, should be fine.
2021-01-15 19:18:34 -05:00

36 lines
620 B
C

/* 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>
#include <errno.h>
int pip[2];
int
process (void *arg)
{
return 0;
}
int
main (void)
{
int retcode;
long stack[16384];
retcode = clone (process, (char *) stack + sizeof (stack) - 64, 0, "cba");
if (retcode == -1 && errno == ENOSYS)
printf ("ENOSYS\n");
printf ("xyzzy\n");
return 0;
}