diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2019-07-19 13:13:18 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-07-19 16:19:14 +0100 |
commit | a921c2f9dbefde3592bfe65c80ff1ce973aac89b (patch) | |
tree | 26b492438631afde3c24b777ed7f960a750c26d7 /meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch | |
parent | 161d036569c17d28a1ce625a1c2e258fb6cb18c3 (diff) | |
download | poky-a921c2f9dbefde3592bfe65c80ff1ce973aac89b.tar.gz |
ltp: upgrade 20190115 -> 20190517
Drop the following patches since the issues have been fixed upstream:
0001-file01.sh-Fix-in-was-not-recognized.patch
0001-lapi-Define-TST_ABI-32-64-to-detect-target-type.patch
0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch
0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch
0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch
0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch
0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch
0026-crash01-Define-_GNU_SOURCE.patch
0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch
0034-periodic_output.patch
0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch
define-sigrtmin-and-sigrtmax-for-musl.patch
setregid01-security-string-formatting.patch
Refresh the following patches:
0004-build-Add-option-to-select-libc-implementation.patch
0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch
0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
0018-guard-mallocopt-with-__GLIBC__.patch
0020-getdents-define-getdents-getdents64-only-for-glibc.patch
0035-fix-test_proc_kill-hang.patch
0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch
0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch
0001-shmctl01-don-t-use-hardcoded-index-0-for-SHM_STAT-te.patch
0001-diotest4-Let-kernel-pick-an-address-when-calling-mma.patch
0001-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch
Add patch:
0006-rt_tgsigqueueinfo-disable-test-on-musl.patch
(From OE-Core rev: eb59546c83f4c217de6272a8d3b2fa65e3c84e7f)
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 | 151 |
1 files changed, 0 insertions, 151 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 deleted file mode 100644 index 7311ee2e41..0000000000 --- a/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch +++ /dev/null | |||
@@ -1,151 +0,0 @@ | |||
1 | From fc2b47ad979a87bfbd11aeea3f67c26e7fb39e30 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 7 Jan 2016 19:40:08 +0000 | ||
4 | Subject: [PATCH] Check if __GLIBC_PREREQ is defined before using it | ||
5 | |||
6 | __GLIBC_PREREQ is specific to glibc so it should be checked if it is | ||
7 | defined or not. | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | --- | ||
13 | .../kernel/syscalls/accept4/accept4_01.c | 9 ++++++- | ||
14 | .../sched_getaffinity/sched_getaffinity01.c | 26 +++++++++++++++++++ | ||
15 | 2 files changed, 34 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/testcases/kernel/syscalls/accept4/accept4_01.c b/testcases/kernel/syscalls/accept4/accept4_01.c | ||
18 | index dec4ef93b..c5d74b07f 100644 | ||
19 | --- a/testcases/kernel/syscalls/accept4/accept4_01.c | ||
20 | +++ b/testcases/kernel/syscalls/accept4/accept4_01.c | ||
21 | @@ -64,6 +64,7 @@ static void cleanup(void) | ||
22 | tst_rmdir(); | ||
23 | } | ||
24 | |||
25 | +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) | ||
26 | #if !(__GLIBC_PREREQ(2, 10)) | ||
27 | static int | ||
28 | accept4_01(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags) | ||
29 | @@ -82,7 +83,6 @@ accept4_01(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags) | ||
30 | } | ||
31 | tst_resm(TINFO, "\n"); | ||
32 | #endif | ||
33 | - | ||
34 | #if USE_SOCKETCALL | ||
35 | long args[6]; | ||
36 | |||
37 | @@ -97,6 +97,7 @@ accept4_01(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags) | ||
38 | #endif | ||
39 | } | ||
40 | #endif | ||
41 | +#endif | ||
42 | |||
43 | static void | ||
44 | do_test(int lfd, struct sockaddr_in *conn_addr, | ||
45 | @@ -119,9 +120,15 @@ do_test(int lfd, struct sockaddr_in *conn_addr, | ||
46 | die("Connect Error"); | ||
47 | |||
48 | addrlen = sizeof(struct sockaddr_in); | ||
49 | +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) | ||
50 | #if !(__GLIBC_PREREQ(2, 10)) | ||
51 | acceptfd = accept4_01(lfd, (struct sockaddr *)&claddr, &addrlen, | ||
52 | closeonexec_flag | nonblock_flag); | ||
53 | + | ||
54 | +#else | ||
55 | + acceptfd = accept4(lfd, (struct sockaddr *)&claddr, &addrlen, | ||
56 | + closeonexec_flag | nonblock_flag); | ||
57 | +#endif | ||
58 | #else | ||
59 | acceptfd = accept4(lfd, (struct sockaddr *)&claddr, &addrlen, | ||
60 | closeonexec_flag | nonblock_flag); | ||
61 | diff --git a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c | ||
62 | index 02f04b909..d906d7e09 100644 | ||
63 | --- a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c | ||
64 | +++ b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c | ||
65 | @@ -67,9 +67,11 @@ do { \ | ||
66 | tst_resm((TEST_RETURN == -1 ? TPASS : TFAIL) | TTERRNO, #t); \ | ||
67 | } while (0) | ||
68 | |||
69 | +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) | ||
70 | #if !(__GLIBC_PREREQ(2, 7)) | ||
71 | #define CPU_FREE(ptr) free(ptr) | ||
72 | #endif | ||
73 | +#endif | ||
74 | |||
75 | int main(int ac, char **av) | ||
76 | { | ||
77 | @@ -96,17 +98,26 @@ static void do_test(void) | ||
78 | pid_t unused_pid; | ||
79 | unsigned len; | ||
80 | |||
81 | +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) | ||
82 | #if __GLIBC_PREREQ(2, 7) | ||
83 | realloc: | ||
84 | mask = CPU_ALLOC(nrcpus); | ||
85 | +#else | ||
86 | + mask = malloc(sizeof(cpu_set_t)); | ||
87 | +#endif | ||
88 | #else | ||
89 | mask = malloc(sizeof(cpu_set_t)); | ||
90 | #endif | ||
91 | if (mask == NULL) | ||
92 | tst_brkm(TFAIL | TTERRNO, cleanup, "fail to get enough memory"); | ||
93 | +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) | ||
94 | #if __GLIBC_PREREQ(2, 7) | ||
95 | len = CPU_ALLOC_SIZE(nrcpus); | ||
96 | CPU_ZERO_S(len, mask); | ||
97 | +#else | ||
98 | + len = sizeof(cpu_set_t); | ||
99 | + CPU_ZERO(mask); | ||
100 | +#endif | ||
101 | #else | ||
102 | len = sizeof(cpu_set_t); | ||
103 | CPU_ZERO(mask); | ||
104 | @@ -115,11 +126,18 @@ realloc: | ||
105 | TEST(sched_getaffinity(0, len, mask)); | ||
106 | if (TEST_RETURN == -1) { | ||
107 | CPU_FREE(mask); | ||
108 | +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) | ||
109 | #if __GLIBC_PREREQ(2, 7) | ||
110 | if (errno == EINVAL && nrcpus < (1024 << 8)) { | ||
111 | nrcpus = nrcpus << 2; | ||
112 | goto realloc; | ||
113 | } | ||
114 | +#else | ||
115 | + if (errno == EINVAL) | ||
116 | + tst_resm(TFAIL, "NR_CPUS > 1024, we'd better use a " | ||
117 | + "newer glibc(>= 2.7)"); | ||
118 | + else | ||
119 | +#endif | ||
120 | #else | ||
121 | if (errno == EINVAL) | ||
122 | tst_resm(TFAIL, "NR_CPUS > 1024, we'd better use a " | ||
123 | @@ -132,8 +150,12 @@ realloc: | ||
124 | tst_resm(TINFO, "cpusetsize is %d", len); | ||
125 | tst_resm(TINFO, "mask.__bits[0] = %lu ", mask->__bits[0]); | ||
126 | for (i = 0; i < num; i++) { | ||
127 | +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) | ||
128 | #if __GLIBC_PREREQ(2, 7) | ||
129 | TEST(CPU_ISSET_S(i, len, mask)); | ||
130 | +#else | ||
131 | + TEST(CPU_ISSET(i, mask)); | ||
132 | +#endif | ||
133 | #else | ||
134 | TEST(CPU_ISSET(i, mask)); | ||
135 | #endif | ||
136 | @@ -144,8 +166,12 @@ realloc: | ||
137 | } | ||
138 | } | ||
139 | |||
140 | +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) | ||
141 | #if __GLIBC_PREREQ(2, 7) | ||
142 | CPU_ZERO_S(len, mask); | ||
143 | +#else | ||
144 | + CPU_ZERO(mask); | ||
145 | +#endif | ||
146 | #else | ||
147 | CPU_ZERO(mask); | ||
148 | #endif | ||
149 | -- | ||
150 | 2.17.1 | ||
151 | |||