diff options
Diffstat (limited to 'meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch')
-rw-r--r-- | meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch b/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch index e325ce4e49..428ac30049 100644 --- a/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch +++ b/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch | |||
@@ -11,9 +11,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
11 | Upstream-Status: Pending | 11 | Upstream-Status: Pending |
12 | --- | 12 | --- |
13 | testcases/kernel/syscalls/accept4/accept4_01.c | 9 ++++- | 13 | testcases/kernel/syscalls/accept4/accept4_01.c | 9 ++++- |
14 | testcases/kernel/syscalls/getcpu/getcpu01.c | 40 +++++++++++++++++++++- | 14 | testcases/kernel/syscalls/getcpu/getcpu01.c | 39 +++++++++++++++++++++- |
15 | .../sched_getaffinity/sched_getaffinity01.c | 26 ++++++++++++++ | 15 | .../sched_getaffinity/sched_getaffinity01.c | 26 +++++++++++++++ |
16 | 3 files changed, 73 insertions(+), 2 deletions(-) | 16 | 3 files changed, 72 insertions(+), 2 deletions(-) |
17 | 17 | ||
18 | diff --git a/testcases/kernel/syscalls/accept4/accept4_01.c b/testcases/kernel/syscalls/accept4/accept4_01.c | 18 | diff --git a/testcases/kernel/syscalls/accept4/accept4_01.c b/testcases/kernel/syscalls/accept4/accept4_01.c |
19 | index 6072bfa..2b090cb 100644 | 19 | index 6072bfa..2b090cb 100644 |
@@ -102,7 +102,7 @@ index c927512..921b107 100644 | |||
102 | *cpu_id = sched_getcpu(); | 102 | *cpu_id = sched_getcpu(); |
103 | #endif | 103 | #endif |
104 | return 0; | 104 | return 0; |
105 | @@ -191,15 +204,20 @@ unsigned int set_cpu_affinity(void) | 105 | @@ -191,15 +203,20 @@ unsigned int set_cpu_affinity(void) |
106 | cpu_set_t *set; | 106 | cpu_set_t *set; |
107 | size_t size; | 107 | size_t size; |
108 | int nrcpus = 1024; | 108 | int nrcpus = 1024; |
@@ -123,7 +123,7 @@ index c927512..921b107 100644 | |||
123 | #if __GLIBC_PREREQ(2, 7) | 123 | #if __GLIBC_PREREQ(2, 7) |
124 | size = CPU_ALLOC_SIZE(nrcpus); | 124 | size = CPU_ALLOC_SIZE(nrcpus); |
125 | CPU_ZERO_S(size, set); | 125 | CPU_ZERO_S(size, set); |
126 | @@ -207,8 +225,13 @@ realloc: | 126 | @@ -207,8 +224,13 @@ realloc: |
127 | size = sizeof(cpu_set_t); | 127 | size = sizeof(cpu_set_t); |
128 | CPU_ZERO(set); | 128 | CPU_ZERO(set); |
129 | #endif | 129 | #endif |
@@ -137,7 +137,7 @@ index c927512..921b107 100644 | |||
137 | #if __GLIBC_PREREQ(2, 7) | 137 | #if __GLIBC_PREREQ(2, 7) |
138 | if (errno == EINVAL && nrcpus < (1024 << 8)) { | 138 | if (errno == EINVAL && nrcpus < (1024 << 8)) { |
139 | nrcpus = nrcpus << 2; | 139 | nrcpus = nrcpus << 2; |
140 | @@ -220,10 +243,17 @@ realloc: | 140 | @@ -220,10 +242,17 @@ realloc: |
141 | "NR_CPUS of the kernel is more than 1024, so we'd better use a newer glibc(>= 2.7)"); | 141 | "NR_CPUS of the kernel is more than 1024, so we'd better use a newer glibc(>= 2.7)"); |
142 | else | 142 | else |
143 | #endif | 143 | #endif |
@@ -155,7 +155,7 @@ index c927512..921b107 100644 | |||
155 | #if __GLIBC_PREREQ(2, 7) | 155 | #if __GLIBC_PREREQ(2, 7) |
156 | CPU_ZERO_S(size, set); | 156 | CPU_ZERO_S(size, set); |
157 | CPU_SET_S(cpu_max, size, set); | 157 | CPU_SET_S(cpu_max, size, set); |
158 | @@ -231,6 +261,10 @@ realloc: | 158 | @@ -231,6 +260,10 @@ realloc: |
159 | CPU_ZERO(set); | 159 | CPU_ZERO(set); |
160 | CPU_SET(cpu_max, set); | 160 | CPU_SET(cpu_max, set); |
161 | #endif | 161 | #endif |
@@ -166,7 +166,7 @@ index c927512..921b107 100644 | |||
166 | if (sched_setaffinity(0, size, set) < 0) { | 166 | if (sched_setaffinity(0, size, set) < 0) { |
167 | CPU_FREE(set); | 167 | CPU_FREE(set); |
168 | tst_brkm(TFAIL, NULL, "sched_setaffinity:errno:%d", errno); | 168 | tst_brkm(TFAIL, NULL, "sched_setaffinity:errno:%d", errno); |
169 | @@ -247,11 +281,15 @@ unsigned int max_cpuid(size_t size, cpu_set_t * set) | 169 | @@ -247,11 +280,15 @@ unsigned int max_cpuid(size_t size, cpu_set_t * set) |
170 | { | 170 | { |
171 | unsigned int index, max = 0; | 171 | unsigned int index, max = 0; |
172 | for (index = 0; index < size * BITS_PER_BYTE; index++) | 172 | for (index = 0; index < size * BITS_PER_BYTE; index++) |
@@ -186,7 +186,7 @@ diff --git a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c b | |||
186 | index 9d6a81a..4ed13b2 100644 | 186 | index 9d6a81a..4ed13b2 100644 |
187 | --- a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c | 187 | --- a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c |
188 | +++ b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c | 188 | +++ b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c |
189 | @@ -66,9 +66,11 @@ do { \ | 189 | @@ -67,9 +67,11 @@ do { \ |
190 | tst_resm((TEST_RETURN == -1 ? TPASS : TFAIL) | TTERRNO, #t); \ | 190 | tst_resm((TEST_RETURN == -1 ? TPASS : TFAIL) | TTERRNO, #t); \ |
191 | } while (0) | 191 | } while (0) |
192 | 192 | ||
@@ -198,7 +198,7 @@ index 9d6a81a..4ed13b2 100644 | |||
198 | 198 | ||
199 | int main(int ac, char **av) | 199 | int main(int ac, char **av) |
200 | { | 200 | { |
201 | @@ -95,14 +97,19 @@ static void do_test(void) | 201 | @@ -96,14 +98,19 @@ static void do_test(void) |
202 | pid_t unused_pid; | 202 | pid_t unused_pid; |
203 | unsigned len; | 203 | unsigned len; |
204 | 204 | ||
@@ -218,7 +218,7 @@ index 9d6a81a..4ed13b2 100644 | |||
218 | #if __GLIBC_PREREQ(2, 7) | 218 | #if __GLIBC_PREREQ(2, 7) |
219 | len = CPU_ALLOC_SIZE(nrcpus); | 219 | len = CPU_ALLOC_SIZE(nrcpus); |
220 | CPU_ZERO_S(len, mask); | 220 | CPU_ZERO_S(len, mask); |
221 | @@ -110,10 +117,15 @@ realloc: | 221 | @@ -111,10 +118,15 @@ realloc: |
222 | len = sizeof(cpu_set_t); | 222 | len = sizeof(cpu_set_t); |
223 | CPU_ZERO(mask); | 223 | CPU_ZERO(mask); |
224 | #endif | 224 | #endif |
@@ -234,7 +234,7 @@ index 9d6a81a..4ed13b2 100644 | |||
234 | #if __GLIBC_PREREQ(2, 7) | 234 | #if __GLIBC_PREREQ(2, 7) |
235 | if (errno == EINVAL && nrcpus < (1024 << 8)) { | 235 | if (errno == EINVAL && nrcpus < (1024 << 8)) { |
236 | nrcpus = nrcpus << 2; | 236 | nrcpus = nrcpus << 2; |
237 | @@ -125,17 +137,27 @@ realloc: | 237 | @@ -126,17 +138,27 @@ realloc: |
238 | "newer glibc(>= 2.7)"); | 238 | "newer glibc(>= 2.7)"); |
239 | else | 239 | else |
240 | #endif | 240 | #endif |
@@ -262,7 +262,7 @@ index 9d6a81a..4ed13b2 100644 | |||
262 | if (TEST_RETURN != -1) | 262 | if (TEST_RETURN != -1) |
263 | tst_resm(TPASS, "sched_getaffinity() succeed, " | 263 | tst_resm(TPASS, "sched_getaffinity() succeed, " |
264 | "this process %d is running " | 264 | "this process %d is running " |
265 | @@ -143,11 +165,15 @@ realloc: | 265 | @@ -144,11 +166,15 @@ realloc: |
266 | } | 266 | } |
267 | } | 267 | } |
268 | 268 | ||