OLD | NEW |
1 /* Check that TRT happens for pipe corner cases (for our definition of TRT). | 1 /* Check that TRT happens for pipe corner cases (for our definition of TRT). |
2 #notarget: cris*-*-elf | 2 #notarget: cris*-*-elf |
3 #xerror: | 3 #xerror: |
4 #output: Terminating simulation due to writing pipe * from one single thread\n | 4 #output: Terminating simulation due to writing pipe * from one single thread\n |
5 #output: program stopped with signal 4.\n | 5 #output: program stopped with signal 4 (*).\n |
6 */ | 6 */ |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <signal.h> | 8 #include <signal.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 #include <stdio.h> | 10 #include <stdio.h> |
11 #include <unistd.h> | 11 #include <unistd.h> |
12 #include <errno.h> | 12 #include <errno.h> |
13 #include <limits.h> | 13 #include <limits.h> |
14 | 14 |
15 void err (const char *s) | 15 void err (const char *s) |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 happen with *any* amount written to a pipe with no reader if we'd | 50 happen with *any* amount written to a pipe with no reader if we'd |
51 support it - but we don't). Better to abort the simulation with a | 51 support it - but we don't). Better to abort the simulation with a |
52 suitable message. */ | 52 suitable message. */ |
53 if (write (pip[1], buf, 100 * pipemax) != -1 | 53 if (write (pip[1], buf, 100 * pipemax) != -1 |
54 || errno != EFBIG) | 54 || errno != EFBIG) |
55 err ("write mucho"); | 55 err ("write mucho"); |
56 | 56 |
57 printf ("pass\n"); | 57 printf ("pass\n"); |
58 exit (0); | 58 exit (0); |
59 } | 59 } |
OLD | NEW |