aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite/cris/c/sched8.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/testsuite/cris/c/sched8.c')
-rw-r--r--sim/testsuite/cris/c/sched8.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sim/testsuite/cris/c/sched8.c b/sim/testsuite/cris/c/sched8.c
new file mode 100644
index 0000000..cd3e06e
--- /dev/null
+++ b/sim/testsuite/cris/c/sched8.c
@@ -0,0 +1,19 @@
+/* Check corner error case: specifying invalid PID.
+#notarget: cris*-*-elf
+*/
+#include <string.h>
+#include <sched.h>
+#include <stdio.h>
+#include <errno.h>
+#include <stdlib.h>
+
+int main (void)
+{
+ struct sched_param sb;
+ memset (&sb, -1, sizeof sb);
+ if (sched_getparam (99, &sb) != -1
+ || errno != ESRCH)
+ abort ();
+ printf ("pass\n");
+ exit (0);
+}