diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2013-03-08 01:25:35 -0500 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2013-03-12 09:47:01 -0400 |
commit | 072b486393ab702eea9ea0a7fef569dbf8be0a32 (patch) | |
tree | dda3128725f9324908c4f3daae992208030faaff /tests | |
parent | 7051511d6b059097f2eb5f650294e0ead7d8f488 (diff) |
uncachedev: uncache test tool.
This adds the uncache test tool (bin/uncache.c). The tool
can be used to test Litmus's char device driver for allocating
uncacheable CPU memory. The tool runs various checks and
gathers basic cache vs. main memory statistics.
In the future, uncache could be extended to quantify the
benefits of the L1, L2, and L3 caches, instead of treating
them as a black box.
Note: Uncache works best when compiled with '-O2'. While '-O2'
has not been added to the Makefile, other code was updated (code
in tests/ and rtspin), to compile with -O2.
DEPENDS UPON LITMUS-RT PATCH 888d097deb6d1fdc0c89a4f9667fd81cf416cfc7.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fdso.c | 4 | ||||
-rw-r--r-- | tests/locks.c | 8 | ||||
-rw-r--r-- | tests/pcp.c | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/tests/fdso.c b/tests/fdso.c index 8a2a0d0..fda343f 100644 --- a/tests/fdso.c +++ b/tests/fdso.c | |||
@@ -16,7 +16,7 @@ TESTCASE(fmlp_not_active, C_EDF | PFAIR | LINUX, | |||
16 | { | 16 | { |
17 | int fd; | 17 | int fd; |
18 | 18 | ||
19 | SYSCALL( fd = open(".fmlp_locks", O_RDONLY | O_CREAT) ); | 19 | SYSCALL( fd = open(".fmlp_locks", O_RDONLY | O_CREAT, S_IRUSR) ); |
20 | 20 | ||
21 | ASSERT(fd != -1); | 21 | ASSERT(fd != -1); |
22 | 22 | ||
@@ -57,7 +57,7 @@ TESTCASE(not_inherit_od, GSN_EDF | PSN_EDF, | |||
57 | { | 57 | { |
58 | int fd, od, pid, status; | 58 | int fd, od, pid, status; |
59 | 59 | ||
60 | SYSCALL( fd = open(".fmlp_locks", O_RDONLY | O_CREAT) ); | 60 | SYSCALL( fd = open(".fmlp_locks", O_RDONLY | O_CREAT, S_IRUSR) ); |
61 | 61 | ||
62 | SYSCALL( od = open_fmlp_sem(fd, 0) ); | 62 | SYSCALL( od = open_fmlp_sem(fd, 0) ); |
63 | 63 | ||
diff --git a/tests/locks.c b/tests/locks.c index d7ebfe2..9a928b3 100644 --- a/tests/locks.c +++ b/tests/locks.c | |||
@@ -11,7 +11,7 @@ TESTCASE(not_lock_fmlp_be, GSN_EDF | PSN_EDF | P_FP, | |||
11 | { | 11 | { |
12 | int fd, od; | 12 | int fd, od; |
13 | 13 | ||
14 | SYSCALL( fd = open(".fmlp_locks", O_RDONLY | O_CREAT) ); | 14 | SYSCALL( fd = open(".fmlp_locks", O_RDONLY | O_CREAT, S_IRUSR) ); |
15 | 15 | ||
16 | SYSCALL( od = open_fmlp_sem(fd, 0) ); | 16 | SYSCALL( od = open_fmlp_sem(fd, 0) ); |
17 | 17 | ||
@@ -34,7 +34,7 @@ TESTCASE(not_lock_srp_be, PSN_EDF | P_FP, | |||
34 | { | 34 | { |
35 | int fd, od; | 35 | int fd, od; |
36 | 36 | ||
37 | SYSCALL( fd = open(".srp_locks", O_RDONLY | O_CREAT) ); | 37 | SYSCALL( fd = open(".srp_locks", O_RDONLY | O_CREAT, S_IRUSR) ); |
38 | 38 | ||
39 | /* BE tasks may not open SRP semaphores */ | 39 | /* BE tasks may not open SRP semaphores */ |
40 | 40 | ||
@@ -51,7 +51,7 @@ TESTCASE(lock_srp, PSN_EDF | P_FP, | |||
51 | { | 51 | { |
52 | int fd, od; | 52 | int fd, od; |
53 | 53 | ||
54 | SYSCALL( fd = open(".srp_locks", O_RDONLY | O_CREAT) ); | 54 | SYSCALL( fd = open(".srp_locks", O_RDONLY | O_CREAT, S_IRUSR) ); |
55 | 55 | ||
56 | SYSCALL( sporadic_partitioned(10, 100, 0) ); | 56 | SYSCALL( sporadic_partitioned(10, 100, 0) ); |
57 | SYSCALL( task_mode(LITMUS_RT_TASK) ); | 57 | SYSCALL( task_mode(LITMUS_RT_TASK) ); |
@@ -83,7 +83,7 @@ TESTCASE(lock_fmlp, PSN_EDF | GSN_EDF | P_FP, | |||
83 | { | 83 | { |
84 | int fd, od; | 84 | int fd, od; |
85 | 85 | ||
86 | SYSCALL( fd = open(".fmlp_locks", O_RDONLY | O_CREAT) ); | 86 | SYSCALL( fd = open(".fmlp_locks", O_RDONLY | O_CREAT, S_IRUSR) ); |
87 | 87 | ||
88 | SYSCALL( sporadic_partitioned(10, 100, 0) ); | 88 | SYSCALL( sporadic_partitioned(10, 100, 0) ); |
89 | SYSCALL( task_mode(LITMUS_RT_TASK) ); | 89 | SYSCALL( task_mode(LITMUS_RT_TASK) ); |
diff --git a/tests/pcp.c b/tests/pcp.c index 52ee959..ff4259c 100644 --- a/tests/pcp.c +++ b/tests/pcp.c | |||
@@ -13,7 +13,7 @@ TESTCASE(lock_pcp, P_FP, | |||
13 | { | 13 | { |
14 | int fd, od, cpu = 0; | 14 | int fd, od, cpu = 0; |
15 | 15 | ||
16 | SYSCALL( fd = open(".pcp_locks", O_RDONLY | O_CREAT) ); | 16 | SYSCALL( fd = open(".pcp_locks", O_RDONLY | O_CREAT, S_IRUSR) ); |
17 | 17 | ||
18 | SYSCALL( sporadic_partitioned(10, 100, cpu) ); | 18 | SYSCALL( sporadic_partitioned(10, 100, cpu) ); |
19 | SYSCALL( task_mode(LITMUS_RT_TASK) ); | 19 | SYSCALL( task_mode(LITMUS_RT_TASK) ); |
@@ -250,7 +250,7 @@ TESTCASE(lock_dpcp, P_FP, | |||
250 | { | 250 | { |
251 | int fd, od, cpu = 1; | 251 | int fd, od, cpu = 1; |
252 | 252 | ||
253 | SYSCALL( fd = open(".pcp_locks", O_RDONLY | O_CREAT) ); | 253 | SYSCALL( fd = open(".pcp_locks", O_RDONLY | O_CREAT, S_IRUSR) ); |
254 | 254 | ||
255 | SYSCALL( sporadic_partitioned(10, 100, 0) ); | 255 | SYSCALL( sporadic_partitioned(10, 100, 0) ); |
256 | SYSCALL( task_mode(LITMUS_RT_TASK) ); | 256 | SYSCALL( task_mode(LITMUS_RT_TASK) ); |
@@ -281,7 +281,7 @@ TESTCASE(not_lock_pcp_be, P_FP, | |||
281 | { | 281 | { |
282 | int fd, od; | 282 | int fd, od; |
283 | 283 | ||
284 | SYSCALL( fd = open(".pcp_locks", O_RDONLY | O_CREAT) ); | 284 | SYSCALL( fd = open(".pcp_locks", O_RDONLY | O_CREAT, S_IRUSR) ); |
285 | 285 | ||
286 | /* BE tasks are not even allowed to open a PCP semaphore */ | 286 | /* BE tasks are not even allowed to open a PCP semaphore */ |
287 | SYSCALL_FAILS(EPERM, od = open_pcp_sem(fd, 0, 1) ); | 287 | SYSCALL_FAILS(EPERM, od = open_pcp_sem(fd, 0, 1) ); |
@@ -303,7 +303,7 @@ TESTCASE(lock_mpcp, P_FP, | |||
303 | { | 303 | { |
304 | int fd, od; | 304 | int fd, od; |
305 | 305 | ||
306 | SYSCALL( fd = open(".pcp_locks", O_RDONLY | O_CREAT) ); | 306 | SYSCALL( fd = open(".pcp_locks", O_RDONLY | O_CREAT, S_IRUSR) ); |
307 | 307 | ||
308 | SYSCALL( sporadic_partitioned(10, 100, 0) ); | 308 | SYSCALL( sporadic_partitioned(10, 100, 0) ); |
309 | SYSCALL( task_mode(LITMUS_RT_TASK) ); | 309 | SYSCALL( task_mode(LITMUS_RT_TASK) ); |