aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite/cris/c/fcntl1.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/testsuite/cris/c/fcntl1.c')
-rw-r--r--sim/testsuite/cris/c/fcntl1.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sim/testsuite/cris/c/fcntl1.c b/sim/testsuite/cris/c/fcntl1.c
new file mode 100644
index 0000000..032f6b5
--- /dev/null
+++ b/sim/testsuite/cris/c/fcntl1.c
@@ -0,0 +1,19 @@
+/* Check that we get the expected message for unsupported fcntl calls.
+#notarget: cris*-*-elf
+#xerror:
+#output: Unimplemented fcntl*
+#output: program stopped with signal 4 (*).\n
+*/
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+
+int main (void)
+{
+ int err = fcntl (1, 42);
+ if (err == -1 && errno == ENOSYS)
+ printf ("ENOSYS\n");
+ printf ("xyzzy\n");
+ exit (0);
+}