diff options
| author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2015-07-27 08:41:56 -0400 |
|---|---|---|
| committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2015-07-27 08:41:56 -0400 |
| commit | 64d80eb87d7c0136ad23bf7421fac19dbe0036bd (patch) | |
| tree | 3b2d7a7702c77ee614833a9a2217258c253cf188 | |
| parent | 42534e37f87b0f54cdafaa12ad0b2aa2171315b9 (diff) | |
Testcase: create DPCP lock with invalid CPU parameter
| -rw-r--r-- | tests/pcp.c | 17 |
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 | ||
| 278 | TESTCASE(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 | |||
| 278 | TESTCASE(lock_dpcp_pcp, P_FP, | 295 | TESTCASE(lock_dpcp_pcp, P_FP, |
| 279 | "DPCP-PCP interleaved priority") | 296 | "DPCP-PCP interleaved priority") |
| 280 | { | 297 | { |
