diff options
Diffstat (limited to 'meta/recipes-extended/ltp')
11 files changed, 185 insertions, 377 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 @@ -From ad8e73306cb8293f7d32841e1599fd9048801f1f 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 20200515: enable accept4_01 ] -[ pvorel: rebase for 20200120: enable fanotify13, fanotify15, setxattr03 ] -Signed-off-by: Petr Vorel <petr.vorel@gmail.com> ---- - testcases/kernel/syscalls/timer_create/Makefile | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/testcases/kernel/syscalls/timer_create/Makefile b/testcases/kernel/syscalls/timer_create/Makefile -index ada241fe1..d454b01e7 100644 ---- a/testcases/kernel/syscalls/timer_create/Makefile -+++ b/testcases/kernel/syscalls/timer_create/Makefile -@@ -5,6 +5,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.26.2 - 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 new file mode 100644 index 0000000000..cc98079651 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-Remove-OOM-tests-from-runtest-mm.patch @@ -0,0 +1,35 @@ +From e87c2ad1e16cdbd62ba71b2ace3270503decaa56 Mon Sep 17 00:00:00 2001 +From: "Mingde (Matthew) Zeng" <matthewzmd@gmail.com> +Date: Wed, 29 Jul 2020 08:47:09 -0400 +Subject: [PATCH] Remove OOM tests from runtest/mm + +Disable OOM tests, as they might cause oeqa ssh connection lost + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Mingde (Matthew) Zeng <matthew.zeng@windriver.com> +[ pvorel: rebased for 20210927 ] +Signed-off-by: Petr Vorel <petr.vorel@gmail.com> +--- + runtest/mm | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/runtest/mm b/runtest/mm +index d859b331c..3c2962f44 100644 +--- a/runtest/mm ++++ b/runtest/mm +@@ -74,12 +74,6 @@ ksm07 ksm07 + + cpuset01 cpuset01 + +-oom01 oom01 +-oom02 oom02 +-oom03 oom03 +-oom04 oom04 +-oom05 oom05 +- + swapping01 swapping01 -i 5 + + thp01 thp01 -I 120 +-- +2.43.0 + 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 @@ -From 74958c3e341de713b596c8cfd35b2391d6c7bc09 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 - -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 -different and does not implement all GNU extensions. - -Disable tests specifically not building _yet_ on musl based systems - -Upstream-Status: Pending (pvorel: this is not going to be fixed, instead -each test needs to be fixed) - -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 20200515: enable pty, ioctl ] -[ 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> ---- - Makefile | 5 +++++ - testcases/kernel/sched/Makefile | 4 +++- - testcases/kernel/syscalls/Makefile | 4 ++++ - 3 files changed, 12 insertions(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 768ca4606..e9d679a71 100644 ---- a/Makefile -+++ b/Makefile -@@ -41,6 +41,11 @@ vpath %.mk $(top_srcdir)/mk:$(top_srcdir)/mk/include - UCLINUX ?= 0 - export UCLINUX - -+# System C library implementation (glibc,uclibc,musl etc.) -+# default to glibc if not set -+LIBC ?= glibc -+export LIBC -+ - # CLEAN_TARGETS: Targets which exist solely in clean. - # 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/sched/Makefile b/testcases/kernel/sched/Makefile -index 6a57d79ee..74bb93370 100644 ---- a/testcases/kernel/sched/Makefile -+++ b/testcases/kernel/sched/Makefile -@@ -23,5 +23,7 @@ - top_srcdir ?= ../../.. - - include $(top_srcdir)/include/mk/env_pre.mk -- -+ifeq ($(LIBC),musl) -+ FILTER_OUT_DIRS += process_stress -+endif - include $(top_srcdir)/include/mk/generic_trunk_target.mk -diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile -index c6dc8d9e7..aa50761ea 100644 ---- a/testcases/kernel/syscalls/Makefile -+++ b/testcases/kernel/syscalls/Makefile -@@ -15,6 +15,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 rt_tgsigqueueinfo -+endif -+ - ifeq ($(UCLIBC),1) - FILTER_OUT_DIRS += profil - endif --- -2.26.2 - diff --git a/meta/recipes-extended/ltp/ltp/0001-ptrace01-Fix-missing-format-string.patch b/meta/recipes-extended/ltp/ltp/0001-ptrace01-Fix-missing-format-string.patch deleted file mode 100644 index 27b890e22b..0000000000 --- a/meta/recipes-extended/ltp/ltp/0001-ptrace01-Fix-missing-format-string.patch +++ /dev/null @@ -1,33 +0,0 @@ -From adb9587466a493fdd9d4410f1b8b130ebca06daa Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 19 May 2020 22:21:23 -0700 -Subject: [PATCH] ptrace01: Fix missing format string - -Fixes -| ptrace01.c:89:2: error: format string is not a string literal -(potentially insecure) [-Werror,-Wformat-security] -| tst_res(TINFO, tc->message); -| ^ ~~~~~~~~~~~ - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Backport [58424835952641f4fd60c0ae3ab6c64decca3f8a] ---- - testcases/kernel/syscalls/ptrace/ptrace01.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/testcases/kernel/syscalls/ptrace/ptrace01.c b/testcases/kernel/syscalls/ptrace/ptrace01.c -index 87a99e4150..9071bbabaf 100644 ---- a/testcases/kernel/syscalls/ptrace/ptrace01.c -+++ b/testcases/kernel/syscalls/ptrace/ptrace01.c -@@ -86,7 +86,7 @@ static void run(unsigned int i) - - got_signal = 0; - -- tst_res(TINFO, tc->message); -+ tst_res(TINFO, "%s", tc->message); - - if (tc->handler == 1) { - parent_act.sa_handler = parent_handler; --- -2.26.2 - 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 @@ +From 14c710cae38aa96bd8d681e891b6a1d691f99988 Mon Sep 17 00:00:00 2001 +From: Xiangyu Chen <xiangyu.chen@windriver.com> +Date: Thu, 14 Mar 2024 09:47:10 +0800 +Subject: [PATCH] scenario_groups/default: remove connectors + +runtest/connectors was removed in 9b642d89c, thus update scenario_groups/default. + +Fixes: 9b642d89c ("runtest: Merge runtest/connectors to kernel_misc") +Closes: https://github.com/linux-test-project/ltp/pull/1144 + +Upstream-Status: Backport from +[https://github.com/linux-test-project/ltp/commit/14c710ca] + +Reviewed-by: Petr Vorel <pvorel@suse.cz> +Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> +--- + scenario_groups/default | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/scenario_groups/default b/scenario_groups/default +index f17b2061a..ec77d8fb8 100644 +--- a/scenario_groups/default ++++ b/scenario_groups/default +@@ -16,7 +16,6 @@ controllers + filecaps + cap_bounds + fcntl-locktests +-connectors + power_management_tests + hugetlb + commands +-- +2.34.1 + diff --git a/meta/recipes-extended/ltp/ltp/0001-sched_stress-Use-time_t-instead-of-long-for-type.patch b/meta/recipes-extended/ltp/ltp/0001-sched_stress-Use-time_t-instead-of-long-for-type.patch new file mode 100644 index 0000000000..ae8dc8706e --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-sched_stress-Use-time_t-instead-of-long-for-type.patch @@ -0,0 +1,54 @@ +From 74074f9a71c876d6e95c2d72702888dd2fabc761 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 6 May 2024 11:43:20 -0700 +Subject: [PATCH] sched_stress: Use time_t instead of long for type + +This ensures it works across different architectures +Fixes + +| sched_driver.c:744:43: error: passing argument 1 of 'ctime' from incompatible pointer type [-Wincompatible-pointer-types] +| 744 | printf("\nend time = %s\n", ctime(&end_time)); +| | ^~~~~~~~~ + +With gcc-14 + +Upstream-Status: Backport [https://github.com/linux-test-project/ltp/commit/0a682f1af42d8d261202821be580fe26d17ee9b7] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + testcases/kernel/sched/sched_stress/sched_driver.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/testcases/kernel/sched/sched_stress/sched_driver.c b/testcases/kernel/sched/sched_stress/sched_driver.c +index 61573d788..5b8c187fe 100644 +--- a/testcases/kernel/sched/sched_stress/sched_driver.c ++++ b/testcases/kernel/sched/sched_stress/sched_driver.c +@@ -136,7 +136,7 @@ int debug = 0; + /* + * Function prototypes + */ +-void startup(long); ++void startup(time_t); + int start_testcase(char *, char *, char *, char *, char *, char *); + int process_slots_in_use(); + int available_user_process_slots(); +@@ -251,7 +251,7 @@ int main(int argc, char **argv) + * information to the screen and . It also initializes the * + * process id list and other global variables. * + *-----------------------------------------------------------------------*/ +-void startup(long start_time) ++void startup(time_t start_time) + { + char tempbuffer[50]; /* temporary buffer to hold names */ + +@@ -734,7 +734,7 @@ void kill_short_term_testcases() + void finishup(start_time) + long start_time; /* starting time to calculate elapsed time */ + { +- long end_time; /* time when program finished */ ++ time_t end_time; /* time when program finished */ + + /* + * Get the end time and calculate elapsed time; write all this out +-- +2.45.0 + diff --git a/meta/recipes-extended/ltp/ltp/0001-sigwaitinfo-Do-not-run-invalid-undefined-test-cases.patch b/meta/recipes-extended/ltp/ltp/0001-sigwaitinfo-Do-not-run-invalid-undefined-test-cases.patch deleted file mode 100644 index 17d5af89e2..0000000000 --- a/meta/recipes-extended/ltp/ltp/0001-sigwaitinfo-Do-not-run-invalid-undefined-test-cases.patch +++ /dev/null @@ -1,69 +0,0 @@ -From e0a63deb1857eb90288e90d6368df70cdd0c0ec9 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 28 May 2020 13:04:33 -0700 -Subject: [PATCH] sigwaitinfo: Do not run invalid/undefined test cases - -These testcases run for eternity on musl - -test_bad_address* cases are passing invalid pointers to a function; that's always UB -empty_set and timeout rely on the implementation-defined "may fail" for EINTR in sigtimedwait [1] - -normally "may fail" is an "unspecified" but here the impl -is supposed to document it so it's "impl-defined" - -[1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigtimedwait.html - -Upstream-Status: Submitted [https://patchwork.ozlabs.org/project/ltp/patch/20200528204556.2444156-1-raj.khem@gmail.com/] -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Cc: Rich Felker <dalias@aerifal.cx> ---- - .../kernel/syscalls/sigwaitinfo/sigwaitinfo01.c | 12 ++---------- - 1 file changed, 2 insertions(+), 10 deletions(-) - ---- a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c -+++ b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c -@@ -422,15 +422,10 @@ struct test_desc { - } tests[] = { - #ifdef TEST_RT_SIGTIMEDWAIT - { -- test_empty_set, my_rt_sigtimedwait, SIGUSR1}, { - test_unmasked_matching, my_rt_sigtimedwait, SIGUSR1}, { - test_masked_matching, my_rt_sigtimedwait, SIGUSR1}, { - test_unmasked_matching_noinfo, my_rt_sigtimedwait, SIGUSR1}, { -- test_masked_matching_noinfo, my_rt_sigtimedwait, SIGUSR1}, { -- test_bad_address, my_rt_sigtimedwait, SIGUSR1}, { -- test_bad_address2, my_rt_sigtimedwait, SIGUSR1}, { -- test_bad_address3, my_rt_sigtimedwait, SIGUSR1}, { -- test_timeout, my_rt_sigtimedwait, 0}, -+ test_masked_matching_noinfo, my_rt_sigtimedwait, SIGUSR1}, - /* Special cases */ - /* 1: sigwaitinfo does respond to ignored signal */ - { -@@ -452,25 +447,17 @@ struct test_desc { - #endif - #if defined TEST_SIGWAITINFO - { -- test_empty_set, my_sigwaitinfo, SIGUSR1}, { - test_unmasked_matching, my_sigwaitinfo, SIGUSR1}, { - test_masked_matching, my_sigwaitinfo, SIGUSR1}, { - test_unmasked_matching_noinfo, my_sigwaitinfo, SIGUSR1}, { -- test_masked_matching_noinfo, my_sigwaitinfo, SIGUSR1}, { -- test_bad_address, my_sigwaitinfo, SIGUSR1}, { -- test_bad_address2, my_sigwaitinfo, SIGUSR1}, -+ test_masked_matching_noinfo, my_sigwaitinfo, SIGUSR1}, - #endif - #if defined TEST_SIGTIMEDWAIT - { -- test_empty_set, my_sigtimedwait, SIGUSR1}, { - test_unmasked_matching, my_sigtimedwait, SIGUSR1}, { - test_masked_matching, my_sigtimedwait, SIGUSR1}, { - test_unmasked_matching_noinfo, my_sigtimedwait, SIGUSR1}, { -- test_masked_matching_noinfo, my_sigtimedwait, SIGUSR1}, { -- test_bad_address, my_sigtimedwait, SIGUSR1}, { -- test_bad_address2, my_sigtimedwait, SIGUSR1}, { -- test_bad_address3, my_sigtimedwait, SIGUSR1}, { -- test_timeout, my_sigtimedwait, 0}, -+ test_masked_matching_noinfo, my_sigtimedwait, SIGUSR1}, - #endif - }; - diff --git a/meta/recipes-extended/ltp/ltp/0001-syscalls-copy_file_range02-Expect-EFBIG-in-subcase-m.patch b/meta/recipes-extended/ltp/ltp/0001-syscalls-copy_file_range02-Expect-EFBIG-in-subcase-m.patch deleted file mode 100644 index 09b6f54874..0000000000 --- a/meta/recipes-extended/ltp/ltp/0001-syscalls-copy_file_range02-Expect-EFBIG-in-subcase-m.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 99687ab002f9f750f6f18fa1d70a91f0aa4f8ba2 Mon Sep 17 00:00:00 2001 -From: He Zhe <zhe.he@windriver.com> -Date: Thu, 18 Jun 2020 17:18:27 +0800 -Subject: [PATCH] syscalls/copy_file_range02: Expect EFBIG in subcase max - length on 32-bit architectures - -For syscall -ssize_t copy_file_range(int fd_in, loff_t *off_in, - int fd_out, loff_t *off_out, - size_t len, unsigned int flags); -off_out is loff_t* that is long long, 64 bits on 32-bit architectures, -while len is size_t that unsigned int, 32 bits on 32-bit architectures. - -In subcase "max length", simplified as below, - -dst = tst_max_lfs_filesize(); -TEST(sys_copy_file_range(fd_src, 0, *tc->copy_to_fd, &dst, tc->len, tc->flags)); - -where dst is 4K*4G and len is 4G, so (4K+1)*4G is always smaller than 4G*4G, -it can never match the following kernel condition on 32-bit architectures. - -if (pos_in + count < pos_in || pos_out + count < pos_out) - return -EOVERFLOW; - -And thus we would get error like -copy_file_range02.c:139: FAIL: copy_file_range failed unexpectedly; expected EOVERFLOW, but got: EFBIG (27) - -Also correct a typo. - -Upstream-Status: Backport [http://lists.linux.it/pipermail/ltp/2020-June/017716.html] - -Signed-off-by: He Zhe <zhe.he@windriver.com> -Acked-by: Li Wang <liwang@redhat.com> ---- - .../kernel/syscalls/copy_file_range/copy_file_range02.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/testcases/kernel/syscalls/copy_file_range/copy_file_range02.c b/testcases/kernel/syscalls/copy_file_range/copy_file_range02.c -index fa679c4d3..bc27fbe57 100644 ---- a/testcases/kernel/syscalls/copy_file_range/copy_file_range02.c -+++ b/testcases/kernel/syscalls/copy_file_range/copy_file_range02.c -@@ -78,7 +78,11 @@ static struct tcase { - {&fd_chrdev, 0, EINVAL, CONTSIZE, "char device", 0}, - {&fd_fifo, 0, EINVAL, CONTSIZE, "fifo", 0}, - {&fd_pipe[0], 0, EINVAL, CONTSIZE, "pipe", 0}, -- {&fd_copy, 0, EOVERFLOW, ULLONG_MAX, "max length lenght", 1}, -+#ifdef TST_ABI64 -+ {&fd_copy, 0, EOVERFLOW, ULLONG_MAX, "max length", 1}, -+#else -+ {&fd_copy, 0, EFBIG, ULLONG_MAX, "max length", 1}, -+#endif - {&fd_copy, 0, EFBIG, MIN_OFF, "max file size", 1}, - }; - --- -2.17.1 - diff --git a/meta/recipes-extended/ltp/ltp/0004-guard-mallocopt-with-__GLIBC__.patch b/meta/recipes-extended/ltp/ltp/0004-guard-mallocopt-with-__GLIBC__.patch deleted file mode 100644 index e93886c9cd..0000000000 --- a/meta/recipes-extended/ltp/ltp/0004-guard-mallocopt-with-__GLIBC__.patch +++ /dev/null @@ -1,34 +0,0 @@ -From d0fc9ca5d3366f9b8907e463222403cd2327be10 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 8 Jan 2016 06:51:20 +0000 -Subject: [PATCH] guard mallocopt() with __GLIBC__ - -mallocopt is not available on non glibc implementations - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Reviewed-by: Petr Vorel <petr.vorel@gmail.com> -[ Upstream-Status: accepted in 967612c454aea66770b64f69287671037fe895b3 ] ---- - utils/benchmark/ebizzy-0.3/ebizzy.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/utils/benchmark/ebizzy-0.3/ebizzy.c b/utils/benchmark/ebizzy-0.3/ebizzy.c -index 5bb8eff..934d951 100644 ---- a/utils/benchmark/ebizzy-0.3/ebizzy.c -+++ b/utils/benchmark/ebizzy-0.3/ebizzy.c -@@ -215,10 +215,10 @@ static void read_options(int argc, char *argv[]) - "\"never mmap\" option specified\n"); - usage(); - } -- -+#ifdef __GLIBC__ - if (never_mmap) - mallopt(M_MMAP_MAX, 0); -- -+#endif - if (chunk_size < record_size) { - fprintf(stderr, "Chunk size %u smaller than record size %u\n", - chunk_size, record_size); --- -2.7.4 - 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 @@ -From f4fafbdffae3a63c81f65cef98c72dda26283e06 Mon Sep 17 00:00:00 2001 -From: Dengke Du <dengke.du@windriver.com> -Date: Wed, 8 Feb 2017 16:17:17 +0800 -Subject: [PATCH] Fix test_proc_kill hanging - -Sometimes the signal is delivered to memcg_process before the framework took -into consideration its pid entered in the tasks. Fixed by delaying the signal -send command. - -Upstream-Status: Pending - -Signed-off-by: George Nita <george.nita@enea.com> -Signed-off-by: Dengke Du <dengke.du@windriver.com> ---- - testcases/kernel/controllers/memcg/functional/memcg_lib.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh -index aadaae4..deea5d6 100755 ---- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh -+++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh -@@ -291,6 +291,7 @@ test_proc_kill() - pid=$! - TST_CHECKPOINT_WAIT 0 - echo $pid > tasks -+ sleep 1 - - signal_memcg_process $pid $3 - --- -2.7.4 - diff --git a/meta/recipes-extended/ltp/ltp_20200515.bb b/meta/recipes-extended/ltp/ltp_20240129.bb index b283add12f..f8e6d3987e 100644 --- a/meta/recipes-extended/ltp/ltp_20200515.bb +++ b/meta/recipes-extended/ltp/ltp_20240129.bb @@ -2,47 +2,54 @@ SUMMARY = "Linux Test Project" DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features." HOMEPAGE = "https://linux-test-project.github.io/" SECTION = "console/utils" -LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause" +LICENSE = "GPL-2.0-only & GPL-2.0-or-later & LGPL-2.0-or-later & LGPL-2.1-or-later & BSD-2-Clause" LIC_FILES_CHKSUM = "\ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ - file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \ - file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ - file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ file://testcases/open_posix_testsuite/COPYING;md5=48b1c5ec633e3e30ec2cf884ae699947 \ - file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ - file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://testcases/network/can/filter-tests/COPYING;md5=5b155ea7d7f86eae8e8832955d8b70bc \ " 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 " +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 # is set to -O0 or frame pointers have been enabled by -fno-omit-frame-pointer # earlier in CFLAGS, etc. -CFLAGS_append_x86-64 = " -fomit-frame-pointer" - -CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__" -CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" -SRCREV = "0d79a93e6ca44d9bc95973faea6bcd7b0c6d1f43" - -SRC_URI = "git://github.com/linux-test-project/ltp.git \ - file://0001-build-Add-option-to-select-libc-implementation.patch \ - file://0004-guard-mallocopt-with-__GLIBC__.patch \ - file://0007-Fix-test_proc_kill-hanging.patch \ - file://0001-Add-more-musl-exclusions.patch \ - file://0001-ptrace01-Fix-missing-format-string.patch \ - file://0001-sigwaitinfo-Do-not-run-invalid-undefined-test-cases.patch \ - file://0001-syscalls-copy_file_range02-Expect-EFBIG-in-subcase-m.patch \ +CFLAGS:append:x86-64 = " -fomit-frame-pointer" +TUNE_CCARGS:remove:x86 = "-mfpmath=sse" +TUNE_CCARGS:remove:x86-64 = "-mfpmath=sse" + +CFLAGS:append:powerpc64 = " -D__SANE_USERSPACE_TYPES__" +CFLAGS:append:mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" +SRCREV = "68737d20556d37364c95776044b1119c0912a36a" + +SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=https \ + file://0001-Remove-OOM-tests-from-runtest-mm.patch \ + file://0001-scenario_groups-default-remove-connectors.patch \ + file://0001-sched_stress-Use-time_t-instead-of-long-for-type.patch \ " S = "${WORKDIR}/git" inherit autotools-brokensep pkgconfig +# Version 20220527 added KVM test infrastructure which currently fails to build with gold due to +# SORT_NONE in linker script which isn't supported by gold: +# https://sourceware.org/bugzilla/show_bug.cgi?id=18097 +# https://github.com/linux-test-project/ltp/commit/3fce2064b54843218d085aae326c8f7ecf3a8c41#diff-39268f0855c634ca48c8993fcd2c95b12a65b79e8d9fa5ccd6b0f5a8785c0dd6R36 +LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd', '', d)}" +LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -fuse-ld=bfd', '', d)}" + +# After 0002-kvm-use-LD-instead-of-hardcoding-ld.patch +# https://github.com/linux-test-project/ltp/commit/f94e0ef3b7280f886384703ef9019aaf2f2dfebb +# it fails with gold also a bit later when trying to use *-payload.bin +# http://errors.yoctoproject.org/Errors/Details/663094/ +# work around this by forcing .bfd linked in LD when ld-is-gold is in DISTRO_FEATURES +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)}" + TARGET_CC_ARCH += "${LDFLAGS}" export prefix = "/opt/${PN}" @@ -50,13 +57,17 @@ export exec_prefix = "/opt/${PN}" PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl," EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4" -EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite --with-open-posix-testsuite " +EXTRA_OECONF = " --with-realtime-testsuite --with-open-posix-testsuite " # ltp network/rpc test cases ftbfs when libtirpc is found EXTRA_OECONF += " --without-tirpc " +do_compile() { + oe_runmake HOSTCC="${CC_FOR_BUILD}" HOST_CFLAGS="${CFLAGS_FOR_BUILD}" HOST_LDFLAGS="${LDFLAGS_FOR_BUILD}" KVM_LD="${KVM_LD}" +} + do_install(){ install -d ${D}${prefix}/ - oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install + oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install include-install # fixup not deploy STPfailure_report.pl to avoid confusing about it fails to run # as it lacks dependency on some perl moudle such as LWP::Simple @@ -66,21 +77,12 @@ do_install(){ # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible rm -rf ${D}${prefix}/bin/STPfailure_report.pl - # 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' - # The controllers memcg_stree test seems to cause us hangs and takes 900s # (maybe we expect more regular output?), anyhow, skip it sed -e '/^memcg_stress/d' -i ${D}${prefix}/runtest/controllers } -RDEPENDS_${PN} = "\ +RDEPENDS:${PN} = "\ attr \ bash \ bc \ @@ -92,10 +94,12 @@ RDEPENDS_${PN} = "\ e2fsprogs-mke2fs \ expect \ file \ + findutils \ gawk \ gdb \ gzip \ iproute2 \ + ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'iputils-ping6', '', d)} \ ldd \ libaio \ logrotate \ @@ -110,14 +114,33 @@ RDEPENDS_${PN} = "\ tar \ " -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" +RRECOMMENDS:${PN} += "kernel-module-loop" + +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 = "${prefix}/testcases/bin/nm01 ${prefix}/testcases/bin/ldd01" -INSANE_SKIP_${PN} += "already-stripped staticdev" +INSANE_SKIP:${PN} += "already-stripped staticdev" + +remove_broken_musl_sources() { + [ "${TCLIBC}" = "musl" ] || return 0 + + cd ${S} + echo "WARNING: remove unsupported tests (until they're fixed)" + + # sync with upstream + # https://github.com/linux-test-project/ltp/blob/master/ci/alpine.sh#L33 + rm -rfv \ + testcases/kernel/syscalls/fmtmsg/fmtmsg01.c \ + testcases/kernel/syscalls/getcontext/getcontext01.c \ + testcases/kernel/syscalls/rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c \ + testcases/kernel/syscalls/timer_create/timer_create01.c \ + testcases/kernel/syscalls/timer_create/timer_create03.c +} +do_patch[postfuncs] += "remove_broken_musl_sources" # Avoid file dependency scans, as LTP checks for things that may or may not # exist on the running system. For instance it has specific checks for # csh and ksh which are not typically part of OpenEmbedded systems (but # can be added via additional layers.) -SKIP_FILEDEPS_${PN} = '1' +SKIP_FILEDEPS:${PN} = '1' |