summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorDengke Du <dengke.du@windriver.com>2017-08-11 03:38:57 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-16 00:03:14 +0100
commitb3ca36e7d1fa00d5c441ebbc89d719dfea56eb1d (patch)
tree353d2d35277961f61aab95838c16ef57b4de49e1 /meta/recipes-extended
parent54cdf84d42d30f0656d3fd538a739237c715d257 (diff)
downloadpoky-b3ca36e7d1fa00d5c441ebbc89d719dfea56eb1d.tar.gz
ltp: upgrade to upstream latest commit on 20170804
1. Drop 4 patches because the upstream already contains them: 0001-dirtyc0w-Include-stdint.h.patch 0006-fix-PATH_MAX-undeclared-when-building-with-musl.patch 0037-faccessat-and-fchmodat-Fix-build-warnings.patch 0038-syscalls-add_key02-update-to-test-fix-for-nonempty-N.patch 2. Drop the do_compile_prepend function, because the upstream already fix the parallel make race, we can check it here: https://github.com/linux-test-project/ltp/commit/3f385652efe811fe7491474f8513baf44cf0a12d 3. Fix PAGE_SIZE redefinition and O_CREAT undeclear build failures when using musl 4. Fix runtime failed case file01 (From OE-Core rev: 46feafdc13b8c3c4b03d44a4a95a87d4ee25300c) Signed-off-by: Dengke Du <dengke.du@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-dirtyc0w-Include-stdint.h.patch34
-rw-r--r--meta/recipes-extended/ltp/ltp/0006-fix-PATH_MAX-undeclared-when-building-with-musl.patch31
-rw-r--r--meta/recipes-extended/ltp/ltp/0037-faccessat-and-fchmodat-Fix-build-warnings.patch68
-rw-r--r--meta/recipes-extended/ltp/ltp/0037-ltp-fix-PAGE_SIZE-redefinition-and-O_CREAT-undeclear.patch113
-rw-r--r--meta/recipes-extended/ltp/ltp/0038-syscalls-add_key02-update-to-test-fix-for-nonempty-N.patch136
-rw-r--r--meta/recipes-extended/ltp/ltp_20170516.bb18
6 files changed, 115 insertions, 285 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-dirtyc0w-Include-stdint.h.patch b/meta/recipes-extended/ltp/ltp/0001-dirtyc0w-Include-stdint.h.patch
deleted file mode 100644
index 5c73be440b..0000000000
--- a/meta/recipes-extended/ltp/ltp/0001-dirtyc0w-Include-stdint.h.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1From 1b30d8dac1a37dc0abbb3b545db2824d6489e23f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 9 Jun 2017 09:32:13 -0700
4Subject: [PATCH] dirtyc0w: Include stdint.h
5
6uintptr_t is defined in stdint.h
7
8Fixes
9| dirtyc0w_child.c:76:15: error: 'uintptr_t' undeclared (first use in this function); did you mean 'intptr_t'?
10| lseek(mfd, (uintptr_t) map, SEEK_SET);
11| ^~~~~~~~~
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15Upstream-Status: Submitted
16
17 testcases/kernel/security/dirtyc0w/dirtyc0w_child.c | 1 +
18 1 file changed, 1 insertion(+)
19
20diff --git a/testcases/kernel/security/dirtyc0w/dirtyc0w_child.c b/testcases/kernel/security/dirtyc0w/dirtyc0w_child.c
21index 5328a9bc4..49abdd6ba 100644
22--- a/testcases/kernel/security/dirtyc0w/dirtyc0w_child.c
23+++ b/testcases/kernel/security/dirtyc0w/dirtyc0w_child.c
24@@ -23,6 +23,7 @@
25 #include <sys/stat.h>
26 #include <string.h>
27 #include <stdlib.h>
28+#include <stdint.h>
29 #include <pwd.h>
30
31 #include "tst_safe_pthread.h"
32--
332.13.1
34
diff --git a/meta/recipes-extended/ltp/ltp/0006-fix-PATH_MAX-undeclared-when-building-with-musl.patch b/meta/recipes-extended/ltp/ltp/0006-fix-PATH_MAX-undeclared-when-building-with-musl.patch
deleted file mode 100644
index 020ddfe3bf..0000000000
--- a/meta/recipes-extended/ltp/ltp/0006-fix-PATH_MAX-undeclared-when-building-with-musl.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From b906ec2fe4711a727e198cd9259287c042eef8e2 Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Thu, 9 Feb 2017 16:41:12 +0800
4Subject: [PATCH] fix PATH_MAX undeclared when building with musl
5
6fix PATH_MAX undeclared when building with musl.
7
8Upstream-Status: Submitted [https://github.com/linux-test-project/ltp/pull/176]
9
10Signed-off-by: Dengke Du <dengke.du@windriver.com>
11---
12 include/tst_test.h | 3 +++
13 1 file changed, 3 insertions(+)
14
15diff --git a/include/tst_test.h b/include/tst_test.h
16index 335c82684..4dfa1511b 100644
17--- a/include/tst_test.h
18+++ b/include/tst_test.h
19@@ -23,6 +23,9 @@
20 #endif /* __TEST_H__ */
21
22 #include <unistd.h>
23+#ifndef __GLIBC__
24+#include <limits.h>
25+#endif
26
27 #include "tst_common.h"
28 #include "tst_res_flags.h"
29--
302.11.0
31
diff --git a/meta/recipes-extended/ltp/ltp/0037-faccessat-and-fchmodat-Fix-build-warnings.patch b/meta/recipes-extended/ltp/ltp/0037-faccessat-and-fchmodat-Fix-build-warnings.patch
deleted file mode 100644
index 99497d655a..0000000000
--- a/meta/recipes-extended/ltp/ltp/0037-faccessat-and-fchmodat-Fix-build-warnings.patch
+++ /dev/null
@@ -1,68 +0,0 @@
1From 4141bdb441f7576a2e73abeb2a0fb1c7b8bd8647 Mon Sep 17 00:00:00 2001
2From: Naresh Kamboju <naresh.kamboju@linaro.org>
3Date: Mon, 19 Jun 2017 19:01:21 +0530
4Subject: [PATCH 1/7] faccessat and fchmodat: Fix build warnings
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Fixing below build warnings.
10
11ltp-full-20170516/testcases/kernel/syscalls/faccessat$ make
12In file included from ../../../../include/old/test.h:51:0,
13 from faccessat01.c:44:
14faccessat01.c: In function ‘setup’:
15../../../../include/old/old_safe_file_ops.h:55:27:
16warning: format not a string literal and no format arguments [-Wformat-security]
17 (path), (fmt), ## __VA_ARGS__)
18 ^
19faccessat01.c:132:2: note: in expansion of macro ‘SAFE_FILE_PRINTF’
20 SAFE_FILE_PRINTF(cleanup, testfile, testfile);
21 ^
22../../../../include/old/old_safe_file_ops.h:55:27:
23warning: format not a string literal and no format arguments [-Wformat-security]
24 (path), (fmt), ## __VA_ARGS__)
25 ^
26faccessat01.c:133:2: note: in expansion of macro ‘SAFE_FILE_PRINTF’
27 SAFE_FILE_PRINTF(cleanup, testfile2, testfile2);
28
29Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
30Upstream-Status: Accepted [https://github.com/linux-test-project/ltp/commit/4141bdb441f7576a2e73abeb2a0fb1c7b8bd8647]
31---
32 testcases/kernel/syscalls/faccessat/faccessat01.c | 4 ++--
33 testcases/kernel/syscalls/fchmodat/fchmodat01.c | 4 ++--
34 2 files changed, 4 insertions(+), 4 deletions(-)
35
36diff --git a/testcases/kernel/syscalls/faccessat/faccessat01.c b/testcases/kernel/syscalls/faccessat/faccessat01.c
37index 622dfd3b0..def7fa755 100644
38--- a/testcases/kernel/syscalls/faccessat/faccessat01.c
39+++ b/testcases/kernel/syscalls/faccessat/faccessat01.c
40@@ -129,8 +129,8 @@ void setup(void)
41 fds[0] = SAFE_OPEN(cleanup, pathname, O_DIRECTORY);
42 fds[1] = fds[4] = fds[0];
43
44- SAFE_FILE_PRINTF(cleanup, testfile, testfile);
45- SAFE_FILE_PRINTF(cleanup, testfile2, testfile2);
46+ SAFE_FILE_PRINTF(cleanup, testfile, "%s", testfile);
47+ SAFE_FILE_PRINTF(cleanup, testfile2, "%s", testfile2);
48
49 fds[2] = SAFE_OPEN(cleanup, testfile3, O_CREAT | O_RDWR, 0600);
50
51diff --git a/testcases/kernel/syscalls/fchmodat/fchmodat01.c b/testcases/kernel/syscalls/fchmodat/fchmodat01.c
52index 6bf66d8b8..7856ed3fa 100644
53--- a/testcases/kernel/syscalls/fchmodat/fchmodat01.c
54+++ b/testcases/kernel/syscalls/fchmodat/fchmodat01.c
55@@ -127,8 +127,8 @@ void setup(void)
56 fds[0] = SAFE_OPEN(cleanup, pathname, O_DIRECTORY);
57 fds[1] = fds[4] = fds[0];
58
59- SAFE_FILE_PRINTF(cleanup, testfile, testfile);
60- SAFE_FILE_PRINTF(cleanup, testfile2, testfile2);
61+ SAFE_FILE_PRINTF(cleanup, testfile, "%s", testfile);
62+ SAFE_FILE_PRINTF(cleanup, testfile2, "%s", testfile2);
63
64 fds[2] = SAFE_OPEN(cleanup, testfile3, O_CREAT | O_RDWR, 0600);
65 fds[3] = 100;
66--
672.13.0
68
diff --git a/meta/recipes-extended/ltp/ltp/0037-ltp-fix-PAGE_SIZE-redefinition-and-O_CREAT-undeclear.patch b/meta/recipes-extended/ltp/ltp/0037-ltp-fix-PAGE_SIZE-redefinition-and-O_CREAT-undeclear.patch
new file mode 100644
index 0000000000..c8738ae0d4
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0037-ltp-fix-PAGE_SIZE-redefinition-and-O_CREAT-undeclear.patch
@@ -0,0 +1,113 @@
1From a9d5595d2fa2ab252f1cabf63f4b65c3efbafeb9 Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Thu, 10 Aug 2017 15:27:03 +0800
4Subject: [PATCH] ltp: fix PAGE_SIZE redefinition and O_CREAT undeclear when
5 build with musl
6
7error 1:
8
9|stack_clash.c:50:22: error: expected identifier or '(' before numeric constant
10| static unsigned long PAGE_SIZE;
11
12This is because the musl libc already contain PAGE_SIZE definition in limits.c,
13we can check it here:
14
15 https://git.musl-libc.org/cgit/musl/tree/include/limits.h#n43
16
17error 2:
18
19|ck01.c:157:22: error: 'O_CREAT' undeclared (first use in this function); did you mean 'S_IREAD'?
20| fd = open(filename, O_CREAT | O_TRUNC | O_RDWR, 0644);
21| ^~~~~~~
22| S_IREAD
23
24This is because the musl libc put those in fcntl.h, so we should include that
25file.
26
27Upstream-Status: Submitted [ https://github.com/linux-test-project/ltp/pull/194 ]
28
29Signed-off-by: Dengke Du <dengke.du@windriver.com>
30---
31 testcases/cve/stack_clash.c | 12 ++++++------
32 testcases/kernel/syscalls/flock/flock01.c | 1 +
33 testcases/kernel/syscalls/flock/flock02.c | 1 +
34 3 files changed, 8 insertions(+), 6 deletions(-)
35
36diff --git a/testcases/cve/stack_clash.c b/testcases/cve/stack_clash.c
37index 2ef1a82..7c45991 100644
38--- a/testcases/cve/stack_clash.c
39+++ b/testcases/cve/stack_clash.c
40@@ -47,7 +47,7 @@
41 #include "tst_test.h"
42 #include "tst_safe_stdio.h"
43
44-static unsigned long PAGE_SIZE;
45+static unsigned long PAGE_SIZE_tst;
46 static unsigned long PAGE_MASK;
47 static unsigned long GAP_PAGES = 256;
48 static unsigned long THRESHOLD;
49@@ -66,7 +66,7 @@ void exhaust_stack_into_sigsegv(void)
50 exhaust_stack_into_sigsegv();
51 }
52
53-#define MAPPED_LEN PAGE_SIZE
54+#define MAPPED_LEN PAGE_SIZE_tst
55 static unsigned long mapped_addr;
56
57 void segv_handler(int sig, siginfo_t *info, void *data LTP_ATTRIBUTE_UNUSED)
58@@ -150,7 +150,7 @@ void do_child(void)
59 stack_t signal_stack;
60 struct sigaction segv_sig = {.sa_sigaction = segv_handler, .sa_flags = SA_ONSTACK|SA_SIGINFO};
61 void *map;
62- unsigned long gap = GAP_PAGES * PAGE_SIZE;
63+ unsigned long gap = GAP_PAGES * PAGE_SIZE_tst;
64 struct rlimit rlimit;
65
66 rlimit.rlim_cur = rlimit.rlim_max = RLIM_INFINITY;
67@@ -200,8 +200,8 @@ void setup(void)
68 {
69 char buf[4096], *p;
70
71- PAGE_SIZE = sysconf(_SC_PAGESIZE);
72- PAGE_MASK = ~(PAGE_SIZE - 1);
73+ PAGE_SIZE_tst = sysconf(_SC_PAGESIZE);
74+ PAGE_MASK = ~(PAGE_SIZE_tst - 1);
75
76 buf[4095] = '\0';
77 SAFE_FILE_SCANF("/proc/cmdline", "%4095[^\n]", buf);
78@@ -214,7 +214,7 @@ void setup(void)
79 tst_res(TINFO, "stack_guard_gap = %ld", GAP_PAGES);
80 }
81
82- THRESHOLD = (GAP_PAGES - 1) * PAGE_SIZE;
83+ THRESHOLD = (GAP_PAGES - 1) * PAGE_SIZE_tst;
84
85 {
86 volatile int *a = alloca(128);
87diff --git a/testcases/kernel/syscalls/flock/flock01.c b/testcases/kernel/syscalls/flock/flock01.c
88index 3e17be4..06d89e3 100644
89--- a/testcases/kernel/syscalls/flock/flock01.c
90+++ b/testcases/kernel/syscalls/flock/flock01.c
91@@ -69,6 +69,7 @@
92 #include <stdio.h>
93 #include <sys/wait.h>
94 #include <sys/file.h>
95+#include <fcntl.h>
96 #include "test.h"
97
98 void setup(void);
99diff --git a/testcases/kernel/syscalls/flock/flock02.c b/testcases/kernel/syscalls/flock/flock02.c
100index 414df68..9ddf729 100644
101--- a/testcases/kernel/syscalls/flock/flock02.c
102+++ b/testcases/kernel/syscalls/flock/flock02.c
103@@ -75,6 +75,7 @@
104 #include <sys/types.h>
105 #include <sys/file.h>
106 #include <sys/wait.h>
107+#include <fcntl.h>
108 #include <errno.h>
109 #include <stdio.h>
110 #include "test.h"
111--
1122.7.4
113
diff --git a/meta/recipes-extended/ltp/ltp/0038-syscalls-add_key02-update-to-test-fix-for-nonempty-N.patch b/meta/recipes-extended/ltp/ltp/0038-syscalls-add_key02-update-to-test-fix-for-nonempty-N.patch
deleted file mode 100644
index 3759e1fa9f..0000000000
--- a/meta/recipes-extended/ltp/ltp/0038-syscalls-add_key02-update-to-test-fix-for-nonempty-N.patch
+++ /dev/null
@@ -1,136 +0,0 @@
1From 25045624e941ee76a13febd36187e23c6c435507 Mon Sep 17 00:00:00 2001
2From: Eric Biggers <ebiggers@google.com>
3Date: Mon, 12 Jun 2017 11:55:21 -0700
4Subject: [PATCH 01/39] syscalls/add_key02: update to test fix for nonempty
5 NULL payload
6
7add_key02 was supposed to be a "Basic test for the add_key() syscall",
8but it actually happened to test the obscure case of passing a NULL
9payload with nonzero length. This case was mishandled by the kernel,
10which either returned EINVAL or crashed with a NULL pointer dereference,
11depending on the key type. (The former applied to the test, as it used
12the "user" key type.) The expected behavior in this case is that the
13syscall fail with EFAULT.
14
15Update the test to expect the fixed behavior from v4.12-rc5, and make
16the test more thorough by testing additional key types, including ones
17that caused a NULL pointer dereference in unfixed kernels.
18
19Signed-off-by: Eric Biggers <ebiggers@google.com>
20Upstream-Status: Accepted [https://github.com/linux-test-project/ltp/commit/25045624e941ee76a13febd36187e23c6c435507]
21---
22 testcases/kernel/syscalls/add_key/add_key02.c | 69 ++++++++++++++++++++-------
23 1 file changed, 51 insertions(+), 18 deletions(-)
24
25diff --git a/testcases/kernel/syscalls/add_key/add_key02.c b/testcases/kernel/syscalls/add_key/add_key02.c
26index 866800d6f..2e3308dcd 100644
27--- a/testcases/kernel/syscalls/add_key/add_key02.c
28+++ b/testcases/kernel/syscalls/add_key/add_key02.c
29@@ -1,5 +1,6 @@
30 /******************************************************************************
31 * Copyright (c) Crackerjack Project., 2007 *
32+ * Copyright (c) 2017 Google, Inc. *
33 * *
34 * This program is free software; you can redistribute it and/or modify *
35 * it under the terms of the GNU General Public License as published by *
36@@ -18,10 +19,17 @@
37 ******************************************************************************/
38
39 /*
40- * Basic test for the add_key() syscall.
41+ * Test that the add_key() syscall correctly handles a NULL payload with nonzero
42+ * length. Specifically, it should fail with EFAULT rather than oopsing the
43+ * kernel with a NULL pointer dereference or failing with EINVAL, as it did
44+ * before (depending on the key type). This is a regression test for commit
45+ * 5649645d725c ("KEYS: fix dereferencing NULL payload with nonzero length").
46 *
47- * History: Porting from Crackerjack to LTP is done by
48- * Manas Kumar Nayak maknayak@in.ibm.com>
49+ * Note that none of the key types that exhibited the NULL pointer dereference
50+ * are guaranteed to be built into the kernel, so we just test as many as we
51+ * can, in the hope of catching one. We also test with the "user" key type for
52+ * good measure, although it was one of the types that failed with EINVAL rather
53+ * than dereferencing NULL.
54 */
55
56 #include "config.h"
57@@ -33,36 +41,61 @@
58
59 #ifdef HAVE_LINUX_KEYCTL_H
60 struct tcase {
61- char *type;
62- char *desc;
63- void *payload;
64- int plen;
65- int exp_errno;
66+ const char *type;
67+ size_t plen;
68 } tcases[] = {
69- {"user", "firstkey", NULL, 1, EINVAL}
70+ /*
71+ * The payload length we test for each key type needs to pass initial
72+ * validation but is otherwise arbitrary. Note: the "rxrpc_s" key type
73+ * requires a payload of exactly 8 bytes.
74+ */
75+ { "asymmetric", 64 },
76+ { "cifs.idmap", 64 },
77+ { "cifs.spnego", 64 },
78+ { "pkcs7_test", 64 },
79+ { "rxrpc", 64 },
80+ { "rxrpc_s", 8 },
81+ { "user", 64 },
82 };
83 #endif /* HAVE_LINUX_KEYCTL_H */
84
85 static void verify_add_key(unsigned int i)
86 {
87 #ifdef HAVE_LINUX_KEYCTL_H
88- TEST(tst_syscall(__NR_add_key, tcases[i].type, tcases[i].desc,
89- tcases[i].payload, tcases[i].plen,
90- KEY_SPEC_USER_KEYRING));
91+ TEST(tst_syscall(__NR_add_key, tcases[i].type, "abc:def",
92+ NULL, tcases[i].plen, KEY_SPEC_PROCESS_KEYRING));
93
94 if (TEST_RETURN != -1) {
95- tst_res(TFAIL, "add_key() passed unexpectedly");
96+ tst_res(TFAIL,
97+ "add_key() with key type '%s' unexpectedly succeeded",
98+ tcases[i].type);
99 return;
100 }
101
102- if (TEST_ERRNO == tcases[i].exp_errno) {
103- tst_res(TPASS | TTERRNO, "add_key() failed expectedly");
104+ if (TEST_ERRNO == EFAULT) {
105+ tst_res(TPASS, "received expected EFAULT with key type '%s'",
106+ tcases[i].type);
107 return;
108 }
109
110- tst_res(TFAIL | TTERRNO,
111- "add_key() failed unexpectedly, expected %s",
112- tst_strerrno(tcases[i].exp_errno));
113+ if (TEST_ERRNO == ENODEV) {
114+ tst_res(TCONF, "kernel doesn't support key type '%s'",
115+ tcases[i].type);
116+ return;
117+ }
118+
119+ /*
120+ * It's possible for the "asymmetric" key type to be supported, but with
121+ * no asymmetric key parsers registered. In that case, attempting to
122+ * add a key of type asymmetric will fail with EBADMSG.
123+ */
124+ if (TEST_ERRNO == EBADMSG && !strcmp(tcases[i].type, "asymmetric")) {
125+ tst_res(TCONF, "no asymmetric key parsers are registered");
126+ return;
127+ }
128+
129+ tst_res(TFAIL | TTERRNO, "unexpected error with key type '%s'",
130+ tcases[i].type);
131 #else
132 tst_brk(TCONF, "linux/keyctl.h was missing upon compilation.");
133 #endif /* HAVE_LINUX_KEYCTL_H */
134--
1352.13.0
136
diff --git a/meta/recipes-extended/ltp/ltp_20170516.bb b/meta/recipes-extended/ltp/ltp_20170516.bb
index 86b801288d..665e08f204 100644
--- a/meta/recipes-extended/ltp/ltp_20170516.bb
+++ b/meta/recipes-extended/ltp/ltp_20170516.bb
@@ -21,7 +21,7 @@ DEPENDS_append_libc-musl = " fts "
21EXTRA_OEMAKE_append_libc-musl = " LIBC=musl " 21EXTRA_OEMAKE_append_libc-musl = " LIBC=musl "
22CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__" 22CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__"
23CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" 23CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__"
24SRCREV = "6c6c6ca40afb3611e52486f670085762ff451e91" 24SRCREV = "18916a2e6d8c997b7b29dcfa9550d5a15b22ed22"
25 25
26SRC_URI = "git://github.com/linux-test-project/ltp.git \ 26SRC_URI = "git://github.com/linux-test-project/ltp.git \
27 file://0001-add-_GNU_SOURCE-to-pec_listener.c.patch \ 27 file://0001-add-_GNU_SOURCE-to-pec_listener.c.patch \
@@ -29,7 +29,6 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
29 file://0003-Add-knob-to-control-tirpc-support.patch \ 29 file://0003-Add-knob-to-control-tirpc-support.patch \
30 file://0004-build-Add-option-to-select-libc-implementation.patch \ 30 file://0004-build-Add-option-to-select-libc-implementation.patch \
31 file://0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \ 31 file://0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \
32 file://0006-fix-PATH_MAX-undeclared-when-building-with-musl.patch \
33 file://0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch \ 32 file://0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch \
34 file://0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch \ 33 file://0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch \
35 file://0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch \ 34 file://0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch \
@@ -49,9 +48,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
49 file://0034-periodic_output.patch \ 48 file://0034-periodic_output.patch \
50 file://0035-fix-test_proc_kill-hang.patch \ 49 file://0035-fix-test_proc_kill-hang.patch \
51 file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \ 50 file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
52 file://0001-dirtyc0w-Include-stdint.h.patch \ 51 file://0037-ltp-fix-PAGE_SIZE-redefinition-and-O_CREAT-undeclear.patch \
53 file://0037-faccessat-and-fchmodat-Fix-build-warnings.patch \
54 file://0038-syscalls-add_key02-update-to-test-fix-for-nonempty-N.patch \
55 " 52 "
56 53
57S = "${WORKDIR}/git" 54S = "${WORKDIR}/git"
@@ -69,14 +66,6 @@ EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite "
69# ltp network/rpc test cases ftbfs when libtirpc is found 66# ltp network/rpc test cases ftbfs when libtirpc is found
70EXTRA_OECONF += " --without-tirpc " 67EXTRA_OECONF += " --without-tirpc "
71 68
72# The makefiles make excessive use of make -C and several include testcases.mk
73# which triggers a build of the syscall header. To reproduce, build ltp,
74# then delete the header, then "make -j XX" and watch regen.sh run multiple
75# times. Its easier to generate this once here instead.
76do_compile_prepend () {
77 ( make -C ${B}/testcases/kernel include/linux_syscall_numbers.h )
78}
79
80do_install(){ 69do_install(){
81 install -d ${D}/opt/ltp/ 70 install -d ${D}/opt/ltp/
82 oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install 71 oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install
@@ -89,9 +78,6 @@ do_install(){
89 # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible 78 # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible
90 rm -rf ${D}/opt/ltp/bin/STPfailure_report.pl 79 rm -rf ${D}/opt/ltp/bin/STPfailure_report.pl
91 80
92 # In oe-core, we doesn't support ksh and csh now, so remove in.csh and in.ksh.
93 rm ${D}/opt/ltp/testcases/data/file01/in.csh
94 rm ${D}/opt/ltp/testcases/data/file01/in.ksh
95 # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual 81 # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual
96 cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases 82 cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases
97} 83}