aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2013-03-08 01:37:46 -0500
committerBjoern Brandenburg <bbb@mpi-sws.org>2013-03-12 09:47:18 -0400
commit1ff4fc699f01f0ad1359fad48b00c9d3be1b28b4 (patch)
treee0c0f72971ec23795a6db157b6dd33b963f8d156
parent072b486393ab702eea9ea0a7fef569dbf8be0a32 (diff)
Make github/staging complatible with -O2.
Minor changes to test case code to enable compilation with 'gcc -O2' (gcc v4.7.2).
-rw-r--r--Makefile2
-rw-r--r--tests/nesting.c6
-rw-r--r--tests/pcp.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 5432edd..f6b00a0 100644
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@ LITMUS_KERNEL ?= ../litmus-rt
19# Internal configuration. 19# Internal configuration.
20 20
21# compiler flags 21# compiler flags
22flags-debug = -Wall -Werror -g -Wdeclaration-after-statement 22flags-debug = -O2 -Wall -Werror -g -Wdeclaration-after-statement
23flags-api = -D_XOPEN_SOURCE=600 -D_GNU_SOURCE 23flags-api = -D_XOPEN_SOURCE=600 -D_GNU_SOURCE
24 24
25# architecture-specific flags 25# architecture-specific flags
diff --git a/tests/nesting.c b/tests/nesting.c
index 7b30715..b294334 100644
--- a/tests/nesting.c
+++ b/tests/nesting.c
@@ -10,7 +10,7 @@ TESTCASE(lock_fmlp_nesting, PSN_EDF | GSN_EDF | P_FP,
10{ 10{
11 int fd, od, od2; 11 int fd, od, od2;
12 12
13 SYSCALL( fd = open(".fmlp_locks", O_RDONLY | O_CREAT) ); 13 SYSCALL( fd = open(".fmlp_locks", O_RDONLY | O_CREAT, S_IRUSR) );
14 14
15 SYSCALL( sporadic_partitioned(10, 100, 0) ); 15 SYSCALL( sporadic_partitioned(10, 100, 0) );
16 SYSCALL( task_mode(LITMUS_RT_TASK) ); 16 SYSCALL( task_mode(LITMUS_RT_TASK) );
@@ -45,7 +45,7 @@ TESTCASE(lock_fmlp_srp_nesting, PSN_EDF | P_FP,
45{ 45{
46 int fd, od, od2; 46 int fd, od, od2;
47 47
48 SYSCALL( fd = open(".fmlp_locks", O_RDONLY | O_CREAT) ); 48 SYSCALL( fd = open(".fmlp_locks", O_RDONLY | O_CREAT, S_IRUSR) );
49 49
50 SYSCALL( sporadic_partitioned(10, 100, 0) ); 50 SYSCALL( sporadic_partitioned(10, 100, 0) );
51 SYSCALL( task_mode(LITMUS_RT_TASK) ); 51 SYSCALL( task_mode(LITMUS_RT_TASK) );
@@ -80,7 +80,7 @@ TESTCASE(lock_srp_nesting, PSN_EDF | P_FP,
80{ 80{
81 int fd, od, od2; 81 int fd, od, od2;
82 82
83 SYSCALL( fd = open(".fmlp_locks", O_RDONLY | O_CREAT) ); 83 SYSCALL( fd = open(".fmlp_locks", O_RDONLY | O_CREAT, S_IRUSR) );
84 84
85 SYSCALL( sporadic_partitioned(10, 100, 0) ); 85 SYSCALL( sporadic_partitioned(10, 100, 0) );
86 SYSCALL( task_mode(LITMUS_RT_TASK) ); 86 SYSCALL( task_mode(LITMUS_RT_TASK) );
diff --git a/tests/pcp.c b/tests/pcp.c
index ff4259c..8e1204f 100644
--- a/tests/pcp.c
+++ b/tests/pcp.c
@@ -57,7 +57,7 @@ TESTCASE(pcp_inheritance, P_FP,
57 params.cls = RT_CLASS_HARD; 57 params.cls = RT_CLASS_HARD;
58 params.budget_policy = NO_ENFORCEMENT; 58 params.budget_policy = NO_ENFORCEMENT;
59 59
60 SYSCALL( fd = open(".pcp_locks", O_RDONLY | O_CREAT) ); 60 SYSCALL( fd = open(".pcp_locks", O_RDONLY | O_CREAT, S_IRUSR) );
61 61
62 62
63 child_lo = FORK_TASK( 63 child_lo = FORK_TASK(
@@ -162,7 +162,7 @@ TESTCASE(srp_ceiling_blocking, P_FP | PSN_EDF,
162 params.cls = RT_CLASS_HARD; 162 params.cls = RT_CLASS_HARD;
163 params.budget_policy = NO_ENFORCEMENT; 163 params.budget_policy = NO_ENFORCEMENT;
164 164
165 SYSCALL( fd = open(".srp_locks", O_RDONLY | O_CREAT) ); 165 SYSCALL( fd = open(".srp_locks", O_RDONLY | O_CREAT, S_IRUSR) );
166 166
167 167
168 child_lo = FORK_TASK( 168 child_lo = FORK_TASK(