aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite/cris/c/sched9.c
blob: c9647b610e2a77c83d7cb869e4533c03a2a023d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* Check corner error case: specifying invalid scheduling policy.
#progos: linux
*/

#include <sched.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>

int main (void)
{
  if (sched_get_priority_min (-1) != -1
      || errno != EINVAL)
    abort ();

  errno = 0;

  if (sched_get_priority_max (-1) != -1
      || errno != EINVAL)
    abort ();

  printf ("pass\n");
  exit (0);
}