diff options
author | Andrew Geissler <geissonator@yahoo.com> | 2020-04-13 21:39:40 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2020-05-05 16:30:44 +0300 |
commit | 82c905dc58a36aeae40b1b273a12f63fb1973cf4 (patch) | |
tree | 38caf00263451b5036435cdc36e035b25d32e623 /poky/meta/recipes-extended/ltp | |
parent | 83ecb75644b3d677c274188f9ac0b2374d6f6925 (diff) | |
download | openbmc-82c905dc58a36aeae40b1b273a12f63fb1973cf4.tar.xz |
meta-openembedded and poky: subtree updates
Squash of the following due to dependencies among them
and OpenBMC changes:
meta-openembedded: subtree update:d0748372d2..9201611135
meta-openembedded: subtree update:9201611135..17fd382f34
poky: subtree update:9052e5b32a..2e11d97b6c
poky: subtree update:2e11d97b6c..a8544811d7
The change log was too large for the jenkins plugin
to handle therefore it has been removed. Here is
the first and last commit of each subtree:
meta-openembedded:d0748372d2
cppzmq: bump to version 4.6.0
meta-openembedded:17fd382f34
mpv: Remove X11 dependency
poky:9052e5b32a
package_ipk: Remove pointless comment to trigger rebuild
poky:a8544811d7
pbzip2: Fix license warning
Change-Id: If0fc6c37629642ee207a4ca2f7aa501a2c673cd6
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'poky/meta/recipes-extended/ltp')
22 files changed, 244 insertions, 1184 deletions
diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-Add-configure-time-check-for-getdents-getdents64-API.patch b/poky/meta/recipes-extended/ltp/ltp/0001-Add-configure-time-check-for-getdents-getdents64-API.patch deleted file mode 100644 index bfceadb19..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0001-Add-configure-time-check-for-getdents-getdents64-API.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 404dfeb4faef213b0450f173b60cd7080edec349 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 26 Jul 2019 10:32:29 -0700 -Subject: [PATCH 1/2] Add configure time check for getdents/getdents64 APIs - -glibc 2.30 has added wrapper for getdents64 this will help in detecting -right condition to use fallback - -Check for getdents API as well while here - -Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2019-July/012954.html] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - configure.ac | 2 ++ - testcases/kernel/syscalls/getdents/getdents.h | 8 ++++++-- - 2 files changed, 8 insertions(+), 2 deletions(-) - ---- a/configure.ac -+++ b/configure.ac -@@ -65,6 +65,8 @@ AC_CHECK_FUNCS([ \ - fallocate \ - fchownat \ - fstatat \ -+ getdents \ -+ getdents64 \ - kcmp \ - mkdirat \ - mknodat \ ---- a/testcases/kernel/syscalls/getdents/getdents.h -+++ b/testcases/kernel/syscalls/getdents/getdents.h -@@ -23,7 +23,7 @@ - #include <stdint.h> - #include "test.h" - #include "lapi/syscalls.h" -- -+#include "config.h" - /* - * See fs/compat.c struct compat_linux_dirent - */ -@@ -34,12 +34,17 @@ struct linux_dirent { - char d_name[]; - }; - -+#if HAVE_GETDENTS -+#include <unistd.h> -+#else - static inline int - getdents(unsigned int fd, struct linux_dirent *dirp, unsigned int size) - { - return ltp_syscall(__NR_getdents, fd, dirp, size); - } - -+#endif /* HAVE_GETDENTS */ -+ - struct linux_dirent64 { - uint64_t d_ino; - int64_t d_off; -@@ -48,10 +53,13 @@ struct linux_dirent64 { - char d_name[]; - }; - -+#if HAVE_GETDENTS64 -+#include <unistd.h> -+#else - static inline int - getdents64(unsigned int fd, struct linux_dirent64 *dirp64, unsigned int size) - { - return ltp_syscall(__NR_getdents64, fd, dirp64, size); - } -- -+#endif /* HAVE_GETDENTS64 */ - #endif /* GETDENTS_H */ diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-Add-more-musl-exclusions.patch b/poky/meta/recipes-extended/ltp/ltp/0001-Add-more-musl-exclusions.patch new file mode 100644 index 000000000..02c2fef55 --- /dev/null +++ b/poky/meta/recipes-extended/ltp/ltp/0001-Add-more-musl-exclusions.patch @@ -0,0 +1,44 @@ +From 788c47ceef7f115ab7f7aa17f918e58795f4e6c7 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Fri, 20 Dec 2019 13:06:05 +0100 +Subject: [PATCH] Add more musl exclusions + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +[ pvorel: rebase for 20200120: enable fanotify13, fanotify15, setxattr03 ] +Signed-off-by: Petr Vorel <petr.vorel@gmail.com> +--- + testcases/kernel/syscalls/accept4/Makefile | 4 ++++ + testcases/kernel/syscalls/timer_create/Makefile | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/testcases/kernel/syscalls/accept4/Makefile b/testcases/kernel/syscalls/accept4/Makefile +index 504042e11..94db06266 100644 +--- a/testcases/kernel/syscalls/accept4/Makefile ++++ b/testcases/kernel/syscalls/accept4/Makefile +@@ -20,4 +20,8 @@ top_srcdir ?= ../../../.. + + include $(top_srcdir)/include/mk/testcases.mk + ++ifeq ($(LIBC),musl) ++FILTER_OUT_MAKE_TARGETS := accept4_01 ++endif ++ + include $(top_srcdir)/include/mk/generic_leaf_target.mk +diff --git a/testcases/kernel/syscalls/timer_create/Makefile b/testcases/kernel/syscalls/timer_create/Makefile +index 8de247075..eb240f432 100644 +--- a/testcases/kernel/syscalls/timer_create/Makefile ++++ b/testcases/kernel/syscalls/timer_create/Makefile +@@ -20,6 +20,10 @@ top_srcdir ?= ../../../.. + + include $(top_srcdir)/include/mk/testcases.mk + ++ifeq ($(LIBC),musl) ++FILTER_OUT_MAKE_TARGETS := timer_create01 timer_create03 ++endif ++ + CPPFLAGS += -D_GNU_SOURCE -I$(abs_srcdir)/../include + + LDLIBS += -lpthread -lrt +-- +2.25.1 diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-build-Add-option-to-select-libc-implementation.patch b/poky/meta/recipes-extended/ltp/ltp/0001-build-Add-option-to-select-libc-implementation.patch index b5c25c56a..b1a99959d 100644 --- a/poky/meta/recipes-extended/ltp/ltp/0001-build-Add-option-to-select-libc-implementation.patch +++ b/poky/meta/recipes-extended/ltp/ltp/0001-build-Add-option-to-select-libc-implementation.patch @@ -1,7 +1,7 @@ -From ec282980e6eee96f5b74aba464141f86049263e6 Mon Sep 17 00:00:00 2001 +From be453d1be826b862d47e08663fd69eea9dd62730 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Thu, 7 Jan 2016 18:19:03 +0000 -Subject: [PATCH] build: Add option to select libc implementation +Subject: [PATCH 1/6] build: Add option to select libc implementation There are more than glibc for C library implementation available on linux now a days, uclibc cloaked like glibc but musl e.g. is very @@ -11,20 +11,29 @@ Disable tests specifically not building _yet_ on musl based systems Upstream-Status: Pending +rt_tgsigqueueinfo fails with: +rt_tgsigqueueinfo01.c: In function 'sigusr1_handler': +rt_tgsigqueueinfo01.c:42:22: error: 'siginfo_t' {aka 'struct <anonymous>'} has no member named '_sifields'; did you mean '__si_fields'? + 42 | sigval_rcv = uinfo->_sifields._rt.SI_SIGVAL.sival_ptr; + | ^~~~~~~~~ + | __si_fields + Signed-off-by: Khem Raj <raj.khem@gmail.com> +[ pvorel: rebase for 20200120: enable mallopt, profil, rpc016, +rt_sigsuspend, sbrk_mutex, setdomainname, sethostname, sigsuspend, +testpi-3, testpi-5, testpi-6, ustat; move rt_tgsigqueueinfo +from 0006-rt_tgsigqueueinfo-disable-test-on-musl.patch ] +Signed-off-by: Petr Vorel <petr.vorel@gmail.com> +Signed-off-by: Petr Vorel <pvorel@suse.cz> --- - Makefile | 5 +++++ - testcases/kernel/Makefile | 5 ++++- - testcases/kernel/sched/Makefile | 4 +++- - testcases/kernel/syscalls/Makefile | 5 +++++ - testcases/network/nfsv4/acl/Makefile | 4 ++++ - testcases/network/rpc/basic_tests/Makefile | 5 +++++ - testcases/realtime/func/pi-tests/Makefile | 4 ++++ - testcases/realtime/stress/pi-tests/Makefile | 5 +++++ - 8 files changed, 35 insertions(+), 2 deletions(-) + Makefile | 5 +++++ + testcases/kernel/Makefile | 5 ++++- + testcases/kernel/sched/Makefile | 4 +++- + testcases/kernel/syscalls/Makefile | 4 ++++ + 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile -index 768ca46..e9d679a 100644 +index 768ca4606..e9d679a71 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,11 @@ vpath %.mk $(top_srcdir)/mk:$(top_srcdir)/mk/include @@ -40,18 +49,19 @@ index 768ca46..e9d679a 100644 # COMMON_TARGETS: Targets which exist in all, clean, and install. # INSTALL_TARGETS: Targets which exist in clean and install (contains diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile -index 39d79c7..24a57d9 100644 +index 3319b3163..94ea362c8 100644 --- a/testcases/kernel/Makefile +++ b/testcases/kernel/Makefile -@@ -49,12 +49,15 @@ SUBDIRS += connectors \ +@@ -49,13 +49,16 @@ SUBDIRS += connectors \ logging \ mem \ numa \ - pty \ sched \ security \ - timers \ + sound \ tracing \ + uevents \ +ifneq ($(LIBC),musl) +SUBDIRS += pty @@ -61,7 +71,7 @@ index 39d79c7..24a57d9 100644 SUBDIRS += power_management endif diff --git a/testcases/kernel/sched/Makefile b/testcases/kernel/sched/Makefile -index 6a57d79..74bb933 100644 +index 6a57d79ee..74bb93370 100644 --- a/testcases/kernel/sched/Makefile +++ b/testcases/kernel/sched/Makefile @@ -23,5 +23,7 @@ @@ -74,76 +84,19 @@ index 6a57d79..74bb933 100644 +endif include $(top_srcdir)/include/mk/generic_trunk_target.mk diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile -index 45a00cf..d1becd0 100644 +index 45a00cf7d..af5a591a0 100644 --- a/testcases/kernel/syscalls/Makefile +++ b/testcases/kernel/syscalls/Makefile -@@ -28,6 +28,11 @@ ifeq ($(UCLINUX),1) - FILTER_OUT_DIRS += capget capset chmod chown clone fork getcontext llseek \ +@@ -29,6 +29,10 @@ FILTER_OUT_DIRS += capget capset chmod chown clone fork getcontext llseek \ mincore mprotect nftw profil remap_file_pages sbrk endif -+ifeq ($(LIBC),musl) -+FILTER_OUT_DIRS += confstr fmtmsg getcontext ioctl mallopt profil \ -+ rt_sigsuspend setdomainname sethostname sigsuspend \ -+ ustat -+endif - - ifeq ($(UCLIBC),1) - FILTER_OUT_DIRS += profil -diff --git a/testcases/network/nfsv4/acl/Makefile b/testcases/network/nfsv4/acl/Makefile -index 8c55a6b..f7cda62 100644 ---- a/testcases/network/nfsv4/acl/Makefile -+++ b/testcases/network/nfsv4/acl/Makefile -@@ -26,4 +26,8 @@ include $(top_srcdir)/include/mk/env_pre.mk - - LDLIBS += $(ACL_LIBS) +ifeq ($(LIBC),musl) -+FILTER_OUT_MAKE_TARGETS := acl1 ++FILTER_OUT_DIRS += confstr fmtmsg getcontext ioctl rt_tgsigqueueinfo +endif + - include $(top_srcdir)/include/mk/generic_leaf_target.mk -diff --git a/testcases/network/rpc/basic_tests/Makefile b/testcases/network/rpc/basic_tests/Makefile -index 66e9d56..ea8eb8a 100644 ---- a/testcases/network/rpc/basic_tests/Makefile -+++ b/testcases/network/rpc/basic_tests/Makefile -@@ -23,4 +23,9 @@ - top_srcdir ?= ../../../.. - - include $(top_srcdir)/include/mk/env_pre.mk -+ -+ifeq ($(LIBC),musl) -+FILTER_OUT_DIRS += rpc01 -+endif -+ - include $(top_srcdir)/include/mk/generic_trunk_target.mk -diff --git a/testcases/realtime/func/pi-tests/Makefile b/testcases/realtime/func/pi-tests/Makefile -index 68616a7..748754b 100644 ---- a/testcases/realtime/func/pi-tests/Makefile -+++ b/testcases/realtime/func/pi-tests/Makefile -@@ -27,5 +27,9 @@ include $(top_srcdir)/include/mk/env_pre.mk - include $(abs_srcdir)/../../config.mk - - MAKE_TARGETS := testpi-0 testpi-1 testpi-2 testpi-4 testpi-5 testpi-6 testpi-7 sbrk_mutex -+ifeq ($(LIBC),musl) -+FILTER_OUT_MAKE_TARGETS := testpi-5 testpi-6 sbrk_mutex -+endif -+ - - include $(top_srcdir)/include/mk/generic_leaf_target.mk -diff --git a/testcases/realtime/stress/pi-tests/Makefile b/testcases/realtime/stress/pi-tests/Makefile -index 1881f75..266e0b8 100644 ---- a/testcases/realtime/stress/pi-tests/Makefile -+++ b/testcases/realtime/stress/pi-tests/Makefile -@@ -24,4 +24,9 @@ top_srcdir ?= ../../../.. - - include $(top_srcdir)/include/mk/env_pre.mk - include $(abs_srcdir)/../../config.mk -+ -+ifeq ($(LIBC),musl) -+FILTER_OUT_MAKE_TARGETS := testpi-3 -+endif -+ - include $(top_srcdir)/include/mk/generic_leaf_target.mk --- -2.7.4 - + ifeq ($(UCLIBC),1) + FILTER_OUT_DIRS += profil + endif +-- +2.25.1 diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch b/poky/meta/recipes-extended/ltp/ltp/0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch deleted file mode 100644 index cc4008130..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch +++ /dev/null @@ -1,64 +0,0 @@ -From e3a8502d0a4f8a44ddd02ca4b2efc097133fb9f7 Mon Sep 17 00:00:00 2001 -From: Mathias Fiedler <mathias.fiedler@aox-tech.de> -Date: Fri, 23 Aug 2019 12:46:48 +0200 -Subject: [PATCH] cve-2017-17052: Avoid unsafe exits in threads - -According to manpage exit(3) calling exit is not thread-safe. -And with glibc 2.28 (and probably also with glibc >=2.27) sometimes -child processes created in fork_thread can get stuck on process exit in -glibc's __run_exit_handlers trying to acquire some lock which was in -locked state while the fork was created. This can happen when exit is -called in mmap_thread concurrently to the fork. -While the main process will still return with PASSED some of its -children are left behind. - -Comparing the source code with the original program as described in the -commit 2b7e8665b4ff51c034c55df3cff76518d1a9ee3a of linux kernel >=4.13 -the exits in mmap_thread and fork_thread should not be necessary to -trigger the original bug. - -Therefore those exit calls are removed. The mmap_thread and fork_thread -should still exit when their corresponding main thread in do_test_fork -calls exit_group. The remaining exit in do_test_fork will be called in -the main thread without any concurrent thread in the same process. - -Signed-off-by: Mathias Fiedler <mathias.fiedler@aox-tech.de> -Acked-by: Cyril Hrubis <chrubis@suse.cz> -Acked-by: Jan Stancek <jstancek@redhat.com> - -Upstream-Status: Backport -[https://github.com/linux-test-project/ltp/commit/9f0b452c1af4bcb54da35711eb3fa77334a350b4] - -CVE: CVE-2017-17052 - -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - testcases/cve/cve-2017-17052.c | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/testcases/cve/cve-2017-17052.c b/testcases/cve/cve-2017-17052.c -index d7da7e919..18cd2a6d7 100644 ---- a/testcases/cve/cve-2017-17052.c -+++ b/testcases/cve/cve-2017-17052.c -@@ -58,8 +58,6 @@ static void *mmap_thread(void *arg) - for (;;) { - SAFE_MMAP(NULL, 0x1000000, PROT_READ, - MAP_POPULATE|MAP_ANONYMOUS|MAP_PRIVATE, -1, 0); -- if (*do_exit) -- exit(0); - } - - return arg; -@@ -67,9 +65,6 @@ static void *mmap_thread(void *arg) - - static void *fork_thread(void *arg) - { -- if (*do_exit) -- exit(0); -- - usleep(rand() % 10000); - SAFE_FORK(); - --- -2.17.1 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch b/poky/meta/recipes-extended/ltp/ltp/0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch deleted file mode 100644 index 94f6f5a15..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch +++ /dev/null @@ -1,81 +0,0 @@ -From fbeda82f440a0098be42dd668cbc47212a86ab48 Mon Sep 17 00:00:00 2001 -From: He Zhe <zhe.he@windriver.com> -Date: Wed, 21 Aug 2019 16:27:24 +0800 -Subject: [PATCH] cve/meltdown.c: Fix kernel symbol finding - -meltdown case fails as below. -safe_file_ops.c:219: BROK: Expected 3 conversions got 2 at meltdown.c:272 - -find_kernel_symbol is defined to try twice with each of /proc/kallsyms and -/boot/System.map-%s. Currently if the symbol is not found in /proc/kallsyms, -when kernel option CONFIG_KALLSYMS_ALL is disabled, it would stop the case -immediately due to SAFE_FILE_LINES_SCANF. - -This patch turns to use FILE_LINES_SCANF to give find_kernel_symbol second -chance. - -[jstancek] Fix also condition introduced in 7709d2ae92ea, even if - /proc/kallsyms is disabled, we still want to try System.map. - -Signed-off-by: He Zhe <zhe.he@windriver.com> -Signed-off-by: Jan Stancek <jstancek@redhat.com> - -Upstream-Status: Backport -[https://github.com/linux-test-project/ltp/commit/c2049b5c874bc071f8185bffb5fd7dcb042d9ec8] - -Remove the hunk for upstream 7709d2ae92ea ("cve/meltdown.c: abort the test if kallsyms was not enabled") -that has been covered by this patch. - -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - testcases/cve/meltdown.c | 13 ++++++++++--- - 1 file changed, 10 insertions(+), 3 deletions(-) - -diff --git a/testcases/cve/meltdown.c b/testcases/cve/meltdown.c -index a53ea9b..22651a6 100644 ---- a/testcases/cve/meltdown.c -+++ b/testcases/cve/meltdown.c -@@ -267,9 +267,15 @@ find_symbol_in_file(const char *filename, const char *symname) - int ret, read; - char fmt[strlen(symname) + 64]; - -+ tst_res(TINFO, "Looking for %s in %s", symname, filename); -+ if (access(filename, F_OK) == -1) { -+ tst_res(TINFO, "%s not available", filename); -+ return 0; -+ } -+ - sprintf(fmt, "%%lx %%c %s%%c", symname); - -- ret = SAFE_FILE_LINES_SCANF(filename, fmt, &addr, &type, &read); -+ ret = FILE_LINES_SCANF(filename, fmt, &addr, &type, &read); - if (ret) - return 0; - -@@ -287,13 +293,11 @@ find_kernel_symbol(const char *name) - if (addr) - return addr; - -- tst_res(TINFO, "not found '%s' in /proc/kallsyms", name); - if (uname(&utsname) < 0) - tst_brk(TBROK | TERRNO, "uname"); - - sprintf(systemmap, "/boot/System.map-%s", utsname.release); - -- tst_res(TINFO, "looking in '%s'\n", systemmap); - addr = find_symbol_in_file(systemmap, name); - return addr; - } -@@ -308,6 +312,9 @@ static void setup(void) - saved_cmdline_addr = find_kernel_symbol("saved_command_line"); - tst_res(TINFO, "&saved_command_line == 0x%lx", saved_cmdline_addr); - -+ if (!saved_cmdline_addr) -+ tst_brk(TCONF, "saved_command_line not found"); -+ - spec_fd = SAFE_OPEN("/proc/cmdline", O_RDONLY); - - memset(target_array, 1, sizeof(target_array)); --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch b/poky/meta/recipes-extended/ltp/ltp/0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch deleted file mode 100644 index 1b433d3ad..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch +++ /dev/null @@ -1,35 +0,0 @@ -From fae8852a63d9fa6e56fb8b24eaf10560bd13757f Mon Sep 17 00:00:00 2001 -From: Yongxin Liu <yongxin.liu@windriver.com> -Date: Tue, 12 Nov 2019 11:33:50 +0800 -Subject: [PATCH] mkswap01.sh: Add "udevadm trigger" before swap verification - -Fix: https://github.com/linux-test-project/ltp/issues/458 - -Sometimes the swap device cannot show up in /dev/disk/by-uuid/ -or /dev/disk/by-lable/ due to the issue #458. When this issue -happens, "blkid -c /dev/null" and "ls /dev/disk/by-uuid/" show -different UUID of the device. - -Upstream-Status: Submitted [https://patchwork.ozlabs.org/patch/1193414] - -Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com> ---- - testcases/commands/mkswap/mkswap01.sh | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/testcases/commands/mkswap/mkswap01.sh b/testcases/commands/mkswap/mkswap01.sh -index 3a348c6e6..9437c4a4e 100755 ---- a/testcases/commands/mkswap/mkswap01.sh -+++ b/testcases/commands/mkswap/mkswap01.sh -@@ -129,6 +129,8 @@ mkswap_test() - return - fi - -+ udevadm trigger --name-match=$TST_DEVICE -+ - if [ -n "$device" ]; then - mkswap_verify "$mkswap_op" "$op_arg" "$device" "$size" "$dev_file" - if [ $? -ne 0 ]; then --- -2.14.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch b/poky/meta/recipes-extended/ltp/ltp/0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch deleted file mode 100644 index bed84712a..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch +++ /dev/null @@ -1,57 +0,0 @@ -From d656a447893dccc310c975a239f482278550c3e0 Mon Sep 17 00:00:00 2001 -From: Jan Stancek <jstancek@redhat.com> -Date: Tue, 21 May 2019 10:10:44 +0200 -Subject: [PATCH] overcommit_memory: update for "mm: fix false-positive - OVERCOMMIT_GUESS failures" - -commit 8c7829b04c52 ("mm: fix false-positive OVERCOMMIT_GUESS failures") -changes logic of __vm_enough_memory(), simplifying it to: - When in GUESS mode, catch wild allocations by comparing their request - size to total amount of ram and swap in the system. - -Testcase currently allocates mem_total + swap_total, which doesn't trigger -new condition. Make it more extreme, but assuming free_total / 2 will PASS, -and 2*sum_total will FAIL. - -Signed-off-by: Jan Stancek <jstancek@redhat.com> -Acked-by: Cyril Hrubis <chrubis@suse.cz> - -Upstream-Status: Backport [https://github.com/linux-test-project/ltp/commit/d656a447893dccc310c975a239f482278550c3e0] -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - testcases/kernel/mem/tunable/overcommit_memory.c | 11 ++++------- - 1 file changed, 4 insertions(+), 7 deletions(-) - -diff --git a/testcases/kernel/mem/tunable/overcommit_memory.c b/testcases/kernel/mem/tunable/overcommit_memory.c -index 555298f..345764d 100644 ---- a/testcases/kernel/mem/tunable/overcommit_memory.c -+++ b/testcases/kernel/mem/tunable/overcommit_memory.c -@@ -36,11 +36,10 @@ - * - * The program is designed to test the two tunables: - * -- * When overcommit_memory = 0, allocatable memory can't overextends -- * the amount of free memory. I choose the three cases: -+ * When overcommit_memory = 0, allocatable memory can't overextend -+ * the amount of total memory: - * a. less than free_total: free_total / 2, alloc should pass. -- * b. greater than free_total: free_total * 2, alloc should fail. -- * c. equal to sum_total: sum_tatal, alloc should fail -+ * b. greater than sum_total: sum_total * 2, alloc should fail. - * - * When overcommit_memory = 1, it can alloc enough much memory, I - * choose the three cases: -@@ -164,9 +163,7 @@ static void overcommit_memory_test(void) - - update_mem(); - alloc_and_check(free_total / 2, EXPECT_PASS); -- update_mem(); -- alloc_and_check(free_total * 2, EXPECT_FAIL); -- alloc_and_check(sum_total, EXPECT_FAIL); -+ alloc_and_check(sum_total * 2, EXPECT_FAIL); - - /* start to test overcommit_memory=1 */ - set_sys_tune("overcommit_memory", 1, 1); --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch b/poky/meta/recipes-extended/ltp/ltp/0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch deleted file mode 100644 index 0e56c0825..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch +++ /dev/null @@ -1,46 +0,0 @@ -From a5046625eaeed2d3fba456c3ba84c6c141c2ad7c Mon Sep 17 00:00:00 2001 -From: He Zhe <zhe.he@windriver.com> -Date: Thu, 29 Aug 2019 21:09:46 +0800 -Subject: [PATCH] syscall/rt_sigtimedwait01: Fix wrong sigset length for MIPS - -rt_sigtimedwait01 fails as follow on MIPS arches -rt_sigtimedwait01 1 TFAIL : .../sigwaitinfo01.c:58: test_empty_set -(.../sigwaitinfo01.c: 148): Unexpected failure: -TEST_ERRNO=EINVAL(22): Invalid argument - -As this case purposely bypasses glibc, it should align with the size of kernel -definition of sigset_t which is different from other arches. -https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/mips/include/uapi/asm/signal.h#n15 - -This patch turns to use _NSIG which is always right for all arches. - -Upstream-Status: Backport [a5046625eaeed2d3fba456c3ba84c6c141c2ad7c] - -Suggested-by: Jan Stancek <jstancek@redhat.com> -Acked-by: Jan Stancek <jstancek@redhat.com> -Acked-by: Cyril Hrubis <chrubis@suse.cz> -Signed-off-by: He Zhe <zhe.he@windriver.com> -Signed-off-by: Petr Vorel <pvorel@suse.cz> ---- - testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c -index 5a32ce1..6a30c27 100644 ---- a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c -+++ b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c -@@ -128,9 +128,8 @@ static int my_sigtimedwait(const sigset_t * set, siginfo_t * info, - static int my_rt_sigtimedwait(const sigset_t * set, siginfo_t * info, - struct timespec *timeout) - { -- -- /* The last argument is (number_of_signals)/(bits_per_byte), which are 64 and 8, resp. */ -- return ltp_syscall(__NR_rt_sigtimedwait, set, info, timeout, 8); -+ /* _NSIG is always the right number of bits of signal map for all arches */ -+ return ltp_syscall(__NR_rt_sigtimedwait, set, info, timeout, _NSIG/8); - } - #endif - --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-syscalls-Check-for-time64-unsafe-syscalls-before-usi.patch b/poky/meta/recipes-extended/ltp/ltp/0001-syscalls-Check-for-time64-unsafe-syscalls-before-usi.patch new file mode 100644 index 000000000..ac8f08ef5 --- /dev/null +++ b/poky/meta/recipes-extended/ltp/ltp/0001-syscalls-Check-for-time64-unsafe-syscalls-before-usi.patch @@ -0,0 +1,122 @@ +From 89c5841bd148a7ae70c65f4a1ca5996b7f0cddfa Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 19 Feb 2020 22:52:04 -0800 +Subject: [PATCH] syscalls: Check for time64 unsafe syscalls before using them + +musl is using 64bit time_t now on 32bit architectures and these syscalls +no longer exist, therefore its better to check for them being available +before using them + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Reviewed-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com> +Reviewed-by: Petr Vorel <pvorel@suse.cz> +Signed-off-by: Petr Vorel <pvorel@suse.cz> +Upstream-Status: accepted as 5b57ae2913e2d2d167cbd3822784b4c4ba336812 +--- + lib/tst_clocks.c | 16 ++++++---------- + .../syscalls/gettimeofday/gettimeofday01.c | 6 ++---- + .../syscalls/gettimeofday/gettimeofday02.c | 8 +++----- + 3 files changed, 11 insertions(+), 19 deletions(-) + +diff --git a/lib/tst_clocks.c b/lib/tst_clocks.c +index 5195da38f..fa2f1cb84 100644 +--- a/lib/tst_clocks.c ++++ b/lib/tst_clocks.c +@@ -3,28 +3,24 @@ + * Copyright (c) 2017 Cyril Hrubis <chrubis@suse.cz> + */ + +-/* +- * clock_gettime() and clock_getres() functions +- */ +- +-#define _GNU_SOURCE +-#include <unistd.h> + #include <time.h> +-#include <sys/syscall.h> + ++#define TST_NO_DEFAULT_MAIN ++#include "tst_test.h" + #include "tst_clocks.h" ++#include "lapi/syscalls.h" + + int tst_clock_getres(clockid_t clk_id, struct timespec *res) + { +- return syscall(SYS_clock_getres, clk_id, res); ++ return tst_syscall(__NR_clock_getres, clk_id, res); + } + + int tst_clock_gettime(clockid_t clk_id, struct timespec *ts) + { +- return syscall(SYS_clock_gettime, clk_id, ts); ++ return tst_syscall(__NR_clock_gettime, clk_id, ts); + } + + int tst_clock_settime(clockid_t clk_id, struct timespec *ts) + { +- return syscall(SYS_clock_settime, clk_id, ts); ++ return tst_syscall(__NR_clock_settime, clk_id, ts); + } +diff --git a/testcases/kernel/syscalls/gettimeofday/gettimeofday01.c b/testcases/kernel/syscalls/gettimeofday/gettimeofday01.c +index 583d8f7b9..08ea1673a 100644 +--- a/testcases/kernel/syscalls/gettimeofday/gettimeofday01.c ++++ b/testcases/kernel/syscalls/gettimeofday/gettimeofday01.c +@@ -38,10 +38,8 @@ + #include <sys/time.h> + #include <errno.h> + #include "test.h" +-#include <sys/syscall.h> + #include <unistd.h> +- +-#define gettimeofday(a,b) syscall(__NR_gettimeofday,a,b) ++#include "lapi/syscalls.h" + + char *TCID = "gettimeofday01"; + int TST_TOTAL = 1; +@@ -63,7 +61,7 @@ int main(int ac, char **av) + for (lc = 0; TEST_LOOPING(lc); lc++) { + tst_count = 0; + +- TEST(gettimeofday((void *)-1, (void *)-1)); ++ TEST(ltp_syscall(__NR_gettimeofday, (void *)-1, (void *)-1)); + + /* gettimeofday returns an int, so we need to turn the long + * TEST_RETURN into an int to test with */ +diff --git a/testcases/kernel/syscalls/gettimeofday/gettimeofday02.c b/testcases/kernel/syscalls/gettimeofday/gettimeofday02.c +index 1d60f448e..5170ad2f7 100644 +--- a/testcases/kernel/syscalls/gettimeofday/gettimeofday02.c ++++ b/testcases/kernel/syscalls/gettimeofday/gettimeofday02.c +@@ -16,14 +16,12 @@ + #include <stdint.h> + #include <sys/time.h> + #include <stdlib.h> +-#include <sys/syscall.h> + #include <unistd.h> + #include <time.h> + #include <errno.h> + + #include "tst_test.h" +- +-#define gettimeofday(a,b) syscall(__NR_gettimeofday,a,b) ++#include "lapi/syscalls.h" + + static volatile sig_atomic_t done; + static char *str_rtime; +@@ -48,13 +46,13 @@ static void verify_gettimeofday(void) + + alarm(rtime); + +- if (gettimeofday(&tv1, NULL)) { ++ if (tst_syscall(__NR_gettimeofday, &tv1, NULL)) { + tst_res(TBROK | TERRNO, "gettimeofday() failed"); + return; + } + + while (!done) { +- if (gettimeofday(&tv2, NULL)) { ++ if (tst_syscall(__NR_gettimeofday, &tv2, NULL)) { + tst_res(TBROK | TERRNO, "gettimeofday() failed"); + return; + } +-- +2.25.1 diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-syscalls-tgkill03-wait-for-defunct-tid-to-get-detach.patch b/poky/meta/recipes-extended/ltp/ltp/0001-syscalls-tgkill03-wait-for-defunct-tid-to-get-detach.patch deleted file mode 100644 index 6ea26150f..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0001-syscalls-tgkill03-wait-for-defunct-tid-to-get-detach.patch +++ /dev/null @@ -1,75 +0,0 @@ -From e747d0456adc080a1d31fb653bda9dc491795c80 Mon Sep 17 00:00:00 2001 -From: Jan Stancek <jstancek@redhat.com> -Date: Sun, 16 Jun 2019 11:14:16 +0200 -Subject: [PATCH] syscalls/tgkill03: wait for defunct tid to get detached - -Case where defunct tid is used has been observed to sporadically fail: - tgkill03.c:96: FAIL: Defunct tid should have failed with ESRCH: SUCCESS - -glibc __pthread_timedjoin_ex() waits for CLONE_CHILD_CLEARTID to clear tid, -and then resumes. Kernel clears it (glibc pd->tid) at: - do_exit - exit_mm - mm_release - put_user(0, tsk->clear_child_tid); - -but kernel tid is still valid, presumably until: - release_task - __exit_signal - __unhash_process - detach_pid - -To avoid race wait until /proc/<pid>/task/<tid> disappears. - -Signed-off-by: Jan Stancek <jstancek@redhat.com> -Reviewed-by: Li Wang <liwang@redhat.com> -Acked-by: Sumit Garg <sumit.garg@linaro.org> - -Upstream-Status: Backport -[https://github.com/linux-test-project/ltp/commit/e747d0456adc080a1d31fb653bda9dc491795c80] - -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - testcases/kernel/syscalls/tgkill/tgkill03.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/testcases/kernel/syscalls/tgkill/tgkill03.c b/testcases/kernel/syscalls/tgkill/tgkill03.c -index f5bbdc5..593a217 100644 ---- a/testcases/kernel/syscalls/tgkill/tgkill03.c -+++ b/testcases/kernel/syscalls/tgkill/tgkill03.c -@@ -7,6 +7,7 @@ - - #include <pthread.h> - #include <pwd.h> -+#include <stdio.h> - #include <sys/types.h> - - #include "tst_safe_pthread.h" -@@ -42,6 +43,7 @@ static void setup(void) - { - sigset_t sigusr1; - pthread_t defunct_thread; -+ char defunct_tid_path[PATH_MAX]; - - sigemptyset(&sigusr1); - sigaddset(&sigusr1, SIGUSR1); -@@ -55,8 +57,9 @@ static void setup(void) - TST_CHECKPOINT_WAIT(0); - - SAFE_PTHREAD_CREATE(&defunct_thread, NULL, defunct_thread_func, NULL); -- - SAFE_PTHREAD_JOIN(defunct_thread, NULL); -+ sprintf(defunct_tid_path, "/proc/%d/task/%d", getpid(), defunct_tid); -+ TST_RETRY_FN_EXP_BACKOFF(access(defunct_tid_path, R_OK), -1, 15); - } - - static void cleanup(void) -@@ -108,4 +111,5 @@ static struct tst_test test = { - .setup = setup, - .cleanup = cleanup, - .test = run, -+ .timeout = 20, - }; --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-testcases-use-python3-everywhere-to-run-python-scrip.patch b/poky/meta/recipes-extended/ltp/ltp/0001-testcases-use-python3-everywhere-to-run-python-scrip.patch deleted file mode 100644 index f4f87f38a..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0001-testcases-use-python3-everywhere-to-run-python-scrip.patch +++ /dev/null @@ -1,161 +0,0 @@ -From 0463d793566772a606255957915f99d166d5740c Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Wed, 28 Aug 2019 18:30:23 +0200 -Subject: [PATCH] testcases: use python3 everywhere to run python scripts - -The scripts themselves have #!/usr/bin/python3 in them, -so I trust they are already py3-compatible. - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - testcases/kernel/power_management/runpwtests05.sh | 2 +- - .../power_management/runpwtests_exclusive01.sh | 2 +- - .../power_management/runpwtests_exclusive02.sh | 2 +- - .../power_management/runpwtests_exclusive03.sh | 2 +- - .../power_management/runpwtests_exclusive04.sh | 2 +- - .../power_management/runpwtests_exclusive05.sh | 2 +- - testcases/network/nfsv4/acl/runtest | 14 +++++++------- - testcases/realtime/func/pi-tests/run_auto.sh | 6 +++--- - 8 files changed, 16 insertions(+), 16 deletions(-) - -diff --git a/testcases/kernel/power_management/runpwtests05.sh b/testcases/kernel/power_management/runpwtests05.sh -index 8a7d0f6e0..43e234d01 100755 ---- a/testcases/kernel/power_management/runpwtests05.sh -+++ b/testcases/kernel/power_management/runpwtests05.sh -@@ -35,7 +35,7 @@ else - max_sched_smt=1 - fi - --tst_test_cmds python -+tst_test_cmds python3 - - if ! grep sched_debug -qw /proc/cmdline ; then - tst_brkm TCONF "Kernel cmdline parameter 'sched_debug' needed," \ -diff --git a/testcases/kernel/power_management/runpwtests_exclusive01.sh b/testcases/kernel/power_management/runpwtests_exclusive01.sh -index ec78319e2..9fefcbf6e 100755 ---- a/testcases/kernel/power_management/runpwtests_exclusive01.sh -+++ b/testcases/kernel/power_management/runpwtests_exclusive01.sh -@@ -35,7 +35,7 @@ else - max_sched_smt=1 - fi - --tst_test_cmds python -+tst_test_cmds python3 - - hyper_threaded=$(is_hyper_threaded) - multi_socket=$(is_multi_socket) -diff --git a/testcases/kernel/power_management/runpwtests_exclusive02.sh b/testcases/kernel/power_management/runpwtests_exclusive02.sh -index e107fce35..2cd0ecb05 100755 ---- a/testcases/kernel/power_management/runpwtests_exclusive02.sh -+++ b/testcases/kernel/power_management/runpwtests_exclusive02.sh -@@ -33,7 +33,7 @@ else - max_sched_smt=1 - fi - --tst_test_cmds python -+tst_test_cmds python3 - - hyper_threaded=$(is_hyper_threaded) - multi_socket=$(is_multi_socket) -diff --git a/testcases/kernel/power_management/runpwtests_exclusive03.sh b/testcases/kernel/power_management/runpwtests_exclusive03.sh -index 490344bb3..ab3a5d11d 100755 ---- a/testcases/kernel/power_management/runpwtests_exclusive03.sh -+++ b/testcases/kernel/power_management/runpwtests_exclusive03.sh -@@ -35,7 +35,7 @@ else - max_sched_smt=1 - fi - --tst_test_cmds python -+tst_test_cmds python3 - - hyper_threaded=$(is_hyper_threaded) - multi_socket=$(is_multi_socket) -diff --git a/testcases/kernel/power_management/runpwtests_exclusive04.sh b/testcases/kernel/power_management/runpwtests_exclusive04.sh -index 978ca02ae..438ef603f 100755 ---- a/testcases/kernel/power_management/runpwtests_exclusive04.sh -+++ b/testcases/kernel/power_management/runpwtests_exclusive04.sh -@@ -27,7 +27,7 @@ export TST_TOTAL=2 - # Checking test environment - check_kervel_arch - --tst_test_cmds python -+tst_test_cmds python3 - - hyper_threaded=$(is_hyper_threaded) - multi_socket=$(is_multi_socket) -diff --git a/testcases/kernel/power_management/runpwtests_exclusive05.sh b/testcases/kernel/power_management/runpwtests_exclusive05.sh -index a0dad5834..3a9afdbf2 100755 ---- a/testcases/kernel/power_management/runpwtests_exclusive05.sh -+++ b/testcases/kernel/power_management/runpwtests_exclusive05.sh -@@ -35,7 +35,7 @@ else - max_sched_smt=1 - fi - --tst_test_cmds python -+tst_test_cmds python3 - - hyper_threaded=$(is_hyper_threaded) - multi_socket=$(is_multi_socket) -diff --git a/testcases/network/nfsv4/acl/runtest b/testcases/network/nfsv4/acl/runtest -index d2e1b4c49..a859e85bc 100755 ---- a/testcases/network/nfsv4/acl/runtest -+++ b/testcases/network/nfsv4/acl/runtest -@@ -22,7 +22,7 @@ do - done - - # creation of users on the remote machine (removed only at the end of the tests) --rsh -n $REMOTEHOST python $PWD/create_users.py -u 50 -g 50 -+rsh -n $REMOTEHOST python3 $PWD/create_users.py -u 50 -g 50 - - echo "Starting ACL testing" - -@@ -51,19 +51,19 @@ echo "Basic tests finished" - - echo "LONG ACL TEST" - echo "creating necessary users and groups" --python create_users.py -u 50 -g 50 -+python3 create_users.py -u 50 -g 50 - echo "creating necessary users and groups on the remote host" - mkdir $NFSMNTDIR/lacl-testdir --python test_long_acl.py -l $MAXLENGTH -p $NFSMNTDIR/lacl-testdir -+python3 test_long_acl.py -l $MAXLENGTH -p $NFSMNTDIR/lacl-testdir - rm -rf $NFSMNTDIR/lacl-testdir - echo "Long ACL test OK with $MAXLENGTH entries" - echo "ACL STRESSING TEST" --python setacl_stress.py -n 100 -u $USER_NB -g $GRP_NB -f $FILE_NB -p $NFSMNTDIR -+python3 setacl_stress.py -n 100 -u $USER_NB -g $GRP_NB -f $FILE_NB -p $NFSMNTDIR - - # remove local an remote users --python cleanusers.py --python cleangroups.py --rsh -n $REMOTEHOST python $PWD/cleanusers.py -+python3 cleanusers.py -+python3 cleangroups.py -+rsh -n $REMOTEHOST python3 $PWD/cleanusers.py - - echo "Test OK" - -diff --git a/testcases/realtime/func/pi-tests/run_auto.sh b/testcases/realtime/func/pi-tests/run_auto.sh -index d13026049..277988568 100755 ---- a/testcases/realtime/func/pi-tests/run_auto.sh -+++ b/testcases/realtime/func/pi-tests/run_auto.sh -@@ -15,15 +15,15 @@ $SCRIPTS_DIR/run_c_files.sh $profile testpi-0 - - export LOG_FILE="$LOG_DIR/$LOG_FORMAT-testpi-1.log" - $SCRIPTS_DIR/run_c_files.sh $profile testpi-1 --PYTHONPATH=../../ python parse-testpi1.py $LOG_FILE 2>&1 | tee -a $LOG_FILE -+PYTHONPATH=../../ python3 parse-testpi1.py $LOG_FILE 2>&1 | tee -a $LOG_FILE - - export LOG_FILE="$LOG_DIR/$LOG_FORMAT-testpi-2.log" - $SCRIPTS_DIR/run_c_files.sh $profile testpi-2 --PYTHONPATH=../../ python parse-testpi2.py $LOG_FILE 2>&1 | tee -a $LOG_FILE -+PYTHONPATH=../../ python3 parse-testpi2.py $LOG_FILE 2>&1 | tee -a $LOG_FILE - - export LOG_FILE="$LOG_DIR/$LOG_FORMAT-testpi-4.log" - $SCRIPTS_DIR/run_c_files.sh $profile testpi-4 --PYTHONPATH=../../ python parse-testpi1.py $LOG_FILE 2>&1 | tee -a $LOG_FILE -+PYTHONPATH=../../ python3 parse-testpi1.py $LOG_FILE 2>&1 | tee -a $LOG_FILE - - - export LOG_FILE="" diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch b/poky/meta/recipes-extended/ltp/ltp/0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch deleted file mode 100644 index c936b788f..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 156776a3e29491b363fdc9811912e1298655d060 Mon Sep 17 00:00:00 2001 -From: Steven Price <steven.price@arm.com> -Date: Fri, 19 Jul 2019 13:48:17 +0100 -Subject: [PATCH] ustat02: Fix EFAULT in 32bit compatibility mode - -The size of dev_t is larger than 32 bits which causes the dev argument -to be passed incorrectly. On Arm this means that the EFAULT test case -actually returns EINVAL because the device number isn't recognised. - -Signed-off-by: Steven Price <steven.price@arm.com> -Acked-by: Li Wang <liwang@redhat.com> - -Upstream-Status: Backport -[https://github.com/linux-test-project/ltp/commit/156776a3e29491b363fdc9811912e1298655d060] - -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - testcases/kernel/syscalls/ustat/ustat02.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/testcases/kernel/syscalls/ustat/ustat02.c b/testcases/kernel/syscalls/ustat/ustat02.c -index 9bbe4f3..1a0e9e0 100644 ---- a/testcases/kernel/syscalls/ustat/ustat02.c -+++ b/testcases/kernel/syscalls/ustat/ustat02.c -@@ -36,7 +36,7 @@ int TST_TOTAL = ARRAY_SIZE(tc); - - void run(unsigned int test) - { -- TEST(tst_syscall(__NR_ustat, *tc[test].dev, tc[test].buf)); -+ TEST(tst_syscall(__NR_ustat, (unsigned int)*tc[test].dev, tc[test].buf)); - - if ((TST_RET == -1) && (TST_ERR == tc[test].exp_errno)) - tst_res(TPASS | TTERRNO, "ustat(2) expected failure"); --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0002-check-for-RES_USE_INET6-during-configure.patch b/poky/meta/recipes-extended/ltp/ltp/0002-check-for-RES_USE_INET6-during-configure.patch deleted file mode 100644 index 12e47eb2b..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0002-check-for-RES_USE_INET6-during-configure.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 7bc134545b7beb09717a60541530c20a1a5740d3 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 26 Jul 2019 10:55:28 -0700 -Subject: [PATCH 2/2] check for RES_USE_INET6 during configure - -glibc 2.30 has remove RES_USE_INET6 define which has been on its way out -since 2.26 release, this check ensures that we detect it before using it - -Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2019-July/012955.html] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - configure.ac | 13 +++++++++++++ - testcases/network/multicast/mc_gethost/mc_gethost.c | 6 ++++++ - 2 files changed, 19 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 2255b5c181..ed7acccb01 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -91,6 +91,19 @@ AC_CHECK_FUNCS([ \ - vmsplice \ - ]) - -+#check defines -+AC_MSG_CHECKING([for RES_USE_INET6]) -+AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <resolv.h>]], -+ [[char dummy[RES_USE_INET6];]])], -+ [ -+ AC_MSG_RESULT([yes]) -+ AC_DEFINE_UNQUOTED([HAVE_RES_USE_INET6], 1, [Define to 1 if you have the RES_USE_INET6 macro.]) -+ ], -+ [ -+ AC_MSG_RESULT([no]) -+ AC_DEFINE_UNQUOTED([HAVE_RES_USE_INET6], 0, [Define to 1 if you have the RES_USE_INET6 macro.]) -+ ] -+) - # Tools knobs - - # Expect -diff --git a/testcases/network/multicast/mc_gethost/mc_gethost.c b/testcases/network/multicast/mc_gethost/mc_gethost.c -index 9cc15d086b..d1cae5441a 100644 ---- a/testcases/network/multicast/mc_gethost/mc_gethost.c -+++ b/testcases/network/multicast/mc_gethost/mc_gethost.c -@@ -17,6 +17,8 @@ - #include <string.h> - #include <stdlib.h> - -+#include "config.h" -+ - #ifndef LOG_PERROR - #define LOG_PERROR 0 - #endif -@@ -50,8 +52,12 @@ usage: - argv++, argc--; - } - if (argc >= 1 && !strcmp(*argv, "-6")) { -+#if HAVE_RES_USE_INET6 - af = AF_INET6, size = IN6ADDRSZ; - _res.options |= RES_USE_INET6; -+#else -+ af = AF_INET, size = INADDRSZ; -+#endif - argv++, argc--; - } - if (argc >= 1 && !strcmp(*argv, "-f")) { --- -2.22.0 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0002-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch b/poky/meta/recipes-extended/ltp/ltp/0002-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch deleted file mode 100644 index eff9ed074..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0002-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 81e5bd5442337a4a648a0dbbff47eaac0d351287 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 7 Jan 2016 18:22:38 +0000 -Subject: [PATCH] kernel/controllers: Link with libfts explicitly on musl - -musl does not implement fts like glibc and therefore it depends on -external implementation for all fts APIs - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - testcases/kernel/controllers/Makefile.inc | 3 +++ - testcases/kernel/controllers/cpuset/Makefile.inc | 3 +++ - 2 files changed, 6 insertions(+) - -diff --git a/testcases/kernel/controllers/Makefile.inc b/testcases/kernel/controllers/Makefile.inc -index 4ca0b5a..1d85e4d 100644 ---- a/testcases/kernel/controllers/Makefile.inc -+++ b/testcases/kernel/controllers/Makefile.inc -@@ -36,6 +36,9 @@ MAKE_DEPS := $(LIB) - CPPFLAGS += -I$(abs_srcdir)/../$(LIBDIR) - - LDFLAGS += -L$(abs_builddir)/../$(LIBDIR) -+ifeq ($(LIBC),musl) -+LDLIBS += -lfts -+endif - - INSTALL_TARGETS ?= *.sh - -diff --git a/testcases/kernel/controllers/cpuset/Makefile.inc b/testcases/kernel/controllers/cpuset/Makefile.inc -index db6a843..86dd2a8 100644 ---- a/testcases/kernel/controllers/cpuset/Makefile.inc -+++ b/testcases/kernel/controllers/cpuset/Makefile.inc -@@ -42,6 +42,9 @@ MAKE_DEPS := $(LIBCONTROLLERS) $(LIBCPUSET) - LDFLAGS += -L$(abs_builddir)/$(LIBCPUSET_DIR) -L$(abs_builddir)/$(LIBCONTROLLERS_DIR) - - LDLIBS += -lcpu_set -lcontrollers -lltp -+ifeq ($(LIBC),musl) -+LDLIBS += -lfts -+endif - - INSTALL_TARGETS ?= *.sh - --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0003-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch b/poky/meta/recipes-extended/ltp/ltp/0003-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch index c0f69ecf5..df3e8831f 100644 --- a/poky/meta/recipes-extended/ltp/ltp/0003-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch +++ b/poky/meta/recipes-extended/ltp/ltp/0003-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch @@ -1,4 +1,4 @@ -From 29ce9fdab3bd34e69d73b5b890795559c06553f7 Mon Sep 17 00:00:00 2001 +From 1ce47a6ed811fd78ed04ea2f82e6321c6bca57b6 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Thu, 7 Jan 2016 19:40:08 +0000 Subject: [PATCH] Check if __GLIBC_PREREQ is defined before using it @@ -10,16 +10,17 @@ Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Yi Zhao <yi.zhao@windriver.com> + --- testcases/kernel/syscalls/accept4/accept4_01.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/testcases/kernel/syscalls/accept4/accept4_01.c b/testcases/kernel/syscalls/accept4/accept4_01.c -index dd289cf..76aa969 100644 +index 29e18f27d..07444a46f 100644 --- a/testcases/kernel/syscalls/accept4/accept4_01.c +++ b/testcases/kernel/syscalls/accept4/accept4_01.c @@ -38,6 +38,7 @@ - static struct sockaddr_in conn_addr; + static struct sockaddr_in *conn_addr, *accept_addr; static int listening_fd; +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) @@ -34,25 +35,21 @@ index dd289cf..76aa969 100644 static int create_listening_socket(void) { -@@ -115,6 +117,7 @@ static void verify_accept4(unsigned int nr) - SAFE_CONNECT(connfd, (struct sockaddr *)&conn_addr, sizeof(conn_addr)); - addrlen = sizeof(claddr); +@@ -114,12 +116,17 @@ static void verify_accept4(unsigned int nr) + SAFE_CONNECT(connfd, (struct sockaddr *)conn_addr, sizeof(*conn_addr)); + addrlen = sizeof(*accept_addr); +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) #if !(__GLIBC_PREREQ(2, 10)) - TEST(accept4_01(listening_fd, (struct sockaddr *)&claddr, &addrlen, + TEST(accept4_01(listening_fd, (struct sockaddr *)accept_addr, &addrlen, tcase->cloexec | tcase->nonblock)); -@@ -122,6 +125,10 @@ static void verify_accept4(unsigned int nr) - TEST(accept4(listening_fd, (struct sockaddr *)&claddr, &addrlen, + #else + TEST(accept4(listening_fd, (struct sockaddr *)accept_addr, &addrlen, tcase->cloexec | tcase->nonblock)); - #endif ++#endif +#else + TEST(accept4(listening_fd, (struct sockaddr *)&claddr, &addrlen, + tcase->cloexec | tcase->nonblock)); -+#endif + #endif if (TST_RET == -1) { if (TST_ERR == ENOSYS) - tst_brk(TCONF, "syscall __NR_accept4 not supported"); --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0006-rt_tgsigqueueinfo-disable-test-on-musl.patch b/poky/meta/recipes-extended/ltp/ltp/0006-rt_tgsigqueueinfo-disable-test-on-musl.patch deleted file mode 100644 index 804edfa1b..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0006-rt_tgsigqueueinfo-disable-test-on-musl.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 60054686e2c1a4bedf1d507af97ebbb7ff491e77 Mon Sep 17 00:00:00 2001 -From: Yi Zhao <yi.zhao@windriver.com> -Date: Thu, 18 Jul 2019 15:23:15 +0800 -Subject: [PATCH] rt_tgsigqueueinfo: disable test on musl - -Fix build error with musl: -rt_tgsigqueueinfo01.c: In function 'sigusr1_handler': -rt_tgsigqueueinfo01.c:42:22: error: 'siginfo_t' {aka 'struct <anonymous>'} has no member named '_sifields'; did you mean '__si_fields'? - 42 | sigval_rcv = uinfo->_sifields._rt.SI_SIGVAL.sival_ptr; - | ^~~~~~~~~ - | __si_fields - -Upstream-Status: Pending - -Signed-off-by: Yi Zhao <yi.zhao@windriver.com> ---- - testcases/kernel/syscalls/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile -index d1becd0..1f3ff34 100644 ---- a/testcases/kernel/syscalls/Makefile -+++ b/testcases/kernel/syscalls/Makefile -@@ -31,7 +31,7 @@ endif - ifeq ($(LIBC),musl) - FILTER_OUT_DIRS += confstr fmtmsg getcontext ioctl mallopt profil \ - rt_sigsuspend setdomainname sethostname sigsuspend \ -- ustat -+ ustat rt_tgsigqueueinfo - endif - - ifeq ($(UCLIBC),1) --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0008-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch b/poky/meta/recipes-extended/ltp/ltp/0008-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch index b46325eaf..350091a70 100644 --- a/poky/meta/recipes-extended/ltp/ltp/0008-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch +++ b/poky/meta/recipes-extended/ltp/ltp/0008-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch @@ -1,33 +1,34 @@ -From aa7a9185a037ad59012bd46713ac340458e95209 Mon Sep 17 00:00:00 2001 +From 4b7db094d6fc5659001ae8dc17078bb65d46b9c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com> Date: Fri, 13 May 2016 11:11:28 -0500 -Subject: [PATCH] testcases/network/nfsv4/acl/acl1.c: Security fix on - string printf +Subject: [PATCH] acl: Security fix on string printf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Fixes: +Fixes build error when compiled with -Werror=format-security: -acl1.c: In function 'test_acl_default': -acl1.c:317:2: error: format not a string literal and no format arguments -[-Werror=format-security] - printf(cmd); +acl1.c: In function ‘test_acl_default’: +acl1.c:305:2: error: format not a string literal and no format arguments [-Werror=format-security] + 305 | printf(cmd); -[YOCTO #9548] +Patch taken from openembedded-core, +original bug report: https://bugzilla.yoctoproject.org/9548 -Upstream-Status: Pending +[YOCTO #9548] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> +Signed-off-by: Petr Vorel <pvorel@suse.cz> +Upstream-Status: accepted in 4b7db094d6fc5659001ae8dc17078bb65d46b9c9 --- testcases/network/nfsv4/acl/acl1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/network/nfsv4/acl/acl1.c b/testcases/network/nfsv4/acl/acl1.c -index bdf0180..898b7ca 100644 +index aae9484e5..ad778cd33 100644 --- a/testcases/network/nfsv4/acl/acl1.c +++ b/testcases/network/nfsv4/acl/acl1.c -@@ -303,7 +303,7 @@ void test_acl_default(char *dir, acl_t acl) +@@ -302,7 +302,7 @@ void test_acl_default(char *dir, acl_t acl) char *cmd = malloc(256); strcpy(cmd, "chmod 7777 "); @@ -37,5 +38,5 @@ index bdf0180..898b7ca 100644 system(cmd); acl2 = acl_get_file(path, ACL_TYPE_ACCESS); -- -2.7.4 +2.25.1 diff --git a/poky/meta/recipes-extended/ltp/ltp/0009-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch b/poky/meta/recipes-extended/ltp/ltp/0009-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch deleted file mode 100644 index d32ac1dd7..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0009-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch +++ /dev/null @@ -1,68 +0,0 @@ -From a8715a1446305ffd76406f63c7f160c13a5b2e72 Mon Sep 17 00:00:00 2001 -From: "Hongzhi.Song" <hongzhi.song@windriver.com> -Date: Wed, 10 Oct 2018 22:07:05 -0400 -Subject: [PATCH] open_posix_testsuite/mmap24-2: Relax condition a bit - -Mips will return EINVAL instead of ENOMEM as expected -if the range [addr + len) exceeds TASK_SIZE. - -Linux kernel code: arch/mips/mm/mmap.c -if (flags & MAP_FIXED) { - /* Even MAP_FIXED mappings must reside within TASK_SIZE */ - if (TASK_SIZE - len < addr) - return -EINVAL; - -Relax the condition and accept both ENOMEM and EINVAL -as expected outcome. - -Upstream-Status: Submitted [https://lists.linux.it/pipermail/ltp/2018-October/009624.html] - -Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> ---- - .../open_posix_testsuite/conformance/interfaces/mmap/24-2.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c -index 9cf83d9..55090a6 100644 ---- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c -+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c -@@ -7,7 +7,7 @@ - * source tree. - * - * The mmap() function shall fail if: -- * [ENOMEM] MAP_FIXED was specified, -+ * [ENOMEM or EINVAL] MAP_FIXED was specified, - * and the range [addr,addr+len) exceeds that allowed - * for the address space of a process; or, if MAP_FIXED was not specified and - * there is insufficient room in the address space to effect the mapping. -@@ -15,7 +15,7 @@ - * Test Step: - * 1. Map a shared memory object, with size exceeding the value get from - * rlim_cur of resource RLIMIT_AS, setting MAP_FIXED; -- * 3. Should get ENOMEM. -+ * 3. Should get ENOMEM or EINVAL. - */ - - #include <stdio.h> -@@ -92,8 +92,8 @@ int main(void) - (unsigned long)len); - pa = mmap(addr, len, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, fd, - 0); -- if (pa == MAP_FAILED && errno == ENOMEM) { -- printf("Got ENOMEM: %s\nTest PASSED\n", strerror(errno)); -+ if (pa == MAP_FAILED && (errno == ENOMEM || errno == EINVAL)) { -+ printf("Got ENOMEM or EINVAL: %s\nTest PASSED\n", strerror(errno)); - exit(PTS_PASS); - } - -@@ -102,6 +102,6 @@ int main(void) - else - munmap(pa, len); - close(fd); -- printf("Test Fail: Did not get ENOMEM as expected\n"); -+ printf("Test Failed: Did not get ENOMEM or EINVAL as expected\n"); - return PTS_FAIL; - } --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0010-shmctl01-don-t-use-hardcoded-index-0-for-SHM_STAT-te.patch b/poky/meta/recipes-extended/ltp/ltp/0010-shmctl01-don-t-use-hardcoded-index-0-for-SHM_STAT-te.patch deleted file mode 100644 index 8704e5ffe..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0010-shmctl01-don-t-use-hardcoded-index-0-for-SHM_STAT-te.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 794933b38354a2612cf2c471f11798b306f35315 Mon Sep 17 00:00:00 2001 -From: Jan Stancek <jstancek@redhat.com> -Date: Mon, 20 May 2019 20:47:20 +0200 -Subject: [PATCH] shmctl01: don't use hardcoded index == 0 for SHM_STAT test - -Test fails on SHM_STAT testcase: - shmctl01 5 TFAIL : shmctl01.c:173: shmctl01 call failed - errno = 22 : Invalid argument - shmctl(0, SHM_STAT, 0x601060) = -EINVAL - -since following commit: - commit 99db46ea292780cd978d56932d9445b1e8bdafe8 - Author: Manfred Spraul <manfred@colorfullife.com> - Date: Tue May 14 15:46:36 2019 -0700 - ipc: do cyclic id allocation for the ipc object. - -Don't rely on index 0 being always available, but instead -use (maximum) index returned by SHM_INFO. - -Signed-off-by: Jan Stancek <jstancek@redhat.com> -Reviewed-by: Petr Vorel <pvorel@suse.cz> -Acked-by: Cyril Hrubis <chrubis@suse.cz> - -Upstream-Status: Backport -[https://github.com/linux-test-project/ltp/commit/db0a43d9388be2c347a8306751bbe6bec086d062] - -Signed-off-by: Hongzhi Song <hongzhi.song@windriver.com> -Signed-off-by: Yi Zhao <yi.zhao@windriver.com> ---- - testcases/kernel/syscalls/ipc/shmctl/shmctl01.c | 21 ++++++++++++++++++--- - 1 file changed, 18 insertions(+), 3 deletions(-) - -diff --git a/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c b/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c -index 1b46977..52bf23a 100644 ---- a/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c -+++ b/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c -@@ -79,6 +79,7 @@ static void func_info(int ret); - - /* Check routine for SHM_STAT */ - static void func_sstat(int ret); -+static void func_sstat_setup(void); - - /* Check routine for SHM_LOCK */ - static void func_lock(int ret); -@@ -110,7 +111,7 @@ static struct test_case_t { - #endif - {&shm_id_1, IPC_SET, &buf, func_set, set_setup}, - {&shm_id_1, IPC_INFO, (struct shmid_ds *) &info, func_info, NULL}, -- {&shm_index, SHM_STAT, &buf, func_sstat, NULL}, -+ {&shm_index, SHM_STAT, &buf, func_sstat, func_sstat_setup}, - {&shm_id_1, SHM_LOCK, NULL, func_lock, NULL}, - {&shm_id_1, SHM_UNLOCK, NULL, func_unlock, NULL}, - {&shm_id_1, IPC_RMID, NULL, func_rmid, NULL}, -@@ -407,9 +408,23 @@ static void func_info(int ret) - static void func_sstat(int ret) - { - if (ret >= 0) -- tst_resm(TPASS, "get correct shared memory id"); -+ tst_resm(TPASS, "get correct shared memory id for index: %d", -+ shm_index); - else -- tst_resm(TFAIL, "shared memory id is incorrect"); -+ tst_resm(TFAIL, "shared memory id is incorrect, index: %d", -+ shm_index); -+} -+ -+static void func_sstat_setup(void) -+{ -+ struct shm_info tmp; -+ int ret; -+ -+ ret = shmctl(shm_id_1, SHM_INFO, (void *)&tmp); -+ if (ret < 0) -+ tst_resm(TFAIL|TERRNO, "shmctl(SHM_INFO)"); -+ else -+ shm_index = ret; - } - - static void func_lock(int ret) --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0011-direct_io-diotest4-drop-MAP_FIXED.patch b/poky/meta/recipes-extended/ltp/ltp/0011-direct_io-diotest4-drop-MAP_FIXED.patch deleted file mode 100644 index 9cd188f65..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0011-direct_io-diotest4-drop-MAP_FIXED.patch +++ /dev/null @@ -1,56 +0,0 @@ -From f210d7e19b721041f31b7f258a169f89dc850303 Mon Sep 17 00:00:00 2001 -From: Jan Stancek <jstancek@redhat.com> -Date: Thu, 4 Jul 2019 16:45:23 +0200 -Subject: [PATCH] direct_io/diotest4: drop MAP_FIXED - -Hongzhi reports that this test is failing on mips64 with 5.1+: - diotest4 10 TBROK : diotest4.c:368: can't mmap file: Invalid argument - diotest4 11 TBROK : diotest4.c:368: Remaining cases broken -I could reproduce it on emulated 5kc-malta, running 5.2.0-rc7. - -Test is trying to map into area immediately following heap as MAP_SHARED, -but it used wrong alignment (fixed by 'lapi/mmap.h: include config.h'). - -Usage of MAP_FIXED seems unnecessary, so drop that too and let the kernel -pick an address. - -Reported-by: Hongzhi.Song <hongzhi.song@windriver.com> -Signed-off-by: Jan Stancek <jstancek@redhat.com> -Acked-by: Cyril Hrubis <chrubis@suse.cz> - -Upstream-Status: Backport -[https://github.com/linux-test-project/ltp/commit/f5444eeeabf252b8884b9465d277b6af853819e3] - -Signed-off-by: Yi Zhao <yi.zhao@windriver.com> ---- - testcases/kernel/io/direct_io/diotest4.c | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) - -diff --git a/testcases/kernel/io/direct_io/diotest4.c b/testcases/kernel/io/direct_io/diotest4.c -index e4616e4..bf200cd 100644 ---- a/testcases/kernel/io/direct_io/diotest4.c -+++ b/testcases/kernel/io/direct_io/diotest4.c -@@ -352,18 +352,14 @@ int main(int argc, char *argv[]) - total++; - - /* Test-10: read, write to a mmaped file */ -- shm_base = (char *)(((long)sbrk(0) + (shmsz - 1)) & ~(shmsz - 1)); -- if (shm_base == NULL) { -- tst_brkm(TBROK, cleanup, "sbrk failed: %s", strerror(errno)); -- } - offset = 4096; - count = bufsize; - if ((fd = open(filename, O_DIRECT | O_RDWR)) < 0) { - tst_brkm(TBROK, cleanup, "can't open %s: %s", - filename, strerror(errno)); - } -- shm_base = mmap(shm_base, 0x100000, PROT_READ | PROT_WRITE, -- MAP_SHARED | MAP_FIXED, fd, 0); -+ shm_base = mmap(0, 0x100000, PROT_READ | PROT_WRITE, -+ MAP_SHARED, fd, 0); - if (shm_base == (caddr_t) - 1) { - tst_brkm(TBROK, cleanup, "can't mmap file: %s", - strerror(errno)); --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch b/poky/meta/recipes-extended/ltp/ltp/0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch deleted file mode 100644 index aecbc80e9..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 4ac747c1f7ff8e2ec2567d6672822e95a9b56e55 Mon Sep 17 00:00:00 2001 -From: "Hongzhi.Song" <hongzhi.song@windriver.com> -Date: Mon, 15 Jul 2019 03:39:06 -0400 -Subject: [PATCH] getrlimit03: adjust a bit of code to compatiable with mips32 - -Error info: -getrlimit03.c:104: FAIL: __NR_prlimit64(0) had rlim_cur = -ffffffffffffffff but __NR_getrlimit(0) had rlim_cur = 7fffffff - -According to kernel code: [arch/mips/include/uapi/asm/resource.h] -RLIM_INFINITY is set to 0x7fffffffUL instead of ULONG_MAX on mips32. - - /* - * SuS says limits have to be unsigned. - * Which makes a ton more sense anyway, - * but we keep the old value on MIPS32, - * for compatibility: - */ - #ifndef __mips64 - # define RLIM_INFINITY 0x7fffffffUL - #endif - -Adding conditional statement about mips to fix this. - -Signed-off-by: Jan Stancek <jstancek@redhat.com> -Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> - -Upstream-Status: Backport -[https://github.com/linux-test-project/ltp/commit/7a3bca63cd7f059d490b6274f0fdf3247be93fde] - -Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> ---- - testcases/kernel/syscalls/getrlimit/getrlimit03.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/testcases/kernel/syscalls/getrlimit/getrlimit03.c b/testcases/kernel/syscalls/getrlimit/getrlimit03.c -index e4d56c4..319bc49 100644 ---- a/testcases/kernel/syscalls/getrlimit/getrlimit03.c -+++ b/testcases/kernel/syscalls/getrlimit/getrlimit03.c -@@ -26,6 +26,7 @@ - - #include "tst_test.h" - #include "lapi/syscalls.h" -+#include "lapi/abisize.h" - - /** - * Linux provides an "old" getrlimit syscall handler that uses signed long, -@@ -61,7 +62,12 @@ struct rlimit_ulong { - unsigned long rlim_cur; - unsigned long rlim_max; - }; --const unsigned long RLIM_INFINITY_UL = ULONG_MAX; -+ -+#if defined(__mips__) && defined(TST_ABI32) -+ const unsigned long RLIM_INFINITY_UL = 0x7fffffffUL; -+#else -+ const unsigned long RLIM_INFINITY_UL = ULONG_MAX; -+#endif - - static int getrlimit_ulong(int resource, struct rlimit_ulong *rlim) - { --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp_20190517.bb b/poky/meta/recipes-extended/ltp/ltp_20200120.bb index 47aa9675d..deac3917d 100644 --- a/poky/meta/recipes-extended/ltp/ltp_20190517.bb +++ b/poky/meta/recipes-extended/ltp/ltp_20200120.bb @@ -12,12 +12,12 @@ LIC_FILES_CHKSUM = "\ 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 " +EXTRA_OECONF_append_libc-musl = " LIBS=-lfts " # since ltp contains x86-64 assembler which uses the frame-pointer register, # set -fomit-frame-pointer x86-64 to handle cases where optimisation @@ -27,30 +27,16 @@ CFLAGS_append_x86-64 = " -fomit-frame-pointer" CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__" CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" -SRCREV = "ac33ef87f0b9dc56533026435be3ea8c67ce86d2" +SRCREV = "4079aaf264d0e9ead042b59d1c5f4e643620d0d5" SRC_URI = "git://github.com/linux-test-project/ltp.git \ file://0001-build-Add-option-to-select-libc-implementation.patch \ - file://0002-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \ file://0003-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch \ file://0004-guard-mallocopt-with-__GLIBC__.patch \ - file://0006-rt_tgsigqueueinfo-disable-test-on-musl.patch \ file://0007-Fix-test_proc_kill-hanging.patch \ file://0008-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \ - file://0009-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch \ - file://0010-shmctl01-don-t-use-hardcoded-index-0-for-SHM_STAT-te.patch \ - file://0011-direct_io-diotest4-drop-MAP_FIXED.patch \ - file://0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch \ - file://0001-Add-configure-time-check-for-getdents-getdents64-API.patch \ - file://0002-check-for-RES_USE_INET6-during-configure.patch \ - file://0001-syscalls-tgkill03-wait-for-defunct-tid-to-get-detach.patch \ - file://0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch \ - file://0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch \ - file://0001-testcases-use-python3-everywhere-to-run-python-scrip.patch \ - file://0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch \ - file://0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch \ - file://0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch \ - file://0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch \ + file://0001-Add-more-musl-exclusions.patch \ + file://0001-syscalls-Check-for-time64-unsafe-syscalls-before-usi.patch \ " S = "${WORKDIR}/git" @@ -59,8 +45,8 @@ inherit autotools-brokensep TARGET_CC_ARCH += "${LDFLAGS}" -export prefix = "/opt/ltp" -export exec_prefix = "/opt/ltp" +export prefix = "/opt/${PN}" +export exec_prefix = "/opt/${PN}" PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl," EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4" @@ -69,7 +55,7 @@ EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite --w EXTRA_OECONF += " --without-tirpc " do_install(){ - install -d ${D}/opt/ltp/ + install -d ${D}${prefix}/ oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install # fixup not deploy STPfailure_report.pl to avoid confusing about it fails to run @@ -78,15 +64,19 @@ do_install(){ # 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 + rm -rf ${D}${prefix}/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 + # Copy POSIX test suite into ${D}${prefix}/testcases by manual + cp -r testcases/open_posix_testsuite ${D}${prefix}/testcases + + # Makefile were configured in the build system + find ${D}${prefix} -name Makefile | xargs -n 1 sed -i \ + -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \ + -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \ + -e 's@[^ ]*--sysroot=[^ "]*@@g' } RDEPENDS_${PN} = "\ - acl \ - at \ attr \ bash \ cpio \ @@ -111,10 +101,10 @@ RDEPENDS_${PN} = "\ 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" +FILES_${PN} += "${prefix}/* ${prefix}/runtest/* ${prefix}/scenario_groups/* ${prefix}/testcases/bin/* ${prefix}/testcases/bin/*/bin/* ${prefix}/testscripts/* ${prefix}/testcases/open_posix_testsuite/* ${prefix}/testcases/open_posix_testsuite/conformance/* ${prefix}/testcases/open_posix_testsuite/Documentation/* ${prefix}/testcases/open_posix_testsuite/functional/* ${prefix}/testcases/open_posix_testsuite/include/* ${prefix}/testcases/open_posix_testsuite/scripts/* ${prefix}/testcases/open_posix_testsuite/stress/* ${prefix}/testcases/open_posix_testsuite/tools/* ${prefix}/testcases/data/nm01/lib.a ${prefix}/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" +INHIBIT_PACKAGE_STRIP_FILES = "${prefix}/testcases/bin/nm01 ${prefix}/testcases/bin/ldd01" INSANE_SKIP_${PN} += "already-stripped staticdev" # Avoid file dependency scans, as LTP checks for things that may or may not |