summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorPetr Vorel <petr.vorel@gmail.com>2021-04-28 21:17:36 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-01 22:48:17 +0100
commitefbef1daa3e985a54df7f0a0867bb509f34749f0 (patch)
treeca6ab3a1d14b818b0109c906c10f5ae1269c29cb /meta
parent3f657a908ef95247c91da48e98ed200754177ef7 (diff)
downloadpoky-efbef1daa3e985a54df7f0a0867bb509f34749f0.tar.gz
ltp: Replace musl patches with do_patch[postfuncs]
MUSL related build fixes are not going to be upstreamed. They just not compile broken files, thus replace them with upstream solution for CI: just deleting files for musl (easier to maintain). (From OE-Core rev: c781677fd5f4e15bde17114468d9f66ba5dc38a2) Signed-off-by: Petr Vorel <petr.vorel@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-Add-more-musl-exclusions.patch32
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-build-Add-option-to-select-libc-implementation.patch81
-rw-r--r--meta/recipes-extended/ltp/ltp_20210121.bb24
3 files changed, 21 insertions, 116 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-Add-more-musl-exclusions.patch b/meta/recipes-extended/ltp/ltp/0001-Add-more-musl-exclusions.patch
deleted file mode 100644
index f2fc8ee958..0000000000
--- a/meta/recipes-extended/ltp/ltp/0001-Add-more-musl-exclusions.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From ad8e73306cb8293f7d32841e1599fd9048801f1f Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 20 Dec 2019 13:06:05 +0100
4Subject: [PATCH] Add more musl exclusions
5
6Upstream-Status: Pending
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8[ pvorel: rebase for 20200515: enable accept4_01 ]
9[ pvorel: rebase for 20200120: enable fanotify13, fanotify15, setxattr03 ]
10Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
11---
12 testcases/kernel/syscalls/timer_create/Makefile | 4 ++++
13 1 file changed, 4 insertions(+)
14
15diff --git a/testcases/kernel/syscalls/timer_create/Makefile b/testcases/kernel/syscalls/timer_create/Makefile
16index ada241fe1..d454b01e7 100644
17--- a/testcases/kernel/syscalls/timer_create/Makefile
18+++ b/testcases/kernel/syscalls/timer_create/Makefile
19@@ -5,6 +5,10 @@ top_srcdir ?= ../../../..
20
21 include $(top_srcdir)/include/mk/testcases.mk
22
23+ifeq ($(LIBC),musl)
24+FILTER_OUT_MAKE_TARGETS := timer_create01 timer_create03
25+endif
26+
27 CPPFLAGS += -D_GNU_SOURCE -I$(abs_srcdir)/../include
28
29 LDLIBS += -lpthread -lrt
30--
312.26.2
32
diff --git a/meta/recipes-extended/ltp/ltp/0001-build-Add-option-to-select-libc-implementation.patch b/meta/recipes-extended/ltp/ltp/0001-build-Add-option-to-select-libc-implementation.patch
deleted file mode 100644
index 29b2bf7e41..0000000000
--- a/meta/recipes-extended/ltp/ltp/0001-build-Add-option-to-select-libc-implementation.patch
+++ /dev/null
@@ -1,81 +0,0 @@
1From 74958c3e341de713b596c8cfd35b2391d6c7bc09 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 7 Jan 2016 18:19:03 +0000
4Subject: [PATCH] build: Add option to select libc implementation
5
6There are more than glibc for C library implementation available on
7linux now a days, uclibc cloaked like glibc but musl e.g. is very
8different and does not implement all GNU extensions.
9
10Disable tests specifically not building _yet_ on musl based systems
11
12Upstream-Status: Pending (pvorel: this is not going to be fixed, instead
13each test needs to be fixed)
14
15rt_tgsigqueueinfo fails with:
16rt_tgsigqueueinfo01.c: In function 'sigusr1_handler':
17rt_tgsigqueueinfo01.c:42:22: error: 'siginfo_t' {aka 'struct <anonymous>'} has no member named '_sifields'; did you mean '__si_fields'?
18 42 | sigval_rcv = uinfo->_sifields._rt.SI_SIGVAL.sival_ptr;
19 | ^~~~~~~~~
20 | __si_fields
21
22Signed-off-by: Khem Raj <raj.khem@gmail.com>
23[ pvorel: rebase for 20200515: enable pty, ioctl ]
24[ pvorel: rebase for 20200120: enable mallopt, profil, rpc016,
25rt_sigsuspend, sbrk_mutex, setdomainname, sethostname, sigsuspend,
26testpi-3, testpi-5, testpi-6, ustat; move rt_tgsigqueueinfo
27from 0006-rt_tgsigqueueinfo-disable-test-on-musl.patch ]
28Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
29---
30 Makefile | 5 +++++
31 testcases/kernel/sched/Makefile | 4 +++-
32 testcases/kernel/syscalls/Makefile | 4 ++++
33 3 files changed, 12 insertions(+), 1 deletion(-)
34
35diff --git a/Makefile b/Makefile
36index 768ca4606..e9d679a71 100644
37--- a/Makefile
38+++ b/Makefile
39@@ -41,6 +41,11 @@ vpath %.mk $(top_srcdir)/mk:$(top_srcdir)/mk/include
40 UCLINUX ?= 0
41 export UCLINUX
42
43+# System C library implementation (glibc,uclibc,musl etc.)
44+# default to glibc if not set
45+LIBC ?= glibc
46+export LIBC
47+
48 # CLEAN_TARGETS: Targets which exist solely in clean.
49 # COMMON_TARGETS: Targets which exist in all, clean, and install.
50 # INSTALL_TARGETS: Targets which exist in clean and install (contains
51diff --git a/testcases/kernel/sched/Makefile b/testcases/kernel/sched/Makefile
52index 6a57d79ee..74bb93370 100644
53--- a/testcases/kernel/sched/Makefile
54+++ b/testcases/kernel/sched/Makefile
55@@ -23,5 +23,7 @@
56 top_srcdir ?= ../../..
57
58 include $(top_srcdir)/include/mk/env_pre.mk
59-
60+ifeq ($(LIBC),musl)
61+ FILTER_OUT_DIRS += process_stress
62+endif
63 include $(top_srcdir)/include/mk/generic_trunk_target.mk
64diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile
65index c6dc8d9e7..aa50761ea 100644
66--- a/testcases/kernel/syscalls/Makefile
67+++ b/testcases/kernel/syscalls/Makefile
68@@ -15,6 +15,10 @@ FILTER_OUT_DIRS += capget capset chmod chown clone fork getcontext llseek \
69 mincore mprotect nftw profil remap_file_pages sbrk
70 endif
71
72+ifeq ($(LIBC),musl)
73+FILTER_OUT_DIRS += confstr fmtmsg getcontext rt_tgsigqueueinfo
74+endif
75+
76 ifeq ($(UCLIBC),1)
77 FILTER_OUT_DIRS += profil
78 endif
79--
802.26.2
81
diff --git a/meta/recipes-extended/ltp/ltp_20210121.bb b/meta/recipes-extended/ltp/ltp_20210121.bb
index d98c9fdc25..7c4b56b76c 100644
--- a/meta/recipes-extended/ltp/ltp_20210121.bb
+++ b/meta/recipes-extended/ltp/ltp_20210121.bb
@@ -34,9 +34,7 @@ PR = "r4"
34HASHEQUIV_HASH_VERSION .= ".4" 34HASHEQUIV_HASH_VERSION .= ".4"
35 35
36SRC_URI = "git://github.com/linux-test-project/ltp.git \ 36SRC_URI = "git://github.com/linux-test-project/ltp.git \
37 file://0001-build-Add-option-to-select-libc-implementation.patch \
38 file://0007-Fix-test_proc_kill-hanging.patch \ 37 file://0007-Fix-test_proc_kill-hanging.patch \
39 file://0001-Add-more-musl-exclusions.patch \
40 file://0001-Remove-OOM-tests-from-runtest-mm.patch \ 38 file://0001-Remove-OOM-tests-from-runtest-mm.patch \
41 file://determinism.patch \ 39 file://determinism.patch \
42 file://0001-open_posix_testsuite-generate-makefiles.sh-Avoid-inc.patch \ 40 file://0001-open_posix_testsuite-generate-makefiles.sh-Avoid-inc.patch \
@@ -78,7 +76,7 @@ do_install(){
78 find ${D}${prefix} -name Makefile | xargs -n 1 sed -i \ 76 find ${D}${prefix} -name Makefile | xargs -n 1 sed -i \
79 -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \ 77 -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \
80 -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \ 78 -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \
81 -e 's@[^ ]*--sysroot=[^ "]*@@g' 79 -e 's@[^ ]*--sysroot=[^ "]*@@g'
82 80
83 # The controllers memcg_stree test seems to cause us hangs and takes 900s 81 # The controllers memcg_stree test seems to cause us hangs and takes 900s
84 # (maybe we expect more regular output?), anyhow, skip it 82 # (maybe we expect more regular output?), anyhow, skip it
@@ -121,6 +119,26 @@ FILES_${PN} += "${prefix}/* ${prefix}/runtest/* ${prefix}/scenario_groups/* ${pr
121INHIBIT_PACKAGE_STRIP_FILES = "${prefix}/testcases/bin/nm01 ${prefix}/testcases/bin/ldd01" 119INHIBIT_PACKAGE_STRIP_FILES = "${prefix}/testcases/bin/nm01 ${prefix}/testcases/bin/ldd01"
122INSANE_SKIP_${PN} += "already-stripped staticdev" 120INSANE_SKIP_${PN} += "already-stripped staticdev"
123 121
122remove_broken_musl_sources() {
123 [ "${TCLIBC}" = "musl" ] || return 0
124
125 cd ${S}
126 echo "WARNING: remove unsupported tests (until they're fixed)"
127
128 # sync with upstream
129 # https://github.com/linux-test-project/ltp/blob/master/travis/alpine.sh#L33
130 rm -rfv \
131 testcases/kernel/sched/process_stress/process.c \
132 testcases/kernel/syscalls/confstr/confstr01.c \
133 testcases/kernel/syscalls/fmtmsg/fmtmsg01.c \
134 testcases/kernel/syscalls/getcontext/getcontext01.c \
135 testcases/kernel/syscalls/rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c \
136 testcases/kernel/syscalls/timer_create/timer_create01.c \
137 testcases/kernel/syscalls/timer_create/timer_create03.c \
138 utils/benchmark/ebizzy-0.3
139}
140do_patch[postfuncs] += "remove_broken_musl_sources"
141
124# Avoid file dependency scans, as LTP checks for things that may or may not 142# Avoid file dependency scans, as LTP checks for things that may or may not
125# exist on the running system. For instance it has specific checks for 143# exist on the running system. For instance it has specific checks for
126# csh and ksh which are not typically part of OpenEmbedded systems (but 144# csh and ksh which are not typically part of OpenEmbedded systems (but