* sim/cris: New directory with C and assembly tests for the CRIS
[deliverable/binutils-gdb.git] / sim / testsuite / sim / cris / c / readlink9.c
1 /* Check that odd cases of readlink work.
2 #notarget: cris*-*-elf
3 #cc: additional_flags=-DX="@exedir@"
4 */
5
6 #include <unistd.h>
7 #include <errno.h>
8 #include <stdio.h>
9 #include <stdlib.h>
10
11 int main (int argc, char *argv[])
12 {
13 /* We assume that "sim/testsuite" isn't renamed to anything that
14 together with "<builddir>/" is shorter than 7 characters. */
15 char buf[7];
16
17 if (readlink("/proc/42/exe", buf, sizeof (buf)) != sizeof (buf)
18 || strncmp (buf, X, sizeof (buf)) != 0)
19 abort ();
20
21 printf ("pass\n");
22 exit (0);
23 }
This page took 0.031275 seconds and 4 git commands to generate.