aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2015-07-27 08:41:56 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2015-07-27 08:41:56 -0400
commit64d80eb87d7c0136ad23bf7421fac19dbe0036bd (patch)
tree3b2d7a7702c77ee614833a9a2217258c253cf188 /tests
parent42534e37f87b0f54cdafaa12ad0b2aa2171315b9 (diff)
Testcase: create DPCP lock with invalid CPU parameter
Diffstat (limited to 'tests')
-rw-r--r--tests/pcp.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/pcp.c b/tests/pcp.c
index 19b2ea6..9cafd27 100644
--- a/tests/pcp.c
+++ b/tests/pcp.c
@@ -275,6 +275,23 @@ TESTCASE(lock_dpcp, P_FP,
275 SYSCALL( remove(".pcp_locks") ); 275 SYSCALL( remove(".pcp_locks") );
276} 276}
277 277
278TESTCASE(dpcp_bad_cpu, P_FP,
279 "DPCP reject bad CPU parameter")
280{
281 int fd, cpu = 0xbadca5e;
282
283 SYSCALL( fd = open(".pcp_locks", O_RDONLY | O_CREAT, S_IRUSR) );
284
285 SYSCALL( sporadic_partitioned(ms2ns(10), ms2ns(100), 0) );
286 SYSCALL( task_mode(LITMUS_RT_TASK) );
287
288 SYSCALL_FAILS(EINVAL, open_dpcp_sem(fd, 0, cpu) );
289
290 SYSCALL( close(fd) );
291
292 SYSCALL( remove(".pcp_locks") );
293}
294
278TESTCASE(lock_dpcp_pcp, P_FP, 295TESTCASE(lock_dpcp_pcp, P_FP,
279 "DPCP-PCP interleaved priority") 296 "DPCP-PCP interleaved priority")
280{ 297{