diff options
Diffstat (limited to 'sim/testsuite/cris/c/readlink10.c')
-rw-r--r-- | sim/testsuite/cris/c/readlink10.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sim/testsuite/cris/c/readlink10.c b/sim/testsuite/cris/c/readlink10.c new file mode 100644 index 0000000..2174408 --- /dev/null +++ b/sim/testsuite/cris/c/readlink10.c @@ -0,0 +1,18 @@ +/* Check that odd cases of readlink work. +#notarget: cris*-*-elf +*/ + +#include <unistd.h> +#include <errno.h> +#include <stdio.h> +#include <stdlib.h> + +int main (int argc, char *argv[]) +{ + if (readlink("/proc/42/exe", NULL, 4096) != -1 + || errno != EFAULT) + abort (); + + printf ("pass\n"); + exit (0); +} |