From 193236933b0f4ab91b1625b64e2187e2db4e0e8f Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Fri, 5 Apr 2019 15:28:33 -0400 Subject: reset upstream subtrees to HEAD Reset the following subtrees on HEAD: poky: 8217b477a1(master) meta-xilinx: 64aa3d35ae(master) meta-openembedded: 0435c9e193(master) meta-raspberrypi: 490a4441ac(master) meta-security: cb6d1c85ee(master) Squashed patches: meta-phosphor: drop systemd 239 patches meta-phosphor: mrw-api: use correct install path Change-Id: I268e2646d9174ad305630c6bbd3fbc1a6105f43d Signed-off-by: Brad Bishop --- .../ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch | 41 ----- ...r.sh-use-ping-6-when-ping6-is-not-avaliab.patch | 45 ----- ..._testsuite-mmap24-2-Relax-condition-a-bit.patch | 6 +- ...nfo01-recent-glibc-calls-syscall-directly.patch | 75 -------- ...ntl-make-OFD-command-use-fcntl64-syscall-.patch | 184 -------------------- ...-Add-option-to-select-libc-implementation.patch | 3 +- ...RDSIZE-undeclared-when-building-with-musl.patch | 2 +- ...__GLIBC_PREREQ-is-defined-before-using-it.patch | 190 ++++----------------- .../ltp/ltp/0035-fix-test_proc_kill-hang.patch | 2 +- ...s-ar01-Fix-for-test-in-deterministic-mode.patch | 42 ++--- ...fine-FNM_EXTMATCH-if-not-already-like-und.patch | 44 ----- ...69-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch | 97 ----------- ...est06.c-Fix-too-small-name-string-and-rel.patch | 34 ---- ...skip-S_ISGID-check-on-files-created-by-no.patch | 81 --------- .../define-sigrtmin-and-sigrtmax-for-musl.patch | 114 +++++++++++++ .../setregid01-security-string-formatting.patch | 46 +++++ poky/meta/recipes-extended/ltp/ltp_20180515.bb | 127 -------------- poky/meta/recipes-extended/ltp/ltp_20190115.bb | 122 +++++++++++++ 18 files changed, 339 insertions(+), 916 deletions(-) delete mode 100644 poky/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch delete mode 100644 poky/meta/recipes-extended/ltp/ltp/0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch delete mode 100644 poky/meta/recipes-extended/ltp/ltp/0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch delete mode 100644 poky/meta/recipes-extended/ltp/ltp/0001-syscalls-fcntl-make-OFD-command-use-fcntl64-syscall-.patch delete mode 100644 poky/meta/recipes-extended/ltp/ltp/0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch delete mode 100644 poky/meta/recipes-extended/ltp/ltp/0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch delete mode 100644 poky/meta/recipes-extended/ltp/ltp/0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch delete mode 100644 poky/meta/recipes-extended/ltp/ltp/0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch create mode 100644 poky/meta/recipes-extended/ltp/ltp/define-sigrtmin-and-sigrtmax-for-musl.patch create mode 100644 poky/meta/recipes-extended/ltp/ltp/setregid01-security-string-formatting.patch delete mode 100644 poky/meta/recipes-extended/ltp/ltp_20180515.bb create mode 100644 poky/meta/recipes-extended/ltp/ltp_20190115.bb (limited to 'poky/meta/recipes-extended/ltp') diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch b/poky/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch deleted file mode 100644 index 18eba27c2..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch +++ /dev/null @@ -1,41 +0,0 @@ -From b909805b4fc1b72e0ce299afb4abc02720ee81da Mon Sep 17 00:00:00 2001 -From: Dengke Du -Date: Wed, 12 Sep 2018 14:24:35 +0800 -Subject: [PATCH] mmap15: mips64 return EINVAL - -In mips64 kernel, system check the addr that passed to mmap: - - if (TASK_SIZE - len < addr) - return -EINVAL; - -Link: https://github.com/torvalds/linux/blob/master/arch/mips/mm/mmap.c#L71 - -Upstream-Status: Submitted [https://github.com/linux-test-project/ltp/pull/394] - -Signed-off-by: Dengke Du ---- - testcases/kernel/syscalls/mmap/mmap15.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/testcases/kernel/syscalls/mmap/mmap15.c b/testcases/kernel/syscalls/mmap/mmap15.c -index eff27d6..a10b5c7 100644 ---- a/testcases/kernel/syscalls/mmap/mmap15.c -+++ b/testcases/kernel/syscalls/mmap/mmap15.c -@@ -81,9 +81,14 @@ int main(int ac, char **av) - } - - if (errno != ENOMEM) { -+#ifdef __mips__ -+ tst_resm(TPASS | TERRNO, "mmap into high region " -+ "failed as expected"); -+#else - tst_resm(TFAIL | TERRNO, "mmap into high region " - "failed unexpectedly - expect " - "errno=ENOMEM, got"); -+#endif - } else { - tst_resm(TPASS | TERRNO, "mmap into high region " - "failed as expected"); --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch b/poky/meta/recipes-extended/ltp/ltp/0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch deleted file mode 100644 index 32e7a0eb2..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 76d8343ad300f6507233abcdf97629290e35848a Mon Sep 17 00:00:00 2001 -From: Lei Yang -Date: Wed, 29 Aug 2018 11:51:24 +0800 -Subject: [PATCH] netns_helper.sh: use 'ping -6' when ping6 is not avaliable - -ping6 has been merged into ping since 2015 by using "ping -6" -in some distributions (e.g. OpenEmbedded) they dropped ping6 completely -this patch will let both "ping -6" and ping6 work. - -[pvorel: change was done in s20150815: -ebad35f ("ping: merge `ping6` command into `ping`"), -before that release switch '-6' didn't exist. -Upstream leaves ping6 symlink to distributions.] - -Upstream-Status: Backport -[https://github.com/linux-test-project/ltp/commit/76d8343ad300f6507233abcdf97629290e35848a] - -Signed-off-by: Lei Yang -Signed-off-by: Petr Vorel -Signed-off-by: Yi Zhao ---- - testcases/kernel/containers/netns/netns_helper.sh | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/testcases/kernel/containers/netns/netns_helper.sh b/testcases/kernel/containers/netns/netns_helper.sh -index 6aea10b..a9d0459 100755 ---- a/testcases/kernel/containers/netns/netns_helper.sh -+++ b/testcases/kernel/containers/netns/netns_helper.sh -@@ -168,7 +168,12 @@ netns_setup() - ipv6) - IFCONF_IN6_ARG="inet6 add" - IP0=$6; IP1=$7; -- tping="ping6"; NETMASK=64 -+ if which ping6 >/dev/null 2>&1; then -+ tping="ping6" -+ else -+ tping="ping -6" -+ fi -+ NETMASK=64 - ;; - *) - tst_brkm TBROK "second argument must be an ip version (ipv4|ipv6)" --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch b/poky/meta/recipes-extended/ltp/ltp/0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch index 4d771c0b9..84736053b 100644 --- a/poky/meta/recipes-extended/ltp/ltp/0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch +++ b/poky/meta/recipes-extended/ltp/ltp/0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch @@ -43,8 +43,8 @@ index de51d43..810e5c8 100644 + * 3. Should get ENOMEM or EINVAL. */ - #define _XOPEN_SOURCE 600 -@@ -93,8 +93,8 @@ int main(void) + #include +@@ -92,8 +92,8 @@ int main(void) (unsigned long)len); pa = mmap(addr, len, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, fd, 0); @@ -55,7 +55,7 @@ index de51d43..810e5c8 100644 exit(PTS_PASS); } -@@ -103,6 +103,6 @@ int main(void) +@@ -102,6 +102,6 @@ int main(void) else munmap(pa, len); close(fd); diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch b/poky/meta/recipes-extended/ltp/ltp/0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch deleted file mode 100644 index c412c89e9..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch +++ /dev/null @@ -1,75 +0,0 @@ -From bb977ca0716ae98f10102c7122fe15bc0ddb5356 Mon Sep 17 00:00:00 2001 -From: "Hongzhi.Song" -Date: Thu, 20 Sep 2018 21:49:02 -0400 -Subject: [PATCH] sigwaitinfo01: recent glibc calls syscall directly - -glibc commit - 8b0e795aaa44 ("Simplify Linux sig{timed}wait{info} implementations") -changed sigwaitinfo to call sigtimedwait, which calls rt_sigtimedwait -syscall directly. - -So, an invalid pointer no longer crashes child process and test -reports failure. Fix it by accepting either crash or EFAULT. - -Signed-off-by: Jan Stancek - -Upstream-Status: Submitted [https://lists.linux.it/pipermail/ltp/2018-September/009338.html] - -Signed-off-by: Hongzhi.Song ---- - .../kernel/syscalls/sigwaitinfo/sigwaitinfo01.c | 30 +++++++++++++++++++--- - 1 file changed, 26 insertions(+), 4 deletions(-) - -diff --git a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c -index 95a9436a4..8fa8ac34b 100644 ---- a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c -+++ b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c -@@ -371,19 +371,41 @@ void test_bad_address2(swi_func sigwaitinfo, int signo) - tst_brkm(TBROK | TERRNO, NULL, "fork() failed"); - case 0: - signal(SIGSEGV, SIG_DFL); -+ -+ /* -+ * depending on glibc implementation we should -+ * either crash or get EFAULT -+ */ - TEST(sigwaitinfo((void *)1, NULL, NULL)); - -- _exit(0); -+ if (TEST_RETURN == -1 && TEST_ERRNO == EFAULT) -+ _exit(0); -+ -+ tst_resm(TINFO, "swi_func returned: %ld, errno: %d", -+ TEST_RETURN, TEST_ERRNO); -+ _exit(1); -+ - break; - default: - break; - } - - SUCCEED_OR_DIE(waitpid, "waitpid failed", pid, &status, 0); -- if (WIFSIGNALED(status) && WTERMSIG(status) == SIGSEGV) -+ -+ if ((WIFSIGNALED(status) && WTERMSIG(status) == SIGSEGV) -+ || (WIFEXITED(status) && WEXITSTATUS(status) == 0)) { - tst_resm(TPASS, "Test passed"); -- else -- tst_resm(TFAIL, "Unrecognised child exit code"); -+ return; -+ } -+ -+ if (WIFEXITED(status)) { -+ tst_resm(TFAIL, "Unrecognised child exit code: %d", -+ WEXITSTATUS(status)); -+ } -+ if (WIFSIGNALED(status)) { -+ tst_resm(TFAIL, "Unrecognised child termsig: %d", -+ WTERMSIG(status)); -+ } - } - - void test_bad_address3(swi_func sigwaitinfo, int signo) --- -2.11.0 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-syscalls-fcntl-make-OFD-command-use-fcntl64-syscall-.patch b/poky/meta/recipes-extended/ltp/ltp/0001-syscalls-fcntl-make-OFD-command-use-fcntl64-syscall-.patch deleted file mode 100644 index 2755596d0..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0001-syscalls-fcntl-make-OFD-command-use-fcntl64-syscall-.patch +++ /dev/null @@ -1,184 +0,0 @@ -From 8de03ea1200480b922d5ba05b69dc94db60496f5 Mon Sep 17 00:00:00 2001 -From: "Hongzhi.Song" -Date: Sat, 15 Sep 2018 22:39:32 -0400 -Subject: [PATCH] syscalls/fcntl: make OFD command use fcntl64() syscall on - 32-bit - -To cope with glibc commit: - 06ab719d30b0 ("Fix Linux fcntl OFD locks for non-LFS architectures -(BZ#20251)") - -WIP: Still need to test this with new glibc. - Test with old glibc look OK so far. - -Signed-off-by: Jan Stancek - -Upstream-Status: Backport - Backported from upstream maillist - https://lists.linux.it/pipermail/ltp/2018-September/009370.html - -Signed-off-by: Hongzhi Song ---- - testcases/kernel/syscalls/fcntl/fcntl34.c | 12 +++++++--- - testcases/kernel/syscalls/fcntl/fcntl36.c | 23 +++++++++++++----- - testcases/kernel/syscalls/fcntl/fcntl_common.h | 32 ++++++++++++++++++++++++++ - 3 files changed, 58 insertions(+), 9 deletions(-) - create mode 100644 testcases/kernel/syscalls/fcntl/fcntl_common.h - -diff --git a/testcases/kernel/syscalls/fcntl/fcntl34.c b/testcases/kernel/syscalls/fcntl/fcntl34.c -index aa29cf9..109f834 100644 ---- a/testcases/kernel/syscalls/fcntl/fcntl34.c -+++ b/testcases/kernel/syscalls/fcntl/fcntl34.c -@@ -28,6 +28,7 @@ - #include "lapi/fcntl.h" - #include "tst_safe_pthread.h" - #include "tst_test.h" -+#include "fcntl_common.h" - - static int thread_cnt; - static const int max_thread_cnt = 32; -@@ -68,7 +69,12 @@ void *thread_fn_01(void *arg) - - memset(buf, (intptr_t)arg, write_size); - -- struct flock64 lck = { -+ /* see explanation in fcntl_common.h */ -+ #ifdef USE_STRUCT_FLOCK -+ struct flock lck = { -+ #else -+ struct flock64 lck = { -+ #endif - .l_whence = SEEK_SET, - .l_start = 0, - .l_len = 1, -@@ -76,13 +82,13 @@ void *thread_fn_01(void *arg) - - for (i = 0; i < writes_num; ++i) { - lck.l_type = F_WRLCK; -- SAFE_FCNTL(fd, F_OFD_SETLKW, &lck); -+ my_fcntl(fd, F_OFD_SETLKW, &lck); - - SAFE_LSEEK(fd, 0, SEEK_END); - SAFE_WRITE(1, fd, buf, write_size); - - lck.l_type = F_UNLCK; -- SAFE_FCNTL(fd, F_OFD_SETLKW, &lck); -+ my_fcntl(fd, F_OFD_SETLKW, &lck); - - sched_yield(); - } -diff --git a/testcases/kernel/syscalls/fcntl/fcntl36.c b/testcases/kernel/syscalls/fcntl/fcntl36.c -index 3246d13..f263b6b 100644 ---- a/testcases/kernel/syscalls/fcntl/fcntl36.c -+++ b/testcases/kernel/syscalls/fcntl/fcntl36.c -@@ -57,6 +57,7 @@ - #include "lapi/fcntl.h" - #include "tst_safe_pthread.h" - #include "tst_test.h" -+#include "fcntl_common.h" - - static int thread_cnt; - static int fail_flag = 0; -@@ -87,7 +88,12 @@ static void *fn_ofd_w(void *arg) - int fd = SAFE_OPEN(fname, O_RDWR); - long wt = pa->cnt; - -- struct flock64 lck = { -+ /* see explanation in fcntl_common.h */ -+ #ifdef USE_STRUCT_FLOCK -+ struct flock lck = { -+ #else -+ struct flock64 lck = { -+ #endif - .l_whence = SEEK_SET, - .l_start = pa->offset, - .l_len = pa->length, -@@ -99,13 +105,13 @@ static void *fn_ofd_w(void *arg) - memset(buf, wt, pa->length); - - lck.l_type = F_WRLCK; -- SAFE_FCNTL(fd, F_OFD_SETLKW, &lck); -+ my_fcntl(fd, F_OFD_SETLKW, &lck); - - SAFE_LSEEK(fd, pa->offset, SEEK_SET); - SAFE_WRITE(1, fd, buf, pa->length); - - lck.l_type = F_UNLCK; -- SAFE_FCNTL(fd, F_OFD_SETLKW, &lck); -+ my_fcntl(fd, F_OFD_SETLKW, &lck); - - wt++; - if (wt >= 255) -@@ -166,7 +172,12 @@ static void *fn_ofd_r(void *arg) - int i; - int fd = SAFE_OPEN(fname, O_RDWR); - -- struct flock64 lck = { -+ /* see explanation in fcntl_common.h */ -+ #ifdef USE_STRUCT_FLOCK -+ struct flock lck = { -+ #else -+ struct flock64 lck = { -+ #endif - .l_whence = SEEK_SET, - .l_start = pa->offset, - .l_len = pa->length, -@@ -178,7 +189,7 @@ static void *fn_ofd_r(void *arg) - memset(buf, 0, pa->length); - - lck.l_type = F_RDLCK; -- SAFE_FCNTL(fd, F_OFD_SETLKW, &lck); -+ my_fcntl(fd, F_OFD_SETLKW, &lck); - - /* rlock acquired */ - SAFE_LSEEK(fd, pa->offset, SEEK_SET); -@@ -209,7 +220,7 @@ static void *fn_ofd_r(void *arg) - } - - lck.l_type = F_UNLCK; -- SAFE_FCNTL(fd, F_OFD_SETLK, &lck); -+ my_fcntl(fd, F_OFD_SETLK, &lck); - - sched_yield(); - } -diff --git a/testcases/kernel/syscalls/fcntl/fcntl_common.h b/testcases/kernel/syscalls/fcntl/fcntl_common.h -new file mode 100644 -index 0000000..3fe399b ---- /dev/null -+++ b/testcases/kernel/syscalls/fcntl/fcntl_common.h -@@ -0,0 +1,32 @@ -+#include "lapi/syscalls.h" -+ -+/* -+ * glibc commit: -+ * 06ab719d30b0 ("Fix Linux fcntl OFD locks for non-LFS architectures (BZ#20251)") -+ * changed behavior of arg parameter for OFD commands. It is no -+ * longer passing arg directly to syscall, but expects it to be -+ * 'struct flock'. -+ * -+ * On 64-bit or _FILE_OFFSET_BITS == 64 we can use fcntl() and -+ * struct flock with any glibc version. struct flock and flock64 -+ * should be identical. -+ * -+ * On 32-bit, older glibc would pass arg directly, recent one treats -+ * it as 'struct flock' and converts it to 'struct flock64'. -+ * So, for 32-bit we use fcntl64 syscall directly with struct flock64. -+ */ -+#if __WORDSIZE == 64 || _FILE_OFFSET_BITS == 64 -+#define USE_STRUCT_FLOCK -+static int my_fcntl(int fd, int cmd, void *lck) -+{ -+ return SAFE_FCNTL(fd, cmd, lck); -+} -+#else -+static int my_fcntl(int fd, int cmd, void *lck) -+{ -+ int ret = tst_syscall(__NR_fcntl64, fd, cmd, lck); -+ if (ret == -1) -+ tst_brk(TBROK|TERRNO, "fcntl64"); -+ return ret; -+} -+#endif --- -2.8.1 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch b/poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch index 2df385591..3c66c9436 100644 --- a/poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch +++ b/poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch @@ -42,7 +42,7 @@ diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile index 50a12fa..4f1987f 100644 --- a/testcases/kernel/Makefile +++ b/testcases/kernel/Makefile -@@ -48,13 +48,16 @@ SUBDIRS += connectors \ +@@ -49,12 +49,15 @@ SUBDIRS += connectors \ logging \ mem \ numa \ @@ -51,7 +51,6 @@ index 50a12fa..4f1987f 100644 security \ timers \ tracing \ - module \ +ifneq ($(LIBC),musl) +SUBDIRS += pty diff --git a/poky/meta/recipes-extended/ltp/ltp/0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch b/poky/meta/recipes-extended/ltp/ltp/0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch index 2f4ca6375..6e6dbf398 100644 --- a/poky/meta/recipes-extended/ltp/ltp/0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch +++ b/poky/meta/recipes-extended/ltp/ltp/0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch @@ -16,7 +16,7 @@ diff --git a/include/old/test.h b/include/old/test.h index b36764d83..cc6f1b551 100644 --- a/include/old/test.h +++ b/include/old/test.h -@@ -44,6 +44,9 @@ +@@ -17,6 +17,9 @@ #include #include #include diff --git a/poky/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch b/poky/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch index 428ac3004..7311ee2e4 100644 --- a/poky/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch +++ b/poky/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch @@ -1,7 +1,7 @@ -From a3cbee31daae2466bc8dcac36b33a01352693346 Mon Sep 17 00:00:00 2001 +From fc2b47ad979a87bfbd11aeea3f67c26e7fb39e30 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 7 Jan 2016 19:40:08 +0000 -Subject: [PATCH 01/26] Check if __GLIBC_PREREQ is defined before using it +Subject: [PATCH] Check if __GLIBC_PREREQ is defined before using it __GLIBC_PREREQ is specific to glibc so it should be checked if it is defined or not. @@ -10,13 +10,12 @@ Signed-off-by: Khem Raj Upstream-Status: Pending --- - testcases/kernel/syscalls/accept4/accept4_01.c | 9 ++++- - testcases/kernel/syscalls/getcpu/getcpu01.c | 39 +++++++++++++++++++++- - .../sched_getaffinity/sched_getaffinity01.c | 26 +++++++++++++++ - 3 files changed, 72 insertions(+), 2 deletions(-) + .../kernel/syscalls/accept4/accept4_01.c | 9 ++++++- + .../sched_getaffinity/sched_getaffinity01.c | 26 +++++++++++++++++++ + 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/testcases/kernel/syscalls/accept4/accept4_01.c b/testcases/kernel/syscalls/accept4/accept4_01.c -index 6072bfa..2b090cb 100644 +index dec4ef93b..c5d74b07f 100644 --- a/testcases/kernel/syscalls/accept4/accept4_01.c +++ b/testcases/kernel/syscalls/accept4/accept4_01.c @@ -64,6 +64,7 @@ static void cleanup(void) @@ -59,131 +58,8 @@ index 6072bfa..2b090cb 100644 #else acceptfd = accept4(lfd, (struct sockaddr *)&claddr, &addrlen, closeonexec_flag | nonblock_flag); -diff --git a/testcases/kernel/syscalls/getcpu/getcpu01.c b/testcases/kernel/syscalls/getcpu/getcpu01.c -index c927512..921b107 100644 ---- a/testcases/kernel/syscalls/getcpu/getcpu01.c -+++ b/testcases/kernel/syscalls/getcpu/getcpu01.c -@@ -62,6 +62,7 @@ - #include - - #if defined(__i386__) || defined(__x86_64__) -+#if defined(__GLIBC__) - #if __GLIBC_PREREQ(2,6) - #if defined(__x86_64__) - #include -@@ -75,10 +76,17 @@ int sys_support = 0; - #else - int sys_support = 0; - #endif -+#else -+int sys_support = 0; -+#endif - -+#if defined(__GLIBC__) - #if !(__GLIBC_PREREQ(2, 7)) - #define CPU_FREE(ptr) free(ptr) - #endif -+#else -+#define CPU_FREE(ptr) free(ptr) -+#endif - - void cleanup(void); - void setup(void); -@@ -164,7 +172,11 @@ static inline int getcpu(unsigned *cpu_id, unsigned *node_id, - { - #if defined(__i386__) - return syscall(318, cpu_id, node_id, cache_struct); --#elif __GLIBC_PREREQ(2,6) -+#elif defined(__GLIBC__) -+#if __GLIBC_PREREQ(2,6) -+ *cpu_id = sched_getcpu(); -+#endif -+#else - *cpu_id = sched_getcpu(); - #endif - return 0; -@@ -191,15 +203,20 @@ unsigned int set_cpu_affinity(void) - cpu_set_t *set; - size_t size; - int nrcpus = 1024; -+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) - #if __GLIBC_PREREQ(2, 7) - realloc: - set = CPU_ALLOC(nrcpus); - #else - set = malloc(sizeof(cpu_set_t)); - #endif -+#else -+ set = malloc(sizeof(cpu_set_t)); -+#endif - if (set == NULL) { - tst_brkm(TFAIL, NULL, "CPU_ALLOC:errno:%d", errno); - } -+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) - #if __GLIBC_PREREQ(2, 7) - size = CPU_ALLOC_SIZE(nrcpus); - CPU_ZERO_S(size, set); -@@ -207,8 +224,13 @@ realloc: - size = sizeof(cpu_set_t); - CPU_ZERO(set); - #endif -+#else -+ size = sizeof(cpu_set_t); -+ CPU_ZERO(set); -+#endif - if (sched_getaffinity(0, size, set) < 0) { - CPU_FREE(set); -+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) - #if __GLIBC_PREREQ(2, 7) - if (errno == EINVAL && nrcpus < (1024 << 8)) { - nrcpus = nrcpus << 2; -@@ -220,10 +242,17 @@ realloc: - "NR_CPUS of the kernel is more than 1024, so we'd better use a newer glibc(>= 2.7)"); - else - #endif -+#else -+ if (errno == EINVAL) -+ tst_resm(TFAIL, -+ "NR_CPUS of the kernel is more than 1024, so we'd better use a newer glibc(>= 2.7)"); -+ else -+#endif - tst_resm(TFAIL, "sched_getaffinity:errno:%d", errno); - tst_exit(); - } - cpu_max = max_cpuid(size, set); -+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) - #if __GLIBC_PREREQ(2, 7) - CPU_ZERO_S(size, set); - CPU_SET_S(cpu_max, size, set); -@@ -231,6 +260,10 @@ realloc: - CPU_ZERO(set); - CPU_SET(cpu_max, set); - #endif -+#else -+ CPU_ZERO(set); -+ CPU_SET(cpu_max, set); -+#endif - if (sched_setaffinity(0, size, set) < 0) { - CPU_FREE(set); - tst_brkm(TFAIL, NULL, "sched_setaffinity:errno:%d", errno); -@@ -247,11 +280,15 @@ unsigned int max_cpuid(size_t size, cpu_set_t * set) - { - unsigned int index, max = 0; - for (index = 0; index < size * BITS_PER_BYTE; index++) -+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) - #if __GLIBC_PREREQ(2, 7) - if (CPU_ISSET_S(index, size, set)) - #else - if (CPU_ISSET(index, set)) - #endif -+#else -+ if (CPU_ISSET(index, set)) -+#endif - max = index; - return max; - } diff --git a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c -index 9d6a81a..4ed13b2 100644 +index 02f04b909..d906d7e09 100644 --- a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c +++ b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c @@ -67,9 +67,11 @@ do { \ @@ -198,7 +74,7 @@ index 9d6a81a..4ed13b2 100644 int main(int ac, char **av) { -@@ -96,14 +98,19 @@ static void do_test(void) +@@ -96,17 +98,26 @@ static void do_test(void) pid_t unused_pid; unsigned len; @@ -206,27 +82,26 @@ index 9d6a81a..4ed13b2 100644 #if __GLIBC_PREREQ(2, 7) realloc: mask = CPU_ALLOC(nrcpus); - #else - mask = malloc(sizeof(cpu_set_t)); - #endif +#else + mask = malloc(sizeof(cpu_set_t)); +#endif + #else + mask = malloc(sizeof(cpu_set_t)); + #endif if (mask == NULL) tst_brkm(TFAIL | TTERRNO, cleanup, "fail to get enough memory"); +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) #if __GLIBC_PREREQ(2, 7) len = CPU_ALLOC_SIZE(nrcpus); CPU_ZERO_S(len, mask); -@@ -111,10 +118,15 @@ realloc: - len = sizeof(cpu_set_t); - CPU_ZERO(mask); - #endif +#else + len = sizeof(cpu_set_t); + CPU_ZERO(mask); +#endif - /* positive test */ + #else + len = sizeof(cpu_set_t); + CPU_ZERO(mask); +@@ -115,11 +126,18 @@ realloc: TEST(sched_getaffinity(0, len, mask)); if (TEST_RETURN == -1) { CPU_FREE(mask); @@ -234,50 +109,43 @@ index 9d6a81a..4ed13b2 100644 #if __GLIBC_PREREQ(2, 7) if (errno == EINVAL && nrcpus < (1024 << 8)) { nrcpus = nrcpus << 2; -@@ -126,17 +138,27 @@ realloc: - "newer glibc(>= 2.7)"); - else - #endif + goto realloc; + } +#else + if (errno == EINVAL) + tst_resm(TFAIL, "NR_CPUS > 1024, we'd better use a " + "newer glibc(>= 2.7)"); + else +#endif - tst_resm(TFAIL | TTERRNO, "fail to get cpu affinity"); - cleanup(); - } else { + #else + if (errno == EINVAL) + tst_resm(TFAIL, "NR_CPUS > 1024, we'd better use a " +@@ -132,8 +150,12 @@ realloc: tst_resm(TINFO, "cpusetsize is %d", len); tst_resm(TINFO, "mask.__bits[0] = %lu ", mask->__bits[0]); for (i = 0; i < num; i++) { +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) #if __GLIBC_PREREQ(2, 7) TEST(CPU_ISSET_S(i, len, mask)); - #else - TEST(CPU_ISSET(i, mask)); - #endif +#else + TEST(CPU_ISSET(i, mask)); +#endif - if (TEST_RETURN != -1) - tst_resm(TPASS, "sched_getaffinity() succeed, " - "this process %d is running " -@@ -144,11 +166,15 @@ realloc: + #else + TEST(CPU_ISSET(i, mask)); + #endif +@@ -144,8 +166,12 @@ realloc: } } +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) #if __GLIBC_PREREQ(2, 7) CPU_ZERO_S(len, mask); - #else - CPU_ZERO(mask); - #endif +#else + CPU_ZERO(mask); +#endif - /* negative tests */ - QUICK_TEST(sched_getaffinity(0, len, (cpu_set_t *) - 1)); - QUICK_TEST(sched_getaffinity(0, 0, mask)); + #else + CPU_ZERO(mask); + #endif -- -1.9.1 +2.17.1 diff --git a/poky/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch b/poky/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch index 71e32a5e5..665da3bef 100644 --- a/poky/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch +++ b/poky/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch @@ -19,7 +19,7 @@ diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testca index b785fe3..2918cc5 100755 --- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh +++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh -@@ -283,6 +283,7 @@ test_proc_kill() +@@ -291,6 +291,7 @@ test_proc_kill() pid=$! TST_CHECKPOINT_WAIT 0 echo $pid > tasks diff --git a/poky/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch b/poky/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch index e7c927e11..ec5e2ef95 100644 --- a/poky/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch +++ b/poky/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch @@ -21,16 +21,18 @@ Signed-off-by: Yi Zhao 1 file changed, 52 insertions(+), 40 deletions(-) diff --git a/testcases/commands/ar/ar01 b/testcases/commands/ar/ar01 -index ddab2e0..d688f76 100644 +index be105f6da..813a51d9c 100644 --- a/testcases/commands/ar/ar01 +++ b/testcases/commands/ar/ar01 -@@ -23,14 +23,26 @@ - # This is a basic ar command test. +@@ -24,16 +24,28 @@ # + AR="${AR:=ar}" TST_CNT=17 +TST_SETUP=setup TST_TESTFUNC=test TST_NEEDS_TMPDIR=1 + TST_NEEDS_CMDS="$AR" + . tst_test.sh +setup() @@ -53,7 +55,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -47,9 +59,9 @@ test1() +@@ -50,9 +62,9 @@ test1() test2() { @@ -66,7 +68,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile4.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -66,8 +78,8 @@ test2() +@@ -69,8 +81,8 @@ test2() test3() { @@ -77,7 +79,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -84,9 +96,9 @@ test3() +@@ -87,9 +99,9 @@ test3() test4() { @@ -90,7 +92,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -103,7 +115,7 @@ test4() +@@ -106,7 +118,7 @@ test4() test5() { @@ -99,7 +101,7 @@ index ddab2e0..d688f76 100644 if [ -s ar.out ]; then tst_res TFAIL "ar produced output unexpectedly (-c)" -@@ -117,7 +129,7 @@ test5() +@@ -120,7 +132,7 @@ test5() test6() { @@ -108,7 +110,7 @@ index ddab2e0..d688f76 100644 if [ -s ar.out ]; then tst_res TFAIL "ar produced output unexpectedly (-qc)" -@@ -131,9 +143,9 @@ test6() +@@ -134,9 +146,9 @@ test6() test7() { @@ -121,7 +123,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file3.in\n" > ar.exp -@@ -150,9 +162,9 @@ test7() +@@ -153,9 +165,9 @@ test7() test8() { @@ -134,7 +136,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -169,8 +181,8 @@ test8() +@@ -172,8 +184,8 @@ test8() test9() { @@ -145,7 +147,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -187,9 +199,9 @@ test9() +@@ -190,9 +202,9 @@ test9() test10() { @@ -158,7 +160,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -206,9 +218,9 @@ test10() +@@ -209,9 +221,9 @@ test10() test11() { @@ -171,7 +173,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -225,9 +237,9 @@ test11() +@@ -228,9 +240,9 @@ test11() test12() { @@ -184,7 +186,7 @@ index ddab2e0..d688f76 100644 printf "This is file one\nThis is file two\nThis is file three\n" > ar.exp -@@ -244,9 +256,9 @@ test12() +@@ -247,9 +259,9 @@ test12() test13() { @@ -197,7 +199,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\nfile4.in\n" > ar.exp -@@ -264,14 +276,14 @@ test13() +@@ -267,14 +279,14 @@ test13() test14() { ROD touch file0.in @@ -214,7 +216,7 @@ index ddab2e0..d688f76 100644 file0_mtime2=$(ar -tv lib.a | grep file0.in) file1_mtime2=$(ar -tv lib.a | grep file1.in) -@@ -293,7 +305,7 @@ test14() +@@ -296,7 +308,7 @@ test14() test15() { @@ -223,7 +225,7 @@ index ddab2e0..d688f76 100644 ROD ar -tv lib.a \> ar.out if grep -q '[rwx-]\{9\} [0-9].*/[0-9].*\s*[0-9].*.*file1.in' ar.out; then -@@ -308,9 +320,9 @@ test15() +@@ -311,9 +323,9 @@ test15() test16() { @@ -236,7 +238,7 @@ index ddab2e0..d688f76 100644 printf "x - file1.in\nx - file2.in\nx - file3.in\n" > ar.exp -@@ -332,8 +344,8 @@ test16() +@@ -335,8 +347,8 @@ test16() test17() { @@ -248,5 +250,5 @@ index ddab2e0..d688f76 100644 printf "x - file2.in\n" > ar.exp -- -2.7.4 +2.19.0.rc2 diff --git a/poky/meta/recipes-extended/ltp/ltp/0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch b/poky/meta/recipes-extended/ltp/ltp/0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch deleted file mode 100644 index 0245a89f3..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 23518508de307790231d16af307291f1b45e903a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Daniel=20D=C3=ADaz?= -Date: Tue, 5 Jun 2018 15:36:30 -0500 -Subject: [PATCH] read_all: Define FNM_EXTMATCH if not already (like under - musl). -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -With musl, FNM_EXTMATCH is not defined: -| read_all.c: In function 'read_test': -| read_all.c:201:41: error: 'FNM_EXTMATCH' undeclared (first use in this function); did you mean 'FNM_NOMATCH'? -| if (exclude && !fnmatch(exclude, path, FNM_EXTMATCH)) { -| ^~~~~~~~~~~~ -| FNM_NOMATCH -| read_all.c:201:41: note: each undeclared identifier is reported only once for each function it appears in -| : recipe for target 'read_all' failed -| make[4]: *** [read_all] Error 1 - -Signed-off-by: Daniel Díaz - -Upstream-Status: Pending ---- - testcases/kernel/fs/read_all/read_all.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/testcases/kernel/fs/read_all/read_all.c b/testcases/kernel/fs/read_all/read_all.c -index a8e1611..e9ff47a 100644 ---- a/testcases/kernel/fs/read_all/read_all.c -+++ b/testcases/kernel/fs/read_all/read_all.c -@@ -59,6 +59,10 @@ - #define MAX_PATH 4096 - #define MAX_DISPLAY 40 - -+#if !defined(FNM_EXTMATCH) -+#define FNM_EXTMATCH 0 -+#endif -+ - struct queue { - sem_t sem; - int front; --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch b/poky/meta/recipes-extended/ltp/ltp/0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch deleted file mode 100644 index 0d2d2cbce..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch +++ /dev/null @@ -1,97 +0,0 @@ -From b767b73ef027ba8d35f297c7d3659265ac80425b Mon Sep 17 00:00:00 2001 -From: Rafael David Tinoco -Date: Wed, 30 May 2018 09:14:34 -0300 -Subject: [PATCH] cve-2017-5669: shmat() for 0 (or -Date: Fri May 25 14:47:30 2018 -0700 - - ipc/shm: fix shmat() nil address after round-down when remapping - -commit a73ab244f0da -Author: Davidlohr Bueso -Date: Fri May 25 14:47:27 2018 -0700 - - Revert "ipc/shm: Fix shmat mmap nil-page protection" - -For previously test, and now broken, made based on: - -commit 95e91b831f87 -Author: Davidlohr Bueso -Date: Mon Feb 27 14:28:24 2017 -0800 - - ipc/shm: Fix shmat mmap nil-page protection - -Signed-off-by: Rafael David Tinoco -Tested-by: Naresh Kamboju -Reviewed-by: Jan Stancek - -Upstream-Status: Accepted [https://github.com/linux-test-project/ltp/pull/324] -CVE: CVE-2017-5669 -Signed-off-by: Rafael David Tinoco ---- - testcases/cve/cve-2017-5669.c | 20 +++++++++++++++++++- - 1 file changed, 19 insertions(+), 1 deletion(-) - -diff --git a/testcases/cve/cve-2017-5669.c b/testcases/cve/cve-2017-5669.c -index 1ca5983..0834626 100644 ---- a/testcases/cve/cve-2017-5669.c -+++ b/testcases/cve/cve-2017-5669.c -@@ -28,7 +28,20 @@ - * is just to see if we get an access error or some other unexpected behaviour. - * - * See commit 95e91b831f (ipc/shm: Fix shmat mmap nil-page protection) -+ * -+ * The commit above disallowed SHM_RND maps to zero (and rounded) entirely and -+ * that broke userland for cases like Xorg. New behavior disallows REMAPs to -+ * lower addresses (0<=PAGESIZE). -+ * -+ * See commit a73ab244f0da (Revert "ipc/shm: Fix shmat mmap nil-page protect...) -+ * See commit 8f89c007b6de (ipc/shm: fix shmat() nil address after round-dow...) -+ * See https://github.com/linux-test-project/ltp/issues/319 -+ * -+ * This test needs root permissions or else security_mmap_addr(), from -+ * get_unmapped_area(), will cause permission errors when trying to mmap lower -+ * addresses. - */ -+ - #include - #include - #include -@@ -60,7 +73,11 @@ static void cleanup(void) - static void run(void) - { - tst_res(TINFO, "Attempting to attach shared memory to null page"); -- shm_addr = shmat(shm_id, ((void *)1), SHM_RND); -+ /* -+ * shmat() for 0 (or < PAGESIZE with RND flag) has to fail with REMAPs -+ * https://github.com/linux-test-project/ltp/issues/319 -+ */ -+ shm_addr = shmat(shm_id, ((void *)1), SHM_RND | SHM_REMAP); - if (shm_addr == (void *)-1) { - shm_addr = NULL; - if (errno == EINVAL) { -@@ -89,6 +106,7 @@ static void run(void) - } - - static struct tst_test test = { -+ .needs_root = 1, - .setup = setup, - .cleanup = cleanup, - .test_all = run, --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch b/poky/meta/recipes-extended/ltp/ltp/0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch deleted file mode 100644 index 407d98eff..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch +++ /dev/null @@ -1,34 +0,0 @@ -From baeef026f80e19a634a4096e97286419aca1cf68 Mon Sep 17 00:00:00 2001 -From: He Zhe -Date: Thu, 23 Aug 2018 00:22:04 +0800 -Subject: [PATCH] fs/ftest/ftest06.c: Fix too small name string and related - failure - -The name string is too small to contain normal full path names and causes -the following failure. - -"ftest06 2 TFAIL : ftest06.c:223: Can't chdir(): errno=ENOENT(2): No such file or directory" - -Upstream-Status: Submitted [ltp-list@lists.sourceforge.net] - -Signed-off-by: He Zhe ---- - testcases/kernel/fs/ftest/ftest06.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/testcases/kernel/fs/ftest/ftest06.c b/testcases/kernel/fs/ftest/ftest06.c -index 2ca7c88..b434067 100644 ---- a/testcases/kernel/fs/ftest/ftest06.c -+++ b/testcases/kernel/fs/ftest/ftest06.c -@@ -100,7 +100,7 @@ static char *fstyp; - int main(int ac, char *av[]) - { - int pid, child, status, count, k, j; -- char name[3]; -+ char name[MAXPATHLEN]; - - int lc; - --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch b/poky/meta/recipes-extended/ltp/ltp/0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch deleted file mode 100644 index dc61fcc03..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 3c87ef2961dedb10d1f674c6a530e00dbab8ec1b Mon Sep 17 00:00:00 2001 -From: Jan Stancek -Date: Tue, 17 Jul 2018 10:26:39 +0200 -Subject: [PATCH] open|creat: skip S_ISGID check on files created by non-group - members - -0fa3ecd87848 ("Fix up non-directory creation in SGID directories") -fixes problem described in CVE-2018-13405. This commit is getting -backported to older streams as well. - -This patch removes S_ISGID check for files created by non-group members -in LTP tests creat08 and open10. - -Once 0fa3ecd87848 will be in non-rc kernel, we could add a new test -for this CVE that would be limited to 4.18+ kernels. - -Signed-off-by: Jan Stancek -Acked-by: Cyril Hrubis -Reviewed-by: Naresh Kamboju - -Upstream-Status: Backport -[ git://github.com/linux-test-project/ltp.git - 3c87ef2961dedb10d1f674c6a530e00dbab8ec1b - "open|creat: skip S_ISGID check on files created by non-group members" ] - -Signed-off-by: He Zhe ---- - testcases/kernel/syscalls/creat/creat08.c | 13 ++++++------- - testcases/kernel/syscalls/open/open10.c | 12 +++++------- - 2 files changed, 11 insertions(+), 14 deletions(-) - -diff --git a/testcases/kernel/syscalls/creat/creat08.c b/testcases/kernel/syscalls/creat/creat08.c -index 50f2b3993..d22558ac3 100644 ---- a/testcases/kernel/syscalls/creat/creat08.c -+++ b/testcases/kernel/syscalls/creat/creat08.c -@@ -361,13 +361,12 @@ int main(int ac, char **av) - local_flag = FAILED; - } - -- /* Verify modes */ -- if (!(buf.st_mode & S_ISGID)) { -- tst_resm(TFAIL, -- "%s: Incorrect modes, setgid bit should be set", -- setgid_B); -- local_flag = FAILED; -- } -+ /* -+ * Skip S_ISGID check -+ * 0fa3ecd87848 ("Fix up non-directory creation in SGID directories") -+ * clears S_ISGID for files created by non-group members -+ */ -+ - close(fd); - - if (local_flag == PASSED) { -diff --git a/testcases/kernel/syscalls/open/open10.c b/testcases/kernel/syscalls/open/open10.c -index 613f2288f..14feec9e1 100644 ---- a/testcases/kernel/syscalls/open/open10.c -+++ b/testcases/kernel/syscalls/open/open10.c -@@ -345,13 +345,11 @@ int main(int ac, char *av[]) - local_flag = FAILED; - } - -- /* Verify modes */ -- if (!(buf.st_mode & S_ISGID)) { -- tst_resm(TFAIL, -- "%s: Incorrect modes, setgid bit not set", -- setgid_B); -- local_flag = FAILED; -- } -+ /* -+ * Skip S_ISGID check -+ * 0fa3ecd87848 ("Fix up non-directory creation in SGID directories") -+ * clears S_ISGID for files created by non-group members -+ */ - - if (local_flag == PASSED) { - tst_resm(TPASS, "Test passed in block2."); --- -2.11.0 - diff --git a/poky/meta/recipes-extended/ltp/ltp/define-sigrtmin-and-sigrtmax-for-musl.patch b/poky/meta/recipes-extended/ltp/ltp/define-sigrtmin-and-sigrtmax-for-musl.patch new file mode 100644 index 000000000..c324463e6 --- /dev/null +++ b/poky/meta/recipes-extended/ltp/ltp/define-sigrtmin-and-sigrtmax-for-musl.patch @@ -0,0 +1,114 @@ +From 34b91edc70709f32b44f6b3a32c8f18db393e36c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20D=C3=ADaz?= +Date: Wed, 20 Feb 2019 08:07:27 -0600 +Subject: [PATCH] Define __SIGRTMIN and __SIGRTMAX for MUSL +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Some libc implementations might differ in the definitions they +include. Exempli gratia: MUSL does not define __SIGRTMAX nor +__SIGRTMIN. + +These two tests fail to build because of the missing +definitions: + testcases/kernel/syscalls/ptrace/ptrace05.c + testcases/kernel/syscalls/sighold/sighold02.c + +Out of precaution, these two also include this header: + lib/tst_sig.c + testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c + +Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2019-February/010916.html] + +Signed-off-by: Daniel Díaz +--- + include/lapi/signal.h | 24 +++++++++++++++++++ + lib/tst_sig.c | 1 + + testcases/kernel/syscalls/ptrace/ptrace05.c | 1 + + .../syscalls/rt_sigsuspend/rt_sigsuspend01.c | 1 + + testcases/kernel/syscalls/sighold/sighold02.c | 1 + + 5 files changed, 28 insertions(+) + create mode 100644 include/lapi/signal.h + +diff --git a/include/lapi/signal.h b/include/lapi/signal.h +new file mode 100644 +index 000000000..d22965a94 +--- /dev/null ++++ b/include/lapi/signal.h +@@ -0,0 +1,24 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++/* ++ * Copyright (c) 2019 Linaro Limited. All rights reserved. ++ * Author: Daniel Díaz ++ */ ++ ++#ifndef LAPI_SIGNAL_H ++#define LAPI_SIGNAL_H ++ ++#include ++ ++/* ++ * Some libc implementations might differ in the definitions they include. This ++ * covers those differences for all tests to successfully build. ++ */ ++ ++#ifndef __SIGRTMIN ++# define __SIGRTMIN 32 ++#endif ++#ifndef __SIGRTMAX ++# define __SIGRTMAX (_NSIG - 1) ++#endif ++ ++#endif +diff --git a/lib/tst_sig.c b/lib/tst_sig.c +index 36565e13d..6d77aeafd 100644 +--- a/lib/tst_sig.c ++++ b/lib/tst_sig.c +@@ -72,6 +72,7 @@ + #include + #include + #include "test.h" ++#include "lapi/signal.h" + + #define MAXMESG 150 /* size of mesg string sent to tst_res */ + +diff --git a/testcases/kernel/syscalls/ptrace/ptrace05.c b/testcases/kernel/syscalls/ptrace/ptrace05.c +index 420330029..54cfa4d7b 100644 +--- a/testcases/kernel/syscalls/ptrace/ptrace05.c ++++ b/testcases/kernel/syscalls/ptrace/ptrace05.c +@@ -38,6 +38,7 @@ + #include "ptrace.h" + + #include "test.h" ++#include "lapi/signal.h" + + char *TCID = "ptrace05"; + int TST_TOTAL = 0; +diff --git a/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c b/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c +index f17a9aae6..e577cf227 100644 +--- a/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c ++++ b/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c +@@ -18,6 +18,7 @@ + #include "tst_test.h" + #include "lapi/syscalls.h" + #include "lapi/safe_rt_signal.h" ++#include "lapi/signal.h" + + static void sig_handler(int sig) + { +diff --git a/testcases/kernel/syscalls/sighold/sighold02.c b/testcases/kernel/syscalls/sighold/sighold02.c +index d1d4b0b06..b763142df 100644 +--- a/testcases/kernel/syscalls/sighold/sighold02.c ++++ b/testcases/kernel/syscalls/sighold/sighold02.c +@@ -49,6 +49,7 @@ + #include + #include "test.h" + #include "safe_macros.h" ++#include "lapi/signal.h" + + /* _XOPEN_SOURCE disables NSIG */ + #ifndef NSIG +-- +2.17.1 + diff --git a/poky/meta/recipes-extended/ltp/ltp/setregid01-security-string-formatting.patch b/poky/meta/recipes-extended/ltp/ltp/setregid01-security-string-formatting.patch new file mode 100644 index 000000000..24449148f --- /dev/null +++ b/poky/meta/recipes-extended/ltp/ltp/setregid01-security-string-formatting.patch @@ -0,0 +1,46 @@ +From 430e05c2169ed15aaa6d7f9459edd607603cee02 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20D=C3=ADaz?= +Date: Mon, 25 Feb 2019 10:44:33 -0600 +Subject: [PATCH] setregid01: Fix security warning for string formatting +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +GCC 8.2.0 complains with the following: + setregid01.c: In function 'run': + setregid01.c:47:3: error: format not a string literal and no format arguments [-Werror=format-security] + tst_res(TFAIL | TTERRNO, tc->msg); + ^~~~~~~ +because there is no string formatting in the message. This can +be seen with CFLAGS set to: + -Wformat -Wformat-security -Werror=format-security +as Yocto Project's Poky does, e.g.: + http://errors.yoctoproject.org/Errors/Details/230043/ + +Upstream-Status: Backport [46e1eda55f188810e6bf3a939b92d604321807ae] + +Signed-off-by: Daniel Díaz +Reviewed-by: Enji Cooper +--- + testcases/kernel/syscalls/setregid/setregid01.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/testcases/kernel/syscalls/setregid/setregid01.c b/testcases/kernel/syscalls/setregid/setregid01.c +index f2e41e134..8c9e11918 100644 +--- a/testcases/kernel/syscalls/setregid/setregid01.c ++++ b/testcases/kernel/syscalls/setregid/setregid01.c +@@ -44,9 +44,9 @@ static void run(unsigned int n) + TEST(SETREGID(*tc->arg1, *tc->arg2)); + + if (TST_RET == -1) +- tst_res(TFAIL | TTERRNO, tc->msg); ++ tst_res(TFAIL | TTERRNO, "%s", tc->msg); + else +- tst_res(TPASS, tc->msg); ++ tst_res(TPASS, "%s", tc->msg); + } + + static void setup(void) +-- +2.17.1 + diff --git a/poky/meta/recipes-extended/ltp/ltp_20180515.bb b/poky/meta/recipes-extended/ltp/ltp_20180515.bb deleted file mode 100644 index ff85be723..000000000 --- a/poky/meta/recipes-extended/ltp/ltp_20180515.bb +++ /dev/null @@ -1,127 +0,0 @@ -SUMMARY = "Linux Test Project" -DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features." -HOMEPAGE = "http://ltp.sourceforge.net" -SECTION = "console/utils" -LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause" -LIC_FILES_CHKSUM = "\ - file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ - file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \ - file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ - file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ - file://testcases/open_posix_testsuite/COPYING;md5=48b1c5ec633e3e30ec2cf884ae699947 \ - file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ - file://tools/pounder21/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \ -" - -DEPENDS = "attr libaio libcap acl openssl zip-native" -DEPENDS_append_libc-musl = " fts " -EXTRA_OEMAKE_append_libc-musl = " LIBC=musl " - -# since ltp contains x86-64 assembler which uses the frame-pointer register, -# set -fomit-frame-pointer x86-64 to handle cases where optimisation -# is set to -O0 or frame pointers have been enabled by -fno-omit-frame-pointer -# earlier in CFLAGS, etc. -CFLAGS_append_x86-64 = " -fomit-frame-pointer" - -CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__" -CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" -SRCREV = "96cbf48313afa65ef4d693d3441cbfd60a8d9b27" - -SRC_URI = "git://github.com/linux-test-project/ltp.git \ - file://0001-mmap15-mips64-return-EINVAL.patch \ - file://0004-build-Add-option-to-select-libc-implementation.patch \ - file://0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \ - file://0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch \ - file://0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch \ - file://0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch \ - file://0018-guard-mallocopt-with-__GLIBC__.patch \ - file://0020-getdents-define-getdents-getdents64-only-for-glibc.patch \ - file://0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch \ - file://0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch \ - file://0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch \ - file://0026-crash01-Define-_GNU_SOURCE.patch \ - file://0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch \ - file://0034-periodic_output.patch \ - file://0035-fix-test_proc_kill-hang.patch \ - file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \ - file://0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch \ - file://0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch \ - file://0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch \ - file://0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch \ - file://0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch \ - file://0001-syscalls-fcntl-make-OFD-command-use-fcntl64-syscall-.patch \ - file://0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch \ - file://0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch \ - file://0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch \ - " - -S = "${WORKDIR}/git" - -inherit autotools-brokensep - -TARGET_CC_ARCH += "${LDFLAGS}" - -export prefix = "/opt/ltp" -export exec_prefix = "/opt/ltp" - -PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl," -EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4" -EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite --with-open-posix-testsuite " -# ltp network/rpc test cases ftbfs when libtirpc is found -EXTRA_OECONF += " --without-tirpc " - -do_install(){ - install -d ${D}/opt/ltp/ - oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install - - # fixup not deploy STPfailure_report.pl to avoid confusing about it fails to run - # as it lacks dependency on some perl moudle such as LWP::Simple - # And this script previously works as a tool for analyzing failures from LTP - # runs on the OSDL's Scaleable Test Platform (STP) and it mainly accesses - # http://khack.osdl.org to retrieve ltp test results run on - # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible - rm -rf ${D}/opt/ltp/bin/STPfailure_report.pl - - # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual - cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases -} - -RDEPENDS_${PN} = "\ - acl \ - at \ - attr \ - bash \ - cpio \ - cronie \ - curl \ - e2fsprogs-mke2fs \ - expect \ - gawk \ - gzip \ - iproute2 \ - ldd \ - libaio \ - logrotate \ - perl \ - python-core \ - procps \ - unzip \ - util-linux \ - which \ - tar \ -" - -FILES_${PN} += "/opt/ltp/* /opt/ltp/runtest/* /opt/ltp/scenario_groups/* /opt/ltp/testcases/bin/* /opt/ltp/testcases/bin/*/bin/* /opt/ltp/testscripts/* /opt/ltp/testcases/open_posix_testsuite/* /opt/ltp/testcases/open_posix_testsuite/conformance/* /opt/ltp/testcases/open_posix_testsuite/Documentation/* /opt/ltp/testcases/open_posix_testsuite/functional/* /opt/ltp/testcases/open_posix_testsuite/include/* /opt/ltp/testcases/open_posix_testsuite/scripts/* /opt/ltp/testcases/open_posix_testsuite/stress/* /opt/ltp/testcases/open_posix_testsuite/tools/* /opt/ltp/testcases/data/nm01/lib.a /opt/ltp/lib/libmem.a" - -# Avoid stripping some generated binaries otherwise some of the ltp tests such as ldd01 & nm01 fail -INHIBIT_PACKAGE_STRIP_FILES = "/opt/ltp/testcases/bin/nm01 /opt/ltp/testcases/bin/ldd01" -INSANE_SKIP_${PN} += "already-stripped staticdev" - -# Avoid file dependency scans, as LTP checks for things that may or may not -# exist on the running system. For instance it has specific checks for -# csh and ksh which are not typically part of OpenEmbedded systems (but -# can be added via additional layers.) -SKIP_FILEDEPS_${PN} = '1' diff --git a/poky/meta/recipes-extended/ltp/ltp_20190115.bb b/poky/meta/recipes-extended/ltp/ltp_20190115.bb new file mode 100644 index 000000000..ddf97e26c --- /dev/null +++ b/poky/meta/recipes-extended/ltp/ltp_20190115.bb @@ -0,0 +1,122 @@ +SUMMARY = "Linux Test Project" +DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features." +HOMEPAGE = "https://linux-test-project.github.io/" +SECTION = "console/utils" +LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause" +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ + file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \ + file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ + file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ + file://testcases/open_posix_testsuite/COPYING;md5=48b1c5ec633e3e30ec2cf884ae699947 \ + file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ + file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \ +" + +DEPENDS = "attr libaio libcap acl openssl zip-native" +DEPENDS_append_libc-musl = " fts " +EXTRA_OEMAKE_append_libc-musl = " LIBC=musl " + +# since ltp contains x86-64 assembler which uses the frame-pointer register, +# set -fomit-frame-pointer x86-64 to handle cases where optimisation +# is set to -O0 or frame pointers have been enabled by -fno-omit-frame-pointer +# earlier in CFLAGS, etc. +CFLAGS_append_x86-64 = " -fomit-frame-pointer" + +CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__" +CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" +SRCREV = "a6a5caef13632e669dda27b0461726eba546a2f3" + +SRC_URI = "git://github.com/linux-test-project/ltp.git \ + file://0004-build-Add-option-to-select-libc-implementation.patch \ + file://0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \ + file://0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch \ + file://0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch \ + file://0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch \ + file://0018-guard-mallocopt-with-__GLIBC__.patch \ + file://0020-getdents-define-getdents-getdents64-only-for-glibc.patch \ + file://0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch \ + file://0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch \ + file://0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch \ + file://0026-crash01-Define-_GNU_SOURCE.patch \ + file://0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch \ + file://0034-periodic_output.patch \ + file://0035-fix-test_proc_kill-hang.patch \ + file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \ + file://0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch \ + file://0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch \ + file://define-sigrtmin-and-sigrtmax-for-musl.patch \ + file://setregid01-security-string-formatting.patch \ + " + +S = "${WORKDIR}/git" + +inherit autotools-brokensep + +TARGET_CC_ARCH += "${LDFLAGS}" + +export prefix = "/opt/ltp" +export exec_prefix = "/opt/ltp" + +PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl," +EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4" +EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite --with-open-posix-testsuite " +# ltp network/rpc test cases ftbfs when libtirpc is found +EXTRA_OECONF += " --without-tirpc " + +do_install(){ + install -d ${D}/opt/ltp/ + oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install + + # fixup not deploy STPfailure_report.pl to avoid confusing about it fails to run + # as it lacks dependency on some perl moudle such as LWP::Simple + # And this script previously works as a tool for analyzing failures from LTP + # runs on the OSDL's Scaleable Test Platform (STP) and it mainly accesses + # http://khack.osdl.org to retrieve ltp test results run on + # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible + rm -rf ${D}/opt/ltp/bin/STPfailure_report.pl + + # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual + cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases +} + +RDEPENDS_${PN} = "\ + acl \ + at \ + attr \ + bash \ + cpio \ + cronie \ + curl \ + e2fsprogs-mke2fs \ + expect \ + file \ + gawk \ + gzip \ + iproute2 \ + ldd \ + libaio \ + logrotate \ + perl \ + python-core \ + procps \ + quota \ + unzip \ + util-linux \ + which \ + tar \ +" + +FILES_${PN} += "/opt/ltp/* /opt/ltp/runtest/* /opt/ltp/scenario_groups/* /opt/ltp/testcases/bin/* /opt/ltp/testcases/bin/*/bin/* /opt/ltp/testscripts/* /opt/ltp/testcases/open_posix_testsuite/* /opt/ltp/testcases/open_posix_testsuite/conformance/* /opt/ltp/testcases/open_posix_testsuite/Documentation/* /opt/ltp/testcases/open_posix_testsuite/functional/* /opt/ltp/testcases/open_posix_testsuite/include/* /opt/ltp/testcases/open_posix_testsuite/scripts/* /opt/ltp/testcases/open_posix_testsuite/stress/* /opt/ltp/testcases/open_posix_testsuite/tools/* /opt/ltp/testcases/data/nm01/lib.a /opt/ltp/lib/libmem.a" + +# Avoid stripping some generated binaries otherwise some of the ltp tests such as ldd01 & nm01 fail +INHIBIT_PACKAGE_STRIP_FILES = "/opt/ltp/testcases/bin/nm01 /opt/ltp/testcases/bin/ldd01" +INSANE_SKIP_${PN} += "already-stripped staticdev" + +# Avoid file dependency scans, as LTP checks for things that may or may not +# exist on the running system. For instance it has specific checks for +# csh and ksh which are not typically part of OpenEmbedded systems (but +# can be added via additional layers.) +SKIP_FILEDEPS_${PN} = '1' -- cgit v1.2.3