diff options
Diffstat (limited to 'meta/recipes-extended/ltp')
-rw-r--r-- | meta/recipes-extended/ltp/ltp/0001-Add-more-musl-exclusions.patch | 32 | ||||
-rw-r--r-- | meta/recipes-extended/ltp/ltp/0001-Remove-OOM-tests-from-runtest-mm.patch | 12 | ||||
-rw-r--r-- | meta/recipes-extended/ltp/ltp/0001-build-Add-option-to-select-libc-implementation.patch | 81 | ||||
-rw-r--r-- | meta/recipes-extended/ltp/ltp/0001-scenario_groups-default-remove-connectors.patch | 34 | ||||
-rw-r--r-- | meta/recipes-extended/ltp/ltp/0007-Fix-test_proc_kill-hanging.patch | 32 | ||||
-rw-r--r-- | meta/recipes-extended/ltp/ltp/determinism.patch | 43 | ||||
-rw-r--r-- | meta/recipes-extended/ltp/ltp_20240129.bb (renamed from meta/recipes-extended/ltp/ltp_20210121.bb) | 97 |
7 files changed, 96 insertions, 235 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 @@ | |||
1 | From ad8e73306cb8293f7d32841e1599fd9048801f1f Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Fri, 20 Dec 2019 13:06:05 +0100 | ||
4 | Subject: [PATCH] Add more musl exclusions | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-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 ] | ||
10 | Signed-off-by: Petr Vorel <petr.vorel@gmail.com> | ||
11 | --- | ||
12 | testcases/kernel/syscalls/timer_create/Makefile | 4 ++++ | ||
13 | 1 file changed, 4 insertions(+) | ||
14 | |||
15 | diff --git a/testcases/kernel/syscalls/timer_create/Makefile b/testcases/kernel/syscalls/timer_create/Makefile | ||
16 | index 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 | -- | ||
31 | 2.26.2 | ||
32 | |||
diff --git a/meta/recipes-extended/ltp/ltp/0001-Remove-OOM-tests-from-runtest-mm.patch b/meta/recipes-extended/ltp/ltp/0001-Remove-OOM-tests-from-runtest-mm.patch index e51950f153..cc98079651 100644 --- a/meta/recipes-extended/ltp/ltp/0001-Remove-OOM-tests-from-runtest-mm.patch +++ b/meta/recipes-extended/ltp/ltp/0001-Remove-OOM-tests-from-runtest-mm.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 93772c511d954d755cc9128c58ed8968a5af541b Mon Sep 17 00:00:00 2001 | 1 | From e87c2ad1e16cdbd62ba71b2ace3270503decaa56 Mon Sep 17 00:00:00 2001 |
2 | From: "Mingde (Matthew) Zeng" <matthewzmd@gmail.com> | 2 | From: "Mingde (Matthew) Zeng" <matthewzmd@gmail.com> |
3 | Date: Wed, 29 Jul 2020 08:47:09 -0400 | 3 | Date: Wed, 29 Jul 2020 08:47:09 -0400 |
4 | Subject: [PATCH] Remove OOM tests from runtest/mm | 4 | Subject: [PATCH] Remove OOM tests from runtest/mm |
@@ -7,16 +7,17 @@ Disable OOM tests, as they might cause oeqa ssh connection lost | |||
7 | 7 | ||
8 | Upstream-Status: Inappropriate [oe-core specific] | 8 | Upstream-Status: Inappropriate [oe-core specific] |
9 | Signed-off-by: Mingde (Matthew) Zeng <matthew.zeng@windriver.com> | 9 | Signed-off-by: Mingde (Matthew) Zeng <matthew.zeng@windriver.com> |
10 | 10 | [ pvorel: rebased for 20210927 ] | |
11 | Signed-off-by: Petr Vorel <petr.vorel@gmail.com> | ||
11 | --- | 12 | --- |
12 | runtest/mm | 6 ------ | 13 | runtest/mm | 6 ------ |
13 | 1 file changed, 6 deletions(-) | 14 | 1 file changed, 6 deletions(-) |
14 | 15 | ||
15 | diff --git a/runtest/mm b/runtest/mm | 16 | diff --git a/runtest/mm b/runtest/mm |
16 | index 481d39691..cf207d10e 100644 | 17 | index d859b331c..3c2962f44 100644 |
17 | --- a/runtest/mm | 18 | --- a/runtest/mm |
18 | +++ b/runtest/mm | 19 | +++ b/runtest/mm |
19 | @@ -74,12 +74,6 @@ ksm06_2 ksm06 -n 10000 | 20 | @@ -74,12 +74,6 @@ ksm07 ksm07 |
20 | 21 | ||
21 | cpuset01 cpuset01 | 22 | cpuset01 cpuset01 |
22 | 23 | ||
@@ -29,3 +30,6 @@ index 481d39691..cf207d10e 100644 | |||
29 | swapping01 swapping01 -i 5 | 30 | swapping01 swapping01 -i 5 |
30 | 31 | ||
31 | thp01 thp01 -I 120 | 32 | thp01 thp01 -I 120 |
33 | -- | ||
34 | 2.43.0 | ||
35 | |||
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 @@ | |||
1 | From 74958c3e341de713b596c8cfd35b2391d6c7bc09 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 7 Jan 2016 18:19:03 +0000 | ||
4 | Subject: [PATCH] build: Add option to select libc implementation | ||
5 | |||
6 | There are more than glibc for C library implementation available on | ||
7 | linux now a days, uclibc cloaked like glibc but musl e.g. is very | ||
8 | different and does not implement all GNU extensions. | ||
9 | |||
10 | Disable tests specifically not building _yet_ on musl based systems | ||
11 | |||
12 | Upstream-Status: Pending (pvorel: this is not going to be fixed, instead | ||
13 | each test needs to be fixed) | ||
14 | |||
15 | rt_tgsigqueueinfo fails with: | ||
16 | rt_tgsigqueueinfo01.c: In function 'sigusr1_handler': | ||
17 | rt_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 | |||
22 | Signed-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, | ||
25 | rt_sigsuspend, sbrk_mutex, setdomainname, sethostname, sigsuspend, | ||
26 | testpi-3, testpi-5, testpi-6, ustat; move rt_tgsigqueueinfo | ||
27 | from 0006-rt_tgsigqueueinfo-disable-test-on-musl.patch ] | ||
28 | Signed-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 | |||
35 | diff --git a/Makefile b/Makefile | ||
36 | index 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 | ||
51 | diff --git a/testcases/kernel/sched/Makefile b/testcases/kernel/sched/Makefile | ||
52 | index 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 | ||
64 | diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile | ||
65 | index 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 | -- | ||
80 | 2.26.2 | ||
81 | |||
diff --git a/meta/recipes-extended/ltp/ltp/0001-scenario_groups-default-remove-connectors.patch b/meta/recipes-extended/ltp/ltp/0001-scenario_groups-default-remove-connectors.patch new file mode 100644 index 0000000000..4a50d1ae38 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-scenario_groups-default-remove-connectors.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 14c710cae38aa96bd8d681e891b6a1d691f99988 Mon Sep 17 00:00:00 2001 | ||
2 | From: Xiangyu Chen <xiangyu.chen@windriver.com> | ||
3 | Date: Thu, 14 Mar 2024 09:47:10 +0800 | ||
4 | Subject: [PATCH] scenario_groups/default: remove connectors | ||
5 | |||
6 | runtest/connectors was removed in 9b642d89c, thus update scenario_groups/default. | ||
7 | |||
8 | Fixes: 9b642d89c ("runtest: Merge runtest/connectors to kernel_misc") | ||
9 | Closes: https://github.com/linux-test-project/ltp/pull/1144 | ||
10 | |||
11 | Upstream-Status: Backport from | ||
12 | [https://github.com/linux-test-project/ltp/commit/14c710ca] | ||
13 | |||
14 | Reviewed-by: Petr Vorel <pvorel@suse.cz> | ||
15 | Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> | ||
16 | --- | ||
17 | scenario_groups/default | 1 - | ||
18 | 1 file changed, 1 deletion(-) | ||
19 | |||
20 | diff --git a/scenario_groups/default b/scenario_groups/default | ||
21 | index f17b2061a..ec77d8fb8 100644 | ||
22 | --- a/scenario_groups/default | ||
23 | +++ b/scenario_groups/default | ||
24 | @@ -16,7 +16,6 @@ controllers | ||
25 | filecaps | ||
26 | cap_bounds | ||
27 | fcntl-locktests | ||
28 | -connectors | ||
29 | power_management_tests | ||
30 | hugetlb | ||
31 | commands | ||
32 | -- | ||
33 | 2.34.1 | ||
34 | |||
diff --git a/meta/recipes-extended/ltp/ltp/0007-Fix-test_proc_kill-hanging.patch b/meta/recipes-extended/ltp/ltp/0007-Fix-test_proc_kill-hanging.patch deleted file mode 100644 index 0e7264574f..0000000000 --- a/meta/recipes-extended/ltp/ltp/0007-Fix-test_proc_kill-hanging.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From f4fafbdffae3a63c81f65cef98c72dda26283e06 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dengke Du <dengke.du@windriver.com> | ||
3 | Date: Wed, 8 Feb 2017 16:17:17 +0800 | ||
4 | Subject: [PATCH] Fix test_proc_kill hanging | ||
5 | |||
6 | Sometimes the signal is delivered to memcg_process before the framework took | ||
7 | into consideration its pid entered in the tasks. Fixed by delaying the signal | ||
8 | send command. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: George Nita <george.nita@enea.com> | ||
13 | Signed-off-by: Dengke Du <dengke.du@windriver.com> | ||
14 | --- | ||
15 | testcases/kernel/controllers/memcg/functional/memcg_lib.sh | 1 + | ||
16 | 1 file changed, 1 insertion(+) | ||
17 | |||
18 | diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh | ||
19 | index aadaae4..deea5d6 100755 | ||
20 | --- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh | ||
21 | +++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh | ||
22 | @@ -291,6 +291,7 @@ test_proc_kill() | ||
23 | pid=$! | ||
24 | TST_CHECKPOINT_WAIT 0 | ||
25 | echo $pid > tasks | ||
26 | + sleep 1 | ||
27 | |||
28 | signal_memcg_process $pid $3 | ||
29 | |||
30 | -- | ||
31 | 2.7.4 | ||
32 | |||
diff --git a/meta/recipes-extended/ltp/ltp/determinism.patch b/meta/recipes-extended/ltp/ltp/determinism.patch deleted file mode 100644 index 76d40721b8..0000000000 --- a/meta/recipes-extended/ltp/ltp/determinism.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | open_posix_testsuite/generate-makefiles.sh: Fix determinism issue | ||
2 | |||
3 | Currently the list of tests is generated by the order of the files found | ||
4 | within the directories. This results in differences in the run.sh and | ||
5 | Makefiles. Within Yocto Project this results in differing target | ||
6 | test packages. The fix is simple, just sort the output from locate-test. | ||
7 | |||
8 | mk/lib.mk: Sort wildcard expansion for determinism | ||
9 | |||
10 | The order of the objects linked into libltp.a varies depending on the | ||
11 | order of the files found on disk. This results in most ltp binaries | ||
12 | differing depending on that order too. | ||
13 | |||
14 | Sort the wildcard expansion of *.c which leads to reproducible binaries. | ||
15 | |||
16 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
17 | Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2021-March/021272.html http://lists.linux.it/pipermail/ltp/2021-March/021273.html] | ||
18 | |||
19 | Index: git/testcases/open_posix_testsuite/scripts/generate-makefiles.sh | ||
20 | =================================================================== | ||
21 | --- git.orig/testcases/open_posix_testsuite/scripts/generate-makefiles.sh | ||
22 | +++ git/testcases/open_posix_testsuite/scripts/generate-makefiles.sh | ||
23 | @@ -24,7 +24,7 @@ generate_locate_test_makefile() { | ||
24 | |||
25 | echo "Generating $maketype Makefiles" | ||
26 | |||
27 | - locate-test --$maketype | sed -e 's,^./,,g' > make-gen.$maketype | ||
28 | + locate-test --$maketype | sed -e 's,^./,,g' | sort > make-gen.$maketype | ||
29 | |||
30 | generate_makefiles make-gen.$maketype $* | ||
31 | |||
32 | Index: git/include/mk/lib.mk | ||
33 | =================================================================== | ||
34 | --- git.orig/include/mk/lib.mk | ||
35 | +++ git/include/mk/lib.mk | ||
36 | @@ -50,6 +50,7 @@ endif | ||
37 | MAKE_TARGETS += $(LIB) | ||
38 | |||
39 | LIBSRCS ?= $(wildcard $(abs_srcdir)/*.c) | ||
40 | +LIBSRCS := $(sort $(LIBSRCS)) | ||
41 | LIBSRCS := $(abspath $(LIBSRCS)) | ||
42 | LIBSRCS := $(subst $(abs_srcdir)/,,$(wildcard $(LIBSRCS))) | ||
43 | LIBSRCS := $(filter-out $(FILTER_OUT_LIBSRCS),$(LIBSRCS)) | ||
diff --git a/meta/recipes-extended/ltp/ltp_20210121.bb b/meta/recipes-extended/ltp/ltp_20240129.bb index 593f07087c..3e896957d1 100644 --- a/meta/recipes-extended/ltp/ltp_20210121.bb +++ b/meta/recipes-extended/ltp/ltp_20240129.bb | |||
@@ -2,49 +2,53 @@ SUMMARY = "Linux Test Project" | |||
2 | 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." | 2 | 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." |
3 | HOMEPAGE = "https://linux-test-project.github.io/" | 3 | HOMEPAGE = "https://linux-test-project.github.io/" |
4 | SECTION = "console/utils" | 4 | SECTION = "console/utils" |
5 | LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause" | 5 | LICENSE = "GPL-2.0-only & GPL-2.0-or-later & LGPL-2.0-or-later & LGPL-2.1-or-later & BSD-2-Clause" |
6 | LIC_FILES_CHKSUM = "\ | 6 | LIC_FILES_CHKSUM = "\ |
7 | file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | 7 | file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
8 | file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ | ||
9 | file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \ | ||
10 | file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ | ||
11 | file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ | ||
12 | file://testcases/open_posix_testsuite/COPYING;md5=48b1c5ec633e3e30ec2cf884ae699947 \ | 8 | file://testcases/open_posix_testsuite/COPYING;md5=48b1c5ec633e3e30ec2cf884ae699947 \ |
13 | file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ | 9 | file://testcases/network/can/filter-tests/COPYING;md5=5b155ea7d7f86eae8e8832955d8b70bc \ |
14 | file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
15 | " | 10 | " |
16 | 11 | ||
17 | DEPENDS = "attr libaio libcap acl openssl zip-native" | 12 | DEPENDS = "attr libaio libcap acl openssl zip-native" |
18 | DEPENDS_append_libc-musl = " fts " | 13 | DEPENDS:append:libc-musl = " fts " |
19 | EXTRA_OEMAKE_append_libc-musl = " LIBC=musl " | 14 | EXTRA_OEMAKE:append:libc-musl = " LIBC=musl " |
20 | EXTRA_OECONF_append_libc-musl = " LIBS=-lfts " | 15 | EXTRA_OECONF:append:libc-musl = " LIBS=-lfts " |
21 | 16 | ||
22 | # since ltp contains x86-64 assembler which uses the frame-pointer register, | 17 | # since ltp contains x86-64 assembler which uses the frame-pointer register, |
23 | # set -fomit-frame-pointer x86-64 to handle cases where optimisation | 18 | # set -fomit-frame-pointer x86-64 to handle cases where optimisation |
24 | # is set to -O0 or frame pointers have been enabled by -fno-omit-frame-pointer | 19 | # is set to -O0 or frame pointers have been enabled by -fno-omit-frame-pointer |
25 | # earlier in CFLAGS, etc. | 20 | # earlier in CFLAGS, etc. |
26 | CFLAGS_append_x86-64 = " -fomit-frame-pointer" | 21 | CFLAGS:append:x86-64 = " -fomit-frame-pointer" |
22 | TUNE_CCARGS:remove:x86 = "-mfpmath=sse" | ||
23 | TUNE_CCARGS:remove:x86-64 = "-mfpmath=sse" | ||
27 | 24 | ||
28 | CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__" | 25 | CFLAGS:append:powerpc64 = " -D__SANE_USERSPACE_TYPES__" |
29 | CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" | 26 | CFLAGS:append:mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" |
30 | SRCREV = "4d005621edd109d119627eb9210b224a63bf22cb" | 27 | SRCREV = "68737d20556d37364c95776044b1119c0912a36a" |
31 | 28 | ||
32 | # remove at next version upgrade or when output changes | 29 | SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=https \ |
33 | PR = "r1" | ||
34 | HASHEQUIV_HASH_VERSION .= ".1" | ||
35 | |||
36 | SRC_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 \ | ||
39 | file://0001-Add-more-musl-exclusions.patch \ | ||
40 | file://0001-Remove-OOM-tests-from-runtest-mm.patch \ | 30 | file://0001-Remove-OOM-tests-from-runtest-mm.patch \ |
41 | file://determinism.patch \ | 31 | file://0001-scenario_groups-default-remove-connectors.patch \ |
42 | " | 32 | " |
43 | 33 | ||
44 | S = "${WORKDIR}/git" | 34 | S = "${WORKDIR}/git" |
45 | 35 | ||
46 | inherit autotools-brokensep pkgconfig | 36 | inherit autotools-brokensep pkgconfig |
47 | 37 | ||
38 | # Version 20220527 added KVM test infrastructure which currently fails to build with gold due to | ||
39 | # SORT_NONE in linker script which isn't supported by gold: | ||
40 | # https://sourceware.org/bugzilla/show_bug.cgi?id=18097 | ||
41 | # https://github.com/linux-test-project/ltp/commit/3fce2064b54843218d085aae326c8f7ecf3a8c41#diff-39268f0855c634ca48c8993fcd2c95b12a65b79e8d9fa5ccd6b0f5a8785c0dd6R36 | ||
42 | LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd', '', d)}" | ||
43 | LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -fuse-ld=bfd', '', d)}" | ||
44 | |||
45 | # After 0002-kvm-use-LD-instead-of-hardcoding-ld.patch | ||
46 | # https://github.com/linux-test-project/ltp/commit/f94e0ef3b7280f886384703ef9019aaf2f2dfebb | ||
47 | # it fails with gold also a bit later when trying to use *-payload.bin | ||
48 | # http://errors.yoctoproject.org/Errors/Details/663094/ | ||
49 | # work around this by forcing .bfd linked in LD when ld-is-gold is in DISTRO_FEATURES | ||
50 | KVM_LD = "${@bb.utils.contains_any('DISTRO_FEATURES', 'ld-is-gold ld-is-lld', '${HOST_PREFIX}ld.bfd${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}', '${LD}', d)}" | ||
51 | |||
48 | TARGET_CC_ARCH += "${LDFLAGS}" | 52 | TARGET_CC_ARCH += "${LDFLAGS}" |
49 | 53 | ||
50 | export prefix = "/opt/${PN}" | 54 | export prefix = "/opt/${PN}" |
@@ -56,17 +60,13 @@ EXTRA_OECONF = " --with-realtime-testsuite --with-open-posix-testsuite " | |||
56 | # ltp network/rpc test cases ftbfs when libtirpc is found | 60 | # ltp network/rpc test cases ftbfs when libtirpc is found |
57 | EXTRA_OECONF += " --without-tirpc " | 61 | EXTRA_OECONF += " --without-tirpc " |
58 | 62 | ||
59 | do_compile_prepend() { | 63 | do_compile() { |
60 | # Reported at http://lists.linux.it/pipermail/ltp/2021-March/021274.html | 64 | oe_runmake HOSTCC="${CC_FOR_BUILD}" HOST_CFLAGS="${CFLAGS_FOR_BUILD}" HOST_LDFLAGS="${LDFLAGS_FOR_BUILD}" KVM_LD="${KVM_LD}" |
61 | # Avoid a race over construction of libswapon.o which is built by swapon and swapoff | ||
62 | # but the object differs depending upon which one built it | ||
63 | # ("../swapon/libswapon.c" vs "libswapon.c" references) | ||
64 | make -C ${B}/testcases/kernel/syscalls/swapon/ | ||
65 | } | 65 | } |
66 | 66 | ||
67 | do_install(){ | 67 | do_install(){ |
68 | install -d ${D}${prefix}/ | 68 | install -d ${D}${prefix}/ |
69 | oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install | 69 | oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install include-install |
70 | 70 | ||
71 | # fixup not deploy STPfailure_report.pl to avoid confusing about it fails to run | 71 | # fixup not deploy STPfailure_report.pl to avoid confusing about it fails to run |
72 | # as it lacks dependency on some perl moudle such as LWP::Simple | 72 | # as it lacks dependency on some perl moudle such as LWP::Simple |
@@ -76,21 +76,12 @@ do_install(){ | |||
76 | # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible | 76 | # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible |
77 | rm -rf ${D}${prefix}/bin/STPfailure_report.pl | 77 | rm -rf ${D}${prefix}/bin/STPfailure_report.pl |
78 | 78 | ||
79 | # Copy POSIX test suite into ${D}${prefix}/testcases by manual | ||
80 | cp -r testcases/open_posix_testsuite ${D}${prefix}/testcases | ||
81 | |||
82 | # Makefile were configured in the build system | ||
83 | find ${D}${prefix} -name Makefile | xargs -n 1 sed -i \ | ||
84 | -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \ | ||
85 | -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \ | ||
86 | -e 's@[^ ]*--sysroot=[^ "]*@@g' | ||
87 | |||
88 | # The controllers memcg_stree test seems to cause us hangs and takes 900s | 79 | # The controllers memcg_stree test seems to cause us hangs and takes 900s |
89 | # (maybe we expect more regular output?), anyhow, skip it | 80 | # (maybe we expect more regular output?), anyhow, skip it |
90 | sed -e '/^memcg_stress/d' -i ${D}${prefix}/runtest/controllers | 81 | sed -e '/^memcg_stress/d' -i ${D}${prefix}/runtest/controllers |
91 | } | 82 | } |
92 | 83 | ||
93 | RDEPENDS_${PN} = "\ | 84 | RDEPENDS:${PN} = "\ |
94 | attr \ | 85 | attr \ |
95 | bash \ | 86 | bash \ |
96 | bc \ | 87 | bc \ |
@@ -102,6 +93,7 @@ RDEPENDS_${PN} = "\ | |||
102 | e2fsprogs-mke2fs \ | 93 | e2fsprogs-mke2fs \ |
103 | expect \ | 94 | expect \ |
104 | file \ | 95 | file \ |
96 | findutils \ | ||
105 | gawk \ | 97 | gawk \ |
106 | gdb \ | 98 | gdb \ |
107 | gzip \ | 99 | gzip \ |
@@ -120,14 +112,33 @@ RDEPENDS_${PN} = "\ | |||
120 | tar \ | 112 | tar \ |
121 | " | 113 | " |
122 | 114 | ||
123 | 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" | 115 | RRECOMMENDS:${PN} += "kernel-module-loop" |
116 | |||
117 | 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" | ||
124 | 118 | ||
125 | # Avoid stripping some generated binaries otherwise some of the ltp tests such as ldd01 & nm01 fail | 119 | # Avoid stripping some generated binaries otherwise some of the ltp tests such as ldd01 & nm01 fail |
126 | INHIBIT_PACKAGE_STRIP_FILES = "${prefix}/testcases/bin/nm01 ${prefix}/testcases/bin/ldd01" | 120 | INHIBIT_PACKAGE_STRIP_FILES = "${prefix}/testcases/bin/nm01 ${prefix}/testcases/bin/ldd01" |
127 | INSANE_SKIP_${PN} += "already-stripped staticdev" | 121 | INSANE_SKIP:${PN} += "already-stripped staticdev" |
122 | |||
123 | remove_broken_musl_sources() { | ||
124 | [ "${TCLIBC}" = "musl" ] || return 0 | ||
125 | |||
126 | cd ${S} | ||
127 | echo "WARNING: remove unsupported tests (until they're fixed)" | ||
128 | |||
129 | # sync with upstream | ||
130 | # https://github.com/linux-test-project/ltp/blob/master/ci/alpine.sh#L33 | ||
131 | rm -rfv \ | ||
132 | testcases/kernel/syscalls/fmtmsg/fmtmsg01.c \ | ||
133 | testcases/kernel/syscalls/getcontext/getcontext01.c \ | ||
134 | testcases/kernel/syscalls/rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c \ | ||
135 | testcases/kernel/syscalls/timer_create/timer_create01.c \ | ||
136 | testcases/kernel/syscalls/timer_create/timer_create03.c | ||
137 | } | ||
138 | do_patch[postfuncs] += "remove_broken_musl_sources" | ||
128 | 139 | ||
129 | # Avoid file dependency scans, as LTP checks for things that may or may not | 140 | # Avoid file dependency scans, as LTP checks for things that may or may not |
130 | # exist on the running system. For instance it has specific checks for | 141 | # exist on the running system. For instance it has specific checks for |
131 | # csh and ksh which are not typically part of OpenEmbedded systems (but | 142 | # csh and ksh which are not typically part of OpenEmbedded systems (but |
132 | # can be added via additional layers.) | 143 | # can be added via additional layers.) |
133 | SKIP_FILEDEPS_${PN} = '1' | 144 | SKIP_FILEDEPS:${PN} = '1' |