aboutsummaryrefslogtreecommitdiffstats
path: root/tests/pcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pcp.c')
-rw-r--r--tests/pcp.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/pcp.c b/tests/pcp.c
index 9cafd27..9c9b6f2 100644
--- a/tests/pcp.c
+++ b/tests/pcp.c
@@ -40,6 +40,23 @@ TESTCASE(lock_pcp, P_FP,
40 SYSCALL( remove(".pcp_locks") ); 40 SYSCALL( remove(".pcp_locks") );
41} 41}
42 42
43TESTCASE(pcp_bad_cpu, P_FP,
44 "PCP reject bad CPU parameter")
45{
46 int fd, cpu = 0xbadca5e;
47
48 SYSCALL( fd = open(".pcp_locks", O_RDONLY | O_CREAT, S_IRUSR) );
49
50 SYSCALL( sporadic_partitioned(ms2ns(10), ms2ns(100), 0) );
51 SYSCALL( task_mode(LITMUS_RT_TASK) );
52
53 SYSCALL_FAILS(EINVAL, open_pcp_sem(fd, 0, cpu) );
54
55 SYSCALL( close(fd) );
56
57 SYSCALL( remove(".pcp_locks") );
58}
59
43TESTCASE(pcp_inheritance, P_FP, 60TESTCASE(pcp_inheritance, P_FP,
44 "PCP priority inheritance") 61 "PCP priority inheritance")
45{ 62{