summaryrefslogtreecommitdiffstats
path: root/recipes/ltp/ltp-20090131/syscalls.patch
blob: 34cead1f19ab19420f461db2a9b17812ef1d4c96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
--- ltp-full-20090131.orig/testcases/kernel/include/i386.in	2008-11-25 23:02:31.000000000 +0900
+++ ltp-full-20090131.modified/testcases/kernel/include/i386.in	2009-02-04 09:49:26.000000000 +0900
@@ -40,3 +40,9 @@ __NR_eventfd 323
 __NR_fallocate 324
 __NR_timerfd_settime 325
 __NR_timerfd_gettime 326
+__NR_signalfd4 327
+__NR_eventfd2 328
+__NR_epoll_create2 329
+__NR_dup3 330
+__NR_pipe2 331
+__NR_inotify_init1 332
--- ltp-full-20090131.orig/testcases/kernel/include/regen.sh	2008-11-13 04:18:27.000000000 +0900
+++ ltp-full-20090131.modified/testcases/kernel/include/regen.sh	2009-02-04 10:05:46.000000000 +0900
@@ -20,6 +20,7 @@ cat << EOF > ${output}
 #ifndef __LINUX_SYSCALL_NUMBERS_H__
 #define __LINUX_SYSCALL_NUMBERS_H__
 
+#include <errno.h>
 #include <sys/syscall.h>
 
 static void cleanup(void);
--- ltp-full-20090131.orig/testcases/kernel/include/x86_64.in	2008-11-19 19:34:37.000000000 +0900
+++ ltp-full-20090131.modified/testcases/kernel/include/x86_64.in	2009-02-04 09:49:26.000000000 +0900
@@ -27,3 +27,9 @@ __NR_eventfd 284
 __NR_fallocate 285
 __NR_timerfd_settime 286
 __NR_timerfd_gettime 287
+__NR_signalfd4 289
+__NR_eventfd2 290
+__NR_epoll_create2 291
+__NR_dup3 292
+__NR_pipe2 293
+__NR_inotify_init1 294
--- ltp-full-20090131.orig/testcases/kernel/syscalls/dup3/dup3_01.c	2009-01-16 19:16:53.000000000 +0900
+++ ltp-full-20090131.modified/testcases/kernel/syscalls/dup3/dup3_01.c	2009-02-04 10:45:38.000000000 +0900
@@ -60,21 +60,12 @@
 /* Harness Specific Include Files. */
 #include "test.h"
 #include "usctest.h"
+#include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
 # define O_CLOEXEC 02000000
 #endif
 
-#ifndef __NR_dup3
-# ifdef __x86_64__
-#  define __NR_dup3 292
-# elif defined __i386__
-#  define __NR_dup3 330
-# else
-#  error "need __NR_dup3"
-# endif
-#endif
-
 /* Extern Global Variables */
 extern int  Tst_count;               /* counter for tst_xxx routines.         */
 extern char *TESTDIR;                /* temporary dir created by tst_tmpdir() */
--- ltp-full-20090131.orig/testcases/kernel/syscalls/epoll_create2/epoll_create2_01.c	2009-01-16 19:14:35.000000000 +0900
+++ ltp-full-20090131.modified/testcases/kernel/syscalls/epoll_create2/epoll_create2_01.c	2009-02-04 10:45:52.000000000 +0900
@@ -62,16 +62,7 @@
 /* Harness Specific Include Files. */
 #include "test.h"
 #include "usctest.h"
-
-#ifndef __NR_epoll_create2
-# ifdef __x86_64__
-#  define __NR_epoll_create2 291
-# elif defined __i386__
-#  define __NR_epoll_create2 329
-# else
-#  error "need __NR_epoll_create2"
-# endif
-#endif
+#include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
 # define O_CLOEXEC 02000000
--- ltp-full-20090131.orig/testcases/kernel/syscalls/eventfd2/eventfd2_01.c	2009-01-16 19:10:17.000000000 +0900
+++ ltp-full-20090131.modified/testcases/kernel/syscalls/eventfd2/eventfd2_01.c	2009-02-04 10:46:08.000000000 +0900
@@ -61,21 +61,12 @@
 /* Harness Specific Include Files. */
 #include "test.h"
 #include "usctest.h"
+#include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
 # define O_CLOEXEC 02000000
 #endif
 
-#ifndef __NR_eventfd2
-# ifdef __x86_64__
-#  define __NR_eventfd2 290
-# elif defined __i386__
-#  define __NR_eventfd2 328
-# else
-#  error "need __NR_eventfd2"
-# endif
-#endif
-
 #define EFD_CLOEXEC O_CLOEXEC
 
 /* Extern Global Variables */
--- ltp-full-20090131.orig/testcases/kernel/syscalls/eventfd2/eventfd2_02.c	2009-01-16 19:31:43.000000000 +0900
+++ ltp-full-20090131.modified/testcases/kernel/syscalls/eventfd2/eventfd2_02.c	2009-02-04 10:46:19.000000000 +0900
@@ -58,21 +58,12 @@
 /* Harness Specific Include Files. */
 #include "test.h"
 #include "usctest.h"
+#include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
 # define O_CLOEXEC 02000000
 #endif
 
-#ifndef __NR_eventfd2
-# ifdef __x86_64__
-#  define __NR_eventfd2 290
-# elif defined __i386__
-#  define __NR_eventfd2 328
-# else
-#  error "need __NR_eventfd2"
-# endif
-#endif
-
 #define EFD_NONBLOCK O_NONBLOCK
 
 /* Extern Global Variables */
--- ltp-full-20090131.orig/testcases/kernel/syscalls/inotify_init/inotify_init1_01.c	2009-01-16 19:21:40.000000000 +0900
+++ ltp-full-20090131.modified/testcases/kernel/syscalls/inotify_init/inotify_init1_01.c	2009-02-04 10:46:28.000000000 +0900
@@ -61,20 +61,12 @@
 /* Harness Specific Include Files. */
 #include "test.h"
 #include "usctest.h"
+#include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
 # define O_CLOEXEC 02000000
 #endif
 
-#ifndef __NR_inotify_init1
-# ifdef __x86_64__
-#  define __NR_inotify_init1 294
-# elif defined __i386__
-#  define __NR_inotify_init1 332
-# else
-#  error "need __NR_inotify_init1"
-# endif
-#endif
 #define IN_CLOEXEC O_CLOEXEC
 
 /* Extern Global Variables */
--- ltp-full-20090131.orig/testcases/kernel/syscalls/inotify_init/inotify_init1_02.c	2009-01-16 19:36:22.000000000 +0900
+++ ltp-full-20090131.modified/testcases/kernel/syscalls/inotify_init/inotify_init1_02.c	2009-02-04 10:46:39.000000000 +0900
@@ -58,21 +58,12 @@
 /* Harness Specific Include Files. */
 #include "test.h"
 #include "usctest.h"
+#include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
 # define O_CLOEXEC 02000000
 #endif
 
-#ifndef __NR_inotify_init1
-# ifdef __x86_64__
-#  define __NR_inotify_init1 294
-# elif defined __i386__
-#  define __NR_inotify_init1 332
-# else
-#  error "need __NR_inotify_init1"
-# endif
-#endif
-
 #define IN_NONBLOCK O_NONBLOCK
 
 /* Extern Global Variables */
--- ltp-full-20090131.orig/testcases/kernel/syscalls/pipe2/pipe2_01.c	2009-01-16 19:18:58.000000000 +0900
+++ ltp-full-20090131.modified/testcases/kernel/syscalls/pipe2/pipe2_01.c	2009-02-04 10:46:48.000000000 +0900
@@ -69,21 +69,12 @@
 /* Harness Specific Include Files. */
 #include "test.h"
 #include "usctest.h"
+#include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
 # define O_CLOEXEC 02000000
 #endif
 
-#ifndef __NR_pipe2
-# ifdef __x86_64__
-#  define __NR_pipe2 293
-# elif defined __i386__
-#  define __NR_pipe2 331
-# else
-#  error "need __NR_pipe2"
-# endif
-#endif
-
 /* Extern Global Variables */
 extern int  Tst_count;               /* counter for tst_xxx routines.         */
 extern char *TESTDIR;                /* temporary dir created by tst_tmpdir() */
--- ltp-full-20090131.orig/testcases/kernel/syscalls/pipe2/pipe2_02.c	2009-01-16 19:34:52.000000000 +0900
+++ ltp-full-20090131.modified/testcases/kernel/syscalls/pipe2/pipe2_02.c	2009-02-04 10:46:58.000000000 +0900
@@ -60,21 +60,12 @@
 /* Harness Specific Include Files. */
 #include "test.h"
 #include "usctest.h"
+#include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
 # define O_CLOEXEC 02000000
 #endif
 
-#ifndef __NR_pipe2
-# ifdef __x86_64__
-#  define __NR_pipe2 293
-# elif defined __i386__
-#  define __NR_pipe2 331
-# else
-#  error "need __NR_pipe2"
-# endif
-#endif
-
 /* Extern Global Variables */
 extern int  Tst_count;               /* counter for tst_xxx routines.         */
 extern char *TESTDIR;                /* temporary dir created by tst_tmpdir() */
--- ltp-full-20090131.orig/testcases/kernel/syscalls/signalfd4/signalfd4_01.c	2009-01-16 19:07:56.000000000 +0900
+++ ltp-full-20090131.modified/testcases/kernel/syscalls/signalfd4/signalfd4_01.c	2009-02-04 10:47:08.000000000 +0900
@@ -63,20 +63,12 @@
 /* Harness Specific Include Files. */
 #include "test.h"
 #include "usctest.h"
+#include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
 # define O_CLOEXEC 02000000
 #endif
 
-#ifndef __NR_signalfd4
-# ifdef __x86_64__
-#  define __NR_signalfd4 289
-# elif defined __i386__
-#  define __NR_signalfd4 327
-# else
-#  error "need __NR_signalfd4"
-# endif
-#endif
 #define SFD_CLOEXEC O_CLOEXEC
 
 /* Extern Global Variables */
--- ltp-full-20090131.orig/testcases/kernel/syscalls/signalfd4/signalfd4_02.c	2009-01-16 19:29:50.000000000 +0900
+++ ltp-full-20090131.modified/testcases/kernel/syscalls/signalfd4/signalfd4_02.c	2009-02-04 10:47:19.000000000 +0900
@@ -59,16 +59,7 @@
 /* Harness Specific Include Files. */
 #include "test.h"
 #include "usctest.h"
-
-#ifndef __NR_signalfd4
-# ifdef __x86_64__
-#  define __NR_signalfd4 289
-# elif defined __i386__
-#  define __NR_signalfd4 327
-# else
-#  error "need __NR_signalfd4"
-# endif
-#endif
+#include "linux_syscall_numbers.h"
 
 #define SFD_NONBLOCK O_NONBLOCK
 
--- ltp-full-20090131.orig/testcases/kernel/syscalls/timerfd/timerfd02.c	2009-01-16 19:12:03.000000000 +0900
+++ ltp-full-20090131.modified/testcases/kernel/syscalls/timerfd/timerfd02.c	2009-02-04 10:47:29.000000000 +0900
@@ -63,16 +63,7 @@
 /* Harness Specific Include Files. */
 #include "test.h"
 #include "usctest.h"
-
-#ifndef __NR_timerfd_create
-# ifdef __x86_64__
-#  define __NR_timerfd_create 283
-# elif defined __i386__
-#  define __NR_timerfd_create 322
-# else
-#  error "need __NR_timerfd_create"
-# endif
-#endif
+#include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
 # define O_CLOEXEC 02000000
--- ltp-full-20090131.orig/testcases/kernel/syscalls/timerfd/timerfd03.c	2009-01-16 19:33:26.000000000 +0900
+++ ltp-full-20090131.modified/testcases/kernel/syscalls/timerfd/timerfd03.c	2009-02-04 10:47:40.000000000 +0900
@@ -59,21 +59,12 @@
 /* Harness Specific Include Files. */
 #include "test.h"
 #include "usctest.h"
+#include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
 # define O_CLOEXEC 02000000
 #endif
 
-#ifndef __NR_timerfd_create
-# ifdef __x86_64__
-#  define __NR_timerfd_create 283
-# elif defined __i386__
-#  define __NR_timerfd_create 322
-# else
-#  error "need __NR_timerfd_create"
-# endif
-#endif
-
 #define TFD_NONBLOCK O_NONBLOCK
 
 /* Extern Global Variables */