diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2022-11-07 15:54:27 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-11-08 22:47:16 +0000 |
commit | b23531a8c2f70fb8d09669993132ddf889c7fd35 (patch) | |
tree | 0267e390f4f581033c8b7f7df682abdf609e16b7 | |
parent | 5a86801bc237a21d97cfa98e03009a1682d38337 (diff) | |
download | poky-b23531a8c2f70fb8d09669993132ddf889c7fd35.tar.gz |
ltp: upgrade 20220527 -> 20220930
Do not install open posix testsuite by hand, as it is now
handled upstream.
(From OE-Core rev: 2a7e6a4176038770829d060bb8ec5606dc016a87)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
13 files changed, 1 insertions, 801 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-kvm-Fix-stack-access-mode-in-KVM-test-ELF-headers.patch b/meta/recipes-extended/ltp/ltp/0001-kvm-Fix-stack-access-mode-in-KVM-test-ELF-headers.patch deleted file mode 100644 index 764e9c0d9f..0000000000 --- a/meta/recipes-extended/ltp/ltp/0001-kvm-Fix-stack-access-mode-in-KVM-test-ELF-headers.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | From 608fc7bcda43e60536ae1f19842f7affba8f0aea Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Doucha <mdoucha@suse.cz> | ||
3 | Date: Wed, 1 Jun 2022 16:16:34 +0200 | ||
4 | Subject: [PATCH] kvm: Fix stack access mode in KVM test ELF headers | ||
5 | |||
6 | When the linker converts guest payload binary into a linkable resource | ||
7 | object file, it somehow defaults to requesting executable stack section | ||
8 | for the final test binary. This trips some build-time security checks | ||
9 | on newer systems. Add explicit linker option to make the stack | ||
10 | non-executable. | ||
11 | |||
12 | Suggested-by: Fabian Vogt <fvogt@suse.com> | ||
13 | Signed-off-by: Martin Doucha <mdoucha@suse.cz> | ||
14 | Reviewed-by: Petr Vorel <pvorel@suse.cz> | ||
15 | Reviewed-by: Cyril Hrubis <chrubis@suse.cz> | ||
16 | |||
17 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
18 | Upstream-Status: Backport [https://github.com/linux-test-project/ltp/commit/f9715d7c2e78713e26533c6e0846aaabf5c4095b] | ||
19 | --- | ||
20 | testcases/kernel/kvm/Makefile | 4 ++-- | ||
21 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
22 | |||
23 | diff --git a/testcases/kernel/kvm/Makefile b/testcases/kernel/kvm/Makefile | ||
24 | index 69a9946fe..adab56952 100644 | ||
25 | --- a/testcases/kernel/kvm/Makefile | ||
26 | +++ b/testcases/kernel/kvm/Makefile | ||
27 | @@ -50,11 +50,11 @@ include $(top_srcdir)/include/mk/generic_leaf_target.mk | ||
28 | ifdef VERBOSE | ||
29 | $(CC) $(GUEST_CPPFLAGS) $(GUEST_CFLAGS) $(GUEST_LDFLAGS) -o $*-payload.elf $^ $(GUEST_LDLIBS) | ||
30 | objcopy -O binary -j .init.boot -j .text -j .data -j .init -j .preinit_array -j .init_array --gap-fill=0 $*-payload.elf $*-payload.bin | ||
31 | - ld -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin | ||
32 | + ld -z noexecstack -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin | ||
33 | else | ||
34 | @$(CC) $(GUEST_CPPFLAGS) $(GUEST_CFLAGS) $(GUEST_LDFLAGS) -o $*-payload.elf $^ $(GUEST_LDLIBS) | ||
35 | @objcopy -O binary -j .init.boot -j .text -j .data -j .init -j .preinit_array -j .init_array --gap-fill=0 $*-payload.elf $*-payload.bin | ||
36 | - @ld -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin | ||
37 | + @ld -z noexecstack -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin | ||
38 | @echo KVM_CC $(target_rel_dir)$@ | ||
39 | endif | ||
40 | @rm $*-payload.elf $*-payload.bin | ||
diff --git a/meta/recipes-extended/ltp/ltp/0001-lapi-fsmount-resolve-conflict-in-different-header-fi.patch b/meta/recipes-extended/ltp/ltp/0001-lapi-fsmount-resolve-conflict-in-different-header-fi.patch deleted file mode 100644 index cdbcf6b288..0000000000 --- a/meta/recipes-extended/ltp/ltp/0001-lapi-fsmount-resolve-conflict-in-different-header-fi.patch +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | From b857f8723f30a4b9554bf6b0ff8fa52fd07e8b60 Mon Sep 17 00:00:00 2001 | ||
2 | From: Li Wang <liwang@redhat.com> | ||
3 | Date: Fri, 5 Aug 2022 14:34:01 +0800 | ||
4 | Subject: [PATCH] lapi/fsmount: resolve conflict in different header files | ||
5 | |||
6 | The latest glibc added new wrappers (e.g. mount_setattr, fsopen) support | ||
7 | in sys/mount.h, which partly conflicts with linux/mount.h at the same time. | ||
8 | |||
9 | We need to make adjustments to header files to fix compiling error on | ||
10 | different platforms. | ||
11 | |||
12 | Upstream-Status: Backport [https://github.com/linux-test-project/ltp/commit/b857f8723f30a4b9554bf6b0ff8fa52fd07e8b60] | ||
13 | Signed-off-by: Li Wang <liwang@redhat.com> | ||
14 | Reviewed-by: Petr Vorel <pvorel@suse.cz> | ||
15 | --- | ||
16 | configure.ac | 1 + | ||
17 | include/lapi/fs.h | 6 ++++-- | ||
18 | include/lapi/fsmount.h | 7 +++++-- | ||
19 | 3 files changed, 10 insertions(+), 4 deletions(-) | ||
20 | |||
21 | diff --git a/configure.ac b/configure.ac | ||
22 | index d50ec1ea7..dbd53cab6 100644 | ||
23 | --- a/configure.ac | ||
24 | +++ b/configure.ac | ||
25 | @@ -113,6 +113,7 @@ AC_CHECK_FUNCS_ONCE([ \ | ||
26 | mkdirat \ | ||
27 | mknodat \ | ||
28 | modify_ldt \ | ||
29 | + mount_setattr \ | ||
30 | move_mount \ | ||
31 | name_to_handle_at \ | ||
32 | open_tree \ | ||
33 | diff --git a/include/lapi/fs.h b/include/lapi/fs.h | ||
34 | index 27b3a183c..84a168a67 100644 | ||
35 | --- a/include/lapi/fs.h | ||
36 | +++ b/include/lapi/fs.h | ||
37 | @@ -6,8 +6,10 @@ | ||
38 | * Email: code@zilogic.com | ||
39 | */ | ||
40 | |||
41 | -#ifdef HAVE_LINUX_FS_H | ||
42 | -# include <linux/fs.h> | ||
43 | +#ifndef HAVE_MOUNT_SETATTR | ||
44 | +# ifdef HAVE_LINUX_FS_H | ||
45 | +# include <linux/fs.h> | ||
46 | +# endif | ||
47 | #endif | ||
48 | |||
49 | #include <sys/user.h> | ||
50 | diff --git a/include/lapi/fsmount.h b/include/lapi/fsmount.h | ||
51 | index b11e7a7bd..07eb42ffa 100644 | ||
52 | --- a/include/lapi/fsmount.h | ||
53 | +++ b/include/lapi/fsmount.h | ||
54 | @@ -11,9 +11,12 @@ | ||
55 | #include "config.h" | ||
56 | #include <sys/syscall.h> | ||
57 | #include <sys/types.h> | ||
58 | +#include <sys/mount.h> | ||
59 | |||
60 | -#ifdef HAVE_LINUX_MOUNT_H | ||
61 | -# include <linux/mount.h> | ||
62 | +#ifndef HAVE_FSOPEN | ||
63 | +# ifdef HAVE_LINUX_MOUNT_H | ||
64 | +# include <linux/mount.h> | ||
65 | +# endif | ||
66 | #endif | ||
67 | |||
68 | #include "lapi/fcntl.h" | ||
69 | -- | ||
70 | 2.37.2 | ||
71 | |||
diff --git a/meta/recipes-extended/ltp/ltp/0001-lapi-pidfd-adding-pidfd-header-file.patch b/meta/recipes-extended/ltp/ltp/0001-lapi-pidfd-adding-pidfd-header-file.patch deleted file mode 100644 index 184c42640a..0000000000 --- a/meta/recipes-extended/ltp/ltp/0001-lapi-pidfd-adding-pidfd-header-file.patch +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | From dbc9c14c92a5acf450d07868a735ac8cd6ec5b90 Mon Sep 17 00:00:00 2001 | ||
2 | From: Li Wang <liwang@redhat.com> | ||
3 | Date: Fri, 5 Aug 2022 14:34:00 +0800 | ||
4 | Subject: [PATCH] lapi/pidfd: adding pidfd header file | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | The newer Glibc already provided wrapper for the series pidfd syscall, | ||
10 | so let's include the header file conditionally. | ||
11 | |||
12 | # rpm -q glibc-devel | ||
13 | glibc-devel-2.35.9000-31.fc37.ppc64le | ||
14 | # rpm -ql glibc-devel | grep pidfd | ||
15 | /usr/include/sys/pidfd.h | ||
16 | |||
17 | To get rid of compiling error from fedora-rawhide: | ||
18 | |||
19 | tst_safe_macros.c: In function ‘safe_pidfd_open’: | ||
20 | tst_safe_macros.c:135:16: error: implicit declaration of function ‘pidfd_open’ [-Werror=implicit-function-declaration] | ||
21 | 135 | rval = pidfd_open(pid, flags); | ||
22 | | ^~~~~~~~~~ | ||
23 | |||
24 | Upstream-Status: Backport [https://github.com/linux-test-project/ltp/commit/dbc9c14c92a5acf450d07868a735ac8cd6ec5b90] | ||
25 | Signed-off-by: Li Wang <liwang@redhat.com> | ||
26 | Reviewed-by: Petr Vorel <pvorel@suse.cz> | ||
27 | --- | ||
28 | configure.ac | 1 + | ||
29 | include/lapi/pidfd.h | 3 +++ | ||
30 | 2 files changed, 4 insertions(+) | ||
31 | |||
32 | diff --git a/configure.ac b/configure.ac | ||
33 | index 69b145b5f..d50ec1ea7 100644 | ||
34 | --- a/configure.ac | ||
35 | +++ b/configure.ac | ||
36 | @@ -71,6 +71,7 @@ AC_CHECK_HEADERS_ONCE([ \ | ||
37 | sys/epoll.h \ | ||
38 | sys/fanotify.h \ | ||
39 | sys/inotify.h \ | ||
40 | + sys/pidfd.h | ||
41 | sys/prctl.h \ | ||
42 | sys/shm.h \ | ||
43 | sys/timerfd.h \ | ||
44 | diff --git a/include/lapi/pidfd.h b/include/lapi/pidfd.h | ||
45 | index 244d3acaf..9ca8e5aa2 100644 | ||
46 | --- a/include/lapi/pidfd.h | ||
47 | +++ b/include/lapi/pidfd.h | ||
48 | @@ -8,6 +8,9 @@ | ||
49 | #define LAPI_PIDFD_H__ | ||
50 | |||
51 | #include <fcntl.h> | ||
52 | +#ifdef HAVE_SYS_PIDFD_H | ||
53 | +# include <sys/pidfd.h> | ||
54 | +#endif | ||
55 | #include "config.h" | ||
56 | #include "lapi/syscalls.h" | ||
57 | |||
58 | -- | ||
59 | 2.37.2 | ||
60 | |||
diff --git a/meta/recipes-extended/ltp/ltp/0001-memcg-functional-Fix-usage-of-PAGESIZE-from-memcg_li.patch b/meta/recipes-extended/ltp/ltp/0001-memcg-functional-Fix-usage-of-PAGESIZE-from-memcg_li.patch deleted file mode 100644 index 726f6212f3..0000000000 --- a/meta/recipes-extended/ltp/ltp/0001-memcg-functional-Fix-usage-of-PAGESIZE-from-memcg_li.patch +++ /dev/null | |||
@@ -1,121 +0,0 @@ | |||
1 | From bda92ad659a52d38ac810099f69adff626b064c6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Joerg Vehlow <joerg.vehlow@aox.de> | ||
3 | Date: Mon, 27 Jun 2022 10:44:49 +0200 | ||
4 | Subject: [PATCH] memcg/functional: Fix usage of PAGESIZE from memcg_lib.sh | ||
5 | |||
6 | $PAGESIZES is set in memcg_lib.sh, which was moved to the bottom of the file. | ||
7 | |||
8 | Fixes: 04021637f ("tst_test.sh: Cleanup getopts usage") | ||
9 | |||
10 | Reviewed-by: Petr Vorel <pvorel@suse.cz> | ||
11 | Signed-off-by: Joerg Vehlow <joerg.vehlow@aox.de> | ||
12 | Upstream-Status: Backport [bda92ad659a52d38ac810099f69adff626b064c6] | ||
13 | --- | ||
14 | .../controllers/memcg/functional/memcg_failcnt.sh | 7 ++++--- | ||
15 | .../memcg/functional/memcg_max_usage_in_bytes_test.sh | 10 +++++----- | ||
16 | .../memcg/functional/memcg_subgroup_charge.sh | 8 ++++---- | ||
17 | .../memcg/functional/memcg_usage_in_bytes_test.sh | 10 +++++----- | ||
18 | 4 files changed, 18 insertions(+), 17 deletions(-) | ||
19 | |||
20 | diff --git a/testcases/kernel/controllers/memcg/functional/memcg_failcnt.sh b/testcases/kernel/controllers/memcg/functional/memcg_failcnt.sh | ||
21 | index 1fed01569..1be98a056 100755 | ||
22 | --- a/testcases/kernel/controllers/memcg/functional/memcg_failcnt.sh | ||
23 | +++ b/testcases/kernel/controllers/memcg/functional/memcg_failcnt.sh | ||
24 | @@ -12,9 +12,6 @@ MEMCG_TESTFUNC=test | ||
25 | MEMCG_SHMMAX=1 | ||
26 | TST_TEST_DATA="--mmap-anon --mmap-file --shm" | ||
27 | |||
28 | -MEMORY_LIMIT=$PAGESIZE | ||
29 | -MEMORY_TO_ALLOCATE=$((MEMORY_LIMIT * 2)) | ||
30 | - | ||
31 | test() | ||
32 | { | ||
33 | ROD echo $MEMORY_LIMIT \> memory.limit_in_bytes | ||
34 | @@ -36,4 +33,8 @@ test() | ||
35 | } | ||
36 | |||
37 | . memcg_lib.sh | ||
38 | + | ||
39 | +MEMORY_LIMIT=$PAGESIZE | ||
40 | +MEMORY_TO_ALLOCATE=$((MEMORY_LIMIT * 2)) | ||
41 | + | ||
42 | tst_run | ||
43 | diff --git a/testcases/kernel/controllers/memcg/functional/memcg_max_usage_in_bytes_test.sh b/testcases/kernel/controllers/memcg/functional/memcg_max_usage_in_bytes_test.sh | ||
44 | index d1ffbe053..302810513 100755 | ||
45 | --- a/testcases/kernel/controllers/memcg/functional/memcg_max_usage_in_bytes_test.sh | ||
46 | +++ b/testcases/kernel/controllers/memcg/functional/memcg_max_usage_in_bytes_test.sh | ||
47 | @@ -9,11 +9,6 @@ | ||
48 | MEMCG_TESTFUNC=test | ||
49 | TST_CNT=4 | ||
50 | |||
51 | - | ||
52 | -MEM_TO_ALLOC=$((PAGESIZE * 1024)) | ||
53 | -MEM_EXPECTED_UPPER=$((MEM_TO_ALLOC + MEM_USAGE_RANGE)) | ||
54 | -MEM_LIMIT=$((MEM_TO_ALLOC * 2)) | ||
55 | - | ||
56 | # Run test cases which checks memory.[memsw.]max_usage_in_bytes after make | ||
57 | # some memory allocation | ||
58 | test_max_usage_in_bytes() | ||
59 | @@ -88,4 +83,9 @@ test4() | ||
60 | } | ||
61 | |||
62 | . memcg_lib.sh | ||
63 | + | ||
64 | +MEM_TO_ALLOC=$((PAGESIZE * 1024)) | ||
65 | +MEM_EXPECTED_UPPER=$((MEM_TO_ALLOC + MEM_USAGE_RANGE)) | ||
66 | +MEM_LIMIT=$((MEM_TO_ALLOC * 2)) | ||
67 | + | ||
68 | tst_run | ||
69 | diff --git a/testcases/kernel/controllers/memcg/functional/memcg_subgroup_charge.sh b/testcases/kernel/controllers/memcg/functional/memcg_subgroup_charge.sh | ||
70 | index 08b6697d4..9bcc01258 100755 | ||
71 | --- a/testcases/kernel/controllers/memcg/functional/memcg_subgroup_charge.sh | ||
72 | +++ b/testcases/kernel/controllers/memcg/functional/memcg_subgroup_charge.sh | ||
73 | @@ -12,10 +12,6 @@ | ||
74 | MEMCG_TESTFUNC=test | ||
75 | TST_CNT=3 | ||
76 | |||
77 | - | ||
78 | -# Allocate memory bigger than per-cpu kernel memory | ||
79 | -MEM_TO_ALLOC=$((PAGESIZES * 2)) | ||
80 | - | ||
81 | # Test the memory charge won't move to subgroup | ||
82 | # $1 - memory.limit_in_bytes in sub group | ||
83 | test_subgroup() | ||
84 | @@ -67,4 +63,8 @@ test3() | ||
85 | } | ||
86 | |||
87 | . memcg_lib.sh | ||
88 | + | ||
89 | +# Allocate memory bigger than per-cpu kernel memory | ||
90 | +MEM_TO_ALLOC=$((PAGESIZES * 2)) | ||
91 | + | ||
92 | tst_run | ||
93 | diff --git a/testcases/kernel/controllers/memcg/functional/memcg_usage_in_bytes_test.sh b/testcases/kernel/controllers/memcg/functional/memcg_usage_in_bytes_test.sh | ||
94 | index 6f932124e..125d88e55 100755 | ||
95 | --- a/testcases/kernel/controllers/memcg/functional/memcg_usage_in_bytes_test.sh | ||
96 | +++ b/testcases/kernel/controllers/memcg/functional/memcg_usage_in_bytes_test.sh | ||
97 | @@ -9,11 +9,6 @@ | ||
98 | MEMCG_TESTFUNC=test | ||
99 | TST_CNT=2 | ||
100 | |||
101 | - | ||
102 | -MEM_TO_ALLOC=$((PAGESIZE * 1024)) | ||
103 | -MEM_EXPECTED_UPPER=$((MEM_TO_ALLOC + MEM_USAGE_RANGE)) | ||
104 | -MEM_LIMIT=$((MEM_TO_ALLOC * 2)) | ||
105 | - | ||
106 | test1() | ||
107 | { | ||
108 | tst_res TINFO "Test memory.usage_in_bytes" | ||
109 | @@ -35,4 +30,9 @@ test2() | ||
110 | } | ||
111 | |||
112 | . memcg_lib.sh | ||
113 | + | ||
114 | +MEM_TO_ALLOC=$((PAGESIZE * 1024)) | ||
115 | +MEM_EXPECTED_UPPER=$((MEM_TO_ALLOC + MEM_USAGE_RANGE)) | ||
116 | +MEM_LIMIT=$((MEM_TO_ALLOC * 2)) | ||
117 | + | ||
118 | tst_run | ||
119 | -- | ||
120 | 2.37.1 | ||
121 | |||
diff --git a/meta/recipes-extended/ltp/ltp/0001-mountns0-1-3-wait-for-umount-completed-in-thread_b.patch b/meta/recipes-extended/ltp/ltp/0001-mountns0-1-3-wait-for-umount-completed-in-thread_b.patch deleted file mode 100644 index 1339c603b9..0000000000 --- a/meta/recipes-extended/ltp/ltp/0001-mountns0-1-3-wait-for-umount-completed-in-thread_b.patch +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | From 6d4c8343d33e7d8fa059246310413f029a9e8573 Mon Sep 17 00:00:00 2001 | ||
2 | From: Li Wang <liwang@redhat.com> | ||
3 | Date: Thu, 7 Jul 2022 17:38:45 +0800 | ||
4 | Subject: [PATCH] mountns0[1-3]: wait for umount completed in thread_b | ||
5 | |||
6 | To get rid of race condition (occurs with umount_folders): | ||
7 | |||
8 | mountns01.c:42: TPASS: shared mount in parent passed | ||
9 | mountns01.c:83: TPASS: shared mount in child passed | ||
10 | tst_device.c:394: TWARN: umount('B') failed with EINVAL | ||
11 | mountns.h:39: TWARN: umount(B) failed: EINVAL (22) | ||
12 | |||
13 | Signed-off-by: Li Wang <liwang@redhat.com> | ||
14 | Reviewed-by: Yang Xu <xuyang2018.jy@fujitsu.com> | ||
15 | Upstream-Status: Backport [6d4c8343d33e7d8fa059246310413f029a9e8573] | ||
16 | --- | ||
17 | testcases/kernel/containers/mountns/mountns01.c | 2 ++ | ||
18 | testcases/kernel/containers/mountns/mountns02.c | 2 ++ | ||
19 | testcases/kernel/containers/mountns/mountns03.c | 2 ++ | ||
20 | 3 files changed, 6 insertions(+) | ||
21 | |||
22 | diff --git a/testcases/kernel/containers/mountns/mountns01.c b/testcases/kernel/containers/mountns/mountns01.c | ||
23 | index e99134aba..e8f176920 100644 | ||
24 | --- a/testcases/kernel/containers/mountns/mountns01.c | ||
25 | +++ b/testcases/kernel/containers/mountns/mountns01.c | ||
26 | @@ -86,6 +86,8 @@ static void run(void) | ||
27 | |||
28 | TST_CHECKPOINT_WAKE(0); | ||
29 | |||
30 | + SAFE_WAIT(NULL); | ||
31 | + | ||
32 | SAFE_UMOUNT(DIRA); | ||
33 | } | ||
34 | |||
35 | diff --git a/testcases/kernel/containers/mountns/mountns02.c b/testcases/kernel/containers/mountns/mountns02.c | ||
36 | index 258b61217..4b85fa79b 100644 | ||
37 | --- a/testcases/kernel/containers/mountns/mountns02.c | ||
38 | +++ b/testcases/kernel/containers/mountns/mountns02.c | ||
39 | @@ -87,6 +87,8 @@ static void run(void) | ||
40 | |||
41 | TST_CHECKPOINT_WAKE(0); | ||
42 | |||
43 | + SAFE_WAIT(NULL); | ||
44 | + | ||
45 | SAFE_UMOUNT(DIRA); | ||
46 | } | ||
47 | |||
48 | diff --git a/testcases/kernel/containers/mountns/mountns03.c b/testcases/kernel/containers/mountns/mountns03.c | ||
49 | index f37ae7902..1d26a25d8 100644 | ||
50 | --- a/testcases/kernel/containers/mountns/mountns03.c | ||
51 | +++ b/testcases/kernel/containers/mountns/mountns03.c | ||
52 | @@ -97,6 +97,8 @@ static void run(void) | ||
53 | |||
54 | TST_CHECKPOINT_WAKE(0); | ||
55 | |||
56 | + SAFE_WAIT(NULL); | ||
57 | + | ||
58 | SAFE_UMOUNT(DIRA); | ||
59 | } | ||
60 | |||
61 | -- | ||
62 | 2.37.1 | ||
63 | |||
diff --git a/meta/recipes-extended/ltp/ltp/0001-net_stress-Fix-usage-of-variables-from-tst_net.sh.patch b/meta/recipes-extended/ltp/ltp/0001-net_stress-Fix-usage-of-variables-from-tst_net.sh.patch deleted file mode 100644 index f747a1f97f..0000000000 --- a/meta/recipes-extended/ltp/ltp/0001-net_stress-Fix-usage-of-variables-from-tst_net.sh.patch +++ /dev/null | |||
@@ -1,154 +0,0 @@ | |||
1 | From 33c156e295e35d4839a135d8ba5db485b7712ced Mon Sep 17 00:00:00 2001 | ||
2 | From: Joerg Vehlow <joerg.vehlow@aox.de> | ||
3 | Date: Mon, 27 Jun 2022 09:27:09 +0200 | ||
4 | Subject: [PATCH] net_stress: Fix usage of variables from tst_net.sh | ||
5 | |||
6 | These tests use variables (NS_TIMES, IP_TOTAL, ROUTE_TOTAL | ||
7 | and IF_UPDOWN_TIMES) from tst_net.sh, before sourcing it. | ||
8 | |||
9 | Fixes: 04021637f ("tst_test.sh: Cleanup getopts usage") | ||
10 | |||
11 | Reviewed-by: Petr Vorel <pvorel@suse.cz> | ||
12 | Signed-off-by: Joerg Vehlow <joerg.vehlow@aox.de> | ||
13 | Upstream-Status: Backport [33c156e295e35d4839a135d8ba5db485b7712ced] | ||
14 | --- | ||
15 | testcases/network/stress/interface/if-addr-adddel.sh | 7 ++++--- | ||
16 | testcases/network/stress/interface/if-addr-addlarge.sh | 7 ++++--- | ||
17 | testcases/network/stress/interface/if-route-adddel.sh | 5 +++-- | ||
18 | testcases/network/stress/interface/if-route-addlarge.sh | 5 +++-- | ||
19 | testcases/network/stress/interface/if-updown.sh | 5 +++-- | ||
20 | testcases/network/stress/interface/if4-addr-change.sh | 4 +++- | ||
21 | 6 files changed, 20 insertions(+), 13 deletions(-) | ||
22 | |||
23 | diff --git a/testcases/network/stress/interface/if-addr-adddel.sh b/testcases/network/stress/interface/if-addr-adddel.sh | ||
24 | index cb453e612..0750501f0 100755 | ||
25 | --- a/testcases/network/stress/interface/if-addr-adddel.sh | ||
26 | +++ b/testcases/network/stress/interface/if-addr-adddel.sh | ||
27 | @@ -7,9 +7,6 @@ | ||
28 | |||
29 | IF_CMD='ifconfig' | ||
30 | |||
31 | -# The interval of the check interface activity | ||
32 | -CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))} | ||
33 | - | ||
34 | test_body() | ||
35 | { | ||
36 | local cmd="$CMD" | ||
37 | @@ -89,4 +86,8 @@ test_body() | ||
38 | } | ||
39 | |||
40 | . if-lib.sh | ||
41 | + | ||
42 | +# The interval of the check interface activity | ||
43 | +CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))} | ||
44 | + | ||
45 | tst_run | ||
46 | diff --git a/testcases/network/stress/interface/if-addr-addlarge.sh b/testcases/network/stress/interface/if-addr-addlarge.sh | ||
47 | index 3c876c17d..d0759c86b 100755 | ||
48 | --- a/testcases/network/stress/interface/if-addr-addlarge.sh | ||
49 | +++ b/testcases/network/stress/interface/if-addr-addlarge.sh | ||
50 | @@ -7,9 +7,6 @@ | ||
51 | |||
52 | IF_CMD='ifconfig' | ||
53 | |||
54 | -# The interval of the check interface activity | ||
55 | -CHECK_INTERVAL=${CHECK_INTERVAL:-$(($IP_TOTAL / 20))} | ||
56 | - | ||
57 | test_body() | ||
58 | { | ||
59 | local cmd="$CMD" | ||
60 | @@ -110,4 +107,8 @@ test_body() | ||
61 | } | ||
62 | |||
63 | . if-lib.sh | ||
64 | + | ||
65 | +# The interval of the check interface activity | ||
66 | +CHECK_INTERVAL=${CHECK_INTERVAL:-$(($IP_TOTAL / 20))} | ||
67 | + | ||
68 | tst_run | ||
69 | diff --git a/testcases/network/stress/interface/if-route-adddel.sh b/testcases/network/stress/interface/if-route-adddel.sh | ||
70 | index b50da268a..51445e4f7 100755 | ||
71 | --- a/testcases/network/stress/interface/if-route-adddel.sh | ||
72 | +++ b/testcases/network/stress/interface/if-route-adddel.sh | ||
73 | @@ -7,8 +7,6 @@ | ||
74 | |||
75 | IF_CMD='route' | ||
76 | |||
77 | -CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))} | ||
78 | - | ||
79 | test_body() | ||
80 | { | ||
81 | local cmd="$CMD" | ||
82 | @@ -64,4 +62,7 @@ test_body() | ||
83 | } | ||
84 | |||
85 | . if-lib.sh | ||
86 | + | ||
87 | +CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))} | ||
88 | + | ||
89 | tst_run | ||
90 | diff --git a/testcases/network/stress/interface/if-route-addlarge.sh b/testcases/network/stress/interface/if-route-addlarge.sh | ||
91 | index 7d09d1216..355b6b4ab 100755 | ||
92 | --- a/testcases/network/stress/interface/if-route-addlarge.sh | ||
93 | +++ b/testcases/network/stress/interface/if-route-addlarge.sh | ||
94 | @@ -7,8 +7,6 @@ | ||
95 | |||
96 | IF_CMD='route' | ||
97 | |||
98 | -CHECK_INTERVAL=${CHECK_INTERVAL:-$(($ROUTE_TOTAL / 20))} | ||
99 | - | ||
100 | test_body() | ||
101 | { | ||
102 | local cmd="$CMD" | ||
103 | @@ -76,4 +74,7 @@ test_body() | ||
104 | } | ||
105 | |||
106 | . if-lib.sh | ||
107 | + | ||
108 | +CHECK_INTERVAL=${CHECK_INTERVAL:-$(($ROUTE_TOTAL / 20))} | ||
109 | + | ||
110 | tst_run | ||
111 | diff --git a/testcases/network/stress/interface/if-updown.sh b/testcases/network/stress/interface/if-updown.sh | ||
112 | index 9a5709c85..71c78d785 100755 | ||
113 | --- a/testcases/network/stress/interface/if-updown.sh | ||
114 | +++ b/testcases/network/stress/interface/if-updown.sh | ||
115 | @@ -8,8 +8,6 @@ | ||
116 | IF_CMD='ifconfig' | ||
117 | TST_CLEANUP="if_cleanup_restore" | ||
118 | |||
119 | -CHECK_INTERVAL=${CHECK_INTERVAL:-$(($IF_UPDOWN_TIMES / 20))} | ||
120 | - | ||
121 | test_body() | ||
122 | { | ||
123 | local cmd="$CMD" | ||
124 | @@ -47,4 +45,7 @@ test_body() | ||
125 | } | ||
126 | |||
127 | . if-lib.sh | ||
128 | + | ||
129 | +CHECK_INTERVAL=${CHECK_INTERVAL:-$(($IF_UPDOWN_TIMES / 20))} | ||
130 | + | ||
131 | tst_run | ||
132 | diff --git a/testcases/network/stress/interface/if4-addr-change.sh b/testcases/network/stress/interface/if4-addr-change.sh | ||
133 | index b9ece2af9..f162e6a51 100755 | ||
134 | --- a/testcases/network/stress/interface/if4-addr-change.sh | ||
135 | +++ b/testcases/network/stress/interface/if4-addr-change.sh | ||
136 | @@ -9,7 +9,6 @@ TST_CLEANUP="do_cleanup" | ||
137 | TST_TESTFUNC="test_body" | ||
138 | TST_NEEDS_CMDS="ifconfig" | ||
139 | |||
140 | -CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))} | ||
141 | # Maximum host portion of the IPv4 address on the local host | ||
142 | LHOST_IPV4_HOST_MAX="254" | ||
143 | |||
144 | @@ -61,4 +60,7 @@ test_body() | ||
145 | } | ||
146 | |||
147 | . tst_net.sh | ||
148 | + | ||
149 | +CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))} | ||
150 | + | ||
151 | tst_run | ||
152 | -- | ||
153 | 2.37.1 | ||
154 | |||
diff --git a/meta/recipes-extended/ltp/ltp/0001-netstress-Restore-runtime-to-5m.patch b/meta/recipes-extended/ltp/ltp/0001-netstress-Restore-runtime-to-5m.patch deleted file mode 100644 index 8acfaf7c8e..0000000000 --- a/meta/recipes-extended/ltp/ltp/0001-netstress-Restore-runtime-to-5m.patch +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | From cc4a27c235d0cf69a55cd8829b232566b0223333 Mon Sep 17 00:00:00 2001 | ||
2 | From: Petr Vorel <pvorel@suse.cz> | ||
3 | Date: Wed, 13 Jul 2022 09:46:14 +0200 | ||
4 | Subject: [PATCH] netstress: Restore runtime to 5m | ||
5 | |||
6 | netstress requires the previous default timeout 5m due longer timeout | ||
7 | for higher message sizes (e.g. 65535): | ||
8 | |||
9 | ./sctp_ipsec.sh -6 -p comp -m transport -s 100:1000:65535:R65535 | ||
10 | sctp_ipsec 1 TPASS: netstress passed, median time 5 ms, data: 5 9 6 5 5 | ||
11 | sctp_ipsec 2 TINFO: run server 'netstress -T sctp -S fd00:1:1:1::1 -D ltp_ns_veth1 -R 500000 -B /tmp/LTP_sctp_ipsec.ARZbGkvjPa' | ||
12 | sctp_ipsec 2 TINFO: run client 'netstress -l -T sctp -H fd00:1:1:1::1 -n 1000 -N 1000 -S fd00:1:1:1::2 -D ltp_ns_veth2 -a 2 -r 100 -d /tmp/LTP_sctp_ipsec.ARZbGkvjPa/tst_netload.res' 5 times | ||
13 | sctp_ipsec 2 TPASS: netstress passed, median time 6 ms, data: 8 6 6 5 6 | ||
14 | sctp_ipsec 3 TINFO: run server 'netstress -T sctp -S fd00:1:1:1::1 -D ltp_ns_veth1 -R 500000 -B /tmp/LTP_sctp_ipsec.ARZbGkvjPa' | ||
15 | sctp_ipsec 3 TINFO: run client 'netstress -l -T sctp -H fd00:1:1:1::1 -n 65535 -N 65535 -S fd00:1:1:1::2 -D ltp_ns_veth2 -a 2 -r 100 -d /tmp/LTP_sctp_ipsec.ARZbGkvjPa/tst_netload.res' 5 times | ||
16 | sctp_ipsec 3 TWARN: netstress failed, ret: 2 | ||
17 | tst_test.c:1526: TINFO: Timeout per run is 0h 00m 30s | ||
18 | netstress.c:896: TINFO: IP_BIND_ADDRESS_NO_PORT is used | ||
19 | netstress.c:898: TINFO: connection: addr 'fd00:1:1:1::1', port '55097' | ||
20 | netstress.c:900: TINFO: client max req: 100 | ||
21 | netstress.c:901: TINFO: clients num: 2 | ||
22 | netstress.c:906: TINFO: client msg size: 65535 | ||
23 | netstress.c:907: TINFO: server msg size: 65535 | ||
24 | netstress.c:979: TINFO: SCTP client | ||
25 | netstress.c:475: TINFO: Running the test over IPv6 | ||
26 | Test timeouted, sending SIGKILL! | ||
27 | tst_test.c:1577: TINFO: If you are running on slow machine, try exporting LTP_TIMEOUT_MUL > 1 | ||
28 | tst_test.c:1579: TBROK: Test killed! (timeout?) | ||
29 | |||
30 | Converting netstress.c to use TST_NO_DEFAULT_MAIN (i.e. implementing main) | ||
31 | would require more changes, because it uses .forks_child, .needs_checkpoints, | ||
32 | cleanup function. | ||
33 | |||
34 | Signed-off-by: Petr Vorel <pvorel@suse.cz> | ||
35 | Upstream-Status: Backport [cc4a27c235d0cf69a55cd8829b232566b0223333] | ||
36 | --- | ||
37 | testcases/network/netstress/netstress.c | 1 + | ||
38 | 1 file changed, 1 insertion(+) | ||
39 | |||
40 | diff --git a/testcases/network/netstress/netstress.c b/testcases/network/netstress/netstress.c | ||
41 | index 6c9e83112..7c222531d 100644 | ||
42 | --- a/testcases/network/netstress/netstress.c | ||
43 | +++ b/testcases/network/netstress/netstress.c | ||
44 | @@ -1028,5 +1028,6 @@ static struct tst_test test = { | ||
45 | {"B:", &server_bg, "Run in background, arg is the process directory"}, | ||
46 | {} | ||
47 | }, | ||
48 | + .max_runtime = 300, | ||
49 | .needs_checkpoints = 1, | ||
50 | }; | ||
51 | -- | ||
52 | 2.37.1 | ||
53 | |||
diff --git a/meta/recipes-extended/ltp/ltp/0001-nfs05_make_tree-Restore-5-min-timeout.patch b/meta/recipes-extended/ltp/ltp/0001-nfs05_make_tree-Restore-5-min-timeout.patch deleted file mode 100644 index 2b9557ad01..0000000000 --- a/meta/recipes-extended/ltp/ltp/0001-nfs05_make_tree-Restore-5-min-timeout.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From 463da729537faa6d5ef206912fdec871c1059dac Mon Sep 17 00:00:00 2001 | ||
2 | From: Petr Vorel <pvorel@suse.cz> | ||
3 | Date: Thu, 16 Jun 2022 16:33:31 +0200 | ||
4 | Subject: [PATCH] nfs05_make_tree: Restore 5 min timeout | ||
5 | |||
6 | nfs05_make_tree is a long running test. The previous default timeout 5 | ||
7 | min was enough after reducing runtime in 05be61cf6. | ||
8 | |||
9 | But the new default 30 sec introduced in the concept of max runtime is | ||
10 | definitely not enough. Restore the previous timeout 5 min. | ||
11 | |||
12 | Signed-off-by: Petr Vorel <pvorel@suse.cz> | ||
13 | |||
14 | Upstream-Status: Backport [463da729537faa6d5ef206912fdec871c1059dac] | ||
15 | --- | ||
16 | testcases/network/nfs/nfs_stress/nfs05_make_tree.c | 1 + | ||
17 | 1 file changed, 1 insertion(+) | ||
18 | |||
19 | diff --git a/testcases/network/nfs/nfs_stress/nfs05_make_tree.c b/testcases/network/nfs/nfs_stress/nfs05_make_tree.c | ||
20 | index fdc13bd5d..5456c1bf0 100644 | ||
21 | --- a/testcases/network/nfs/nfs_stress/nfs05_make_tree.c | ||
22 | +++ b/testcases/network/nfs/nfs_stress/nfs05_make_tree.c | ||
23 | @@ -215,4 +215,5 @@ static struct tst_test test = { | ||
24 | .options = opts, | ||
25 | .test_all = do_test, | ||
26 | .setup = setup, | ||
27 | + .max_runtime = 300, | ||
28 | }; | ||
29 | -- | ||
30 | 2.37.1 | ||
31 | |||
diff --git a/meta/recipes-extended/ltp/ltp/0001-rt-migrate-Use-int-instead-of-pthread_t-for-thread-I.patch b/meta/recipes-extended/ltp/ltp/0001-rt-migrate-Use-int-instead-of-pthread_t-for-thread-I.patch deleted file mode 100644 index e49f53a9e2..0000000000 --- a/meta/recipes-extended/ltp/ltp/0001-rt-migrate-Use-int-instead-of-pthread_t-for-thread-I.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From 11e503344c36c1c7df3e455d81736dc4a5b43775 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 23 Aug 2022 23:20:53 -0700 | ||
4 | Subject: [PATCH] rt-migrate: Use int instead of pthread_t for thread IDs | ||
5 | |||
6 | pthread_t is opaque, but create_fifo_thread() returns integer therefore | ||
7 | on musl where thread_t is not integer, this fails to compile e.g. | ||
8 | |||
9 | | rt-migrate.c:450:14: error: incompatible integer to pointer conversion assigning to 'pthread_t' (aka 'struct __pthread *') from 'int' [-Wint-conversion] | ||
10 | | threads[i] = create_fifo_thread(start_task, (void *)i, | ||
11 | | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
12 | |||
13 | Align the types used to fix the problems. | ||
14 | |||
15 | Upstream-Status: Submitted [https://lists.linux.it/pipermail/ltp/2022-August/030239.html] | ||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | --- | ||
18 | testcases/realtime/func/rt-migrate/rt-migrate.c | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/testcases/realtime/func/rt-migrate/rt-migrate.c b/testcases/realtime/func/rt-migrate/rt-migrate.c | ||
22 | index 3e6c82a2fb..97ab604c7f 100644 | ||
23 | --- a/testcases/realtime/func/rt-migrate/rt-migrate.c | ||
24 | +++ b/testcases/realtime/func/rt-migrate/rt-migrate.c | ||
25 | @@ -394,7 +394,7 @@ static void stop_log(int sig) | ||
26 | |||
27 | int main(int argc, char **argv) | ||
28 | { | ||
29 | - pthread_t *threads; | ||
30 | + int *threads; | ||
31 | long i; | ||
32 | int ret; | ||
33 | struct timespec intv; | ||
34 | -- | ||
35 | 2.37.2 | ||
36 | |||
diff --git a/meta/recipes-extended/ltp/ltp/0001-syscalls-migrate_pages03-restore-runtime-to-5m.patch b/meta/recipes-extended/ltp/ltp/0001-syscalls-migrate_pages03-restore-runtime-to-5m.patch deleted file mode 100644 index 1652f8c94e..0000000000 --- a/meta/recipes-extended/ltp/ltp/0001-syscalls-migrate_pages03-restore-runtime-to-5m.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | From 9fb28002bb2ce988b99d1756ff7b902f76e3472a Mon Sep 17 00:00:00 2001 | ||
2 | From: Jan Stancek <jstancek@redhat.com> | ||
3 | Date: Tue, 21 Jun 2022 10:37:17 +0200 | ||
4 | Subject: [PATCH] syscalls/migrate_pages03: restore runtime to 5m | ||
5 | |||
6 | Arches with large pages have trouble completing all loops in 30s, | ||
7 | restore runtime to 5m. Also check for remaining runtime and | ||
8 | exit if we run out. | ||
9 | |||
10 | Signed-off-by: Jan Stancek <jstancek@redhat.com> | ||
11 | Reviewed-by: Cyril Hrubis <chrubis@suse.cz> | ||
12 | Signed-off-by: Li Wang <liwang@redhat.com> | ||
13 | Upstream-Status: Backport [9fb28002bb2ce988b99d1756ff7b902f76e3472a] | ||
14 | --- | ||
15 | testcases/kernel/syscalls/migrate_pages/migrate_pages03.c | 6 ++++++ | ||
16 | 1 file changed, 6 insertions(+) | ||
17 | |||
18 | diff --git a/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c b/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c | ||
19 | index c6afb4cce..2866c96e6 100644 | ||
20 | --- a/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c | ||
21 | +++ b/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c | ||
22 | @@ -127,6 +127,11 @@ static void migrate_test(void) | ||
23 | tst_res(TFAIL | TERRNO, "migrate_pages() failed"); | ||
24 | return; | ||
25 | } | ||
26 | + | ||
27 | + if (!tst_remaining_runtime()) { | ||
28 | + tst_res(TINFO, "Out of runtime, exitting..."); | ||
29 | + break; | ||
30 | + } | ||
31 | } | ||
32 | SAFE_SETEUID(0); | ||
33 | |||
34 | @@ -134,6 +139,7 @@ static void migrate_test(void) | ||
35 | } | ||
36 | |||
37 | static struct tst_test test = { | ||
38 | + .max_runtime = 300, | ||
39 | .min_kver = "2.6.32", | ||
40 | .needs_root = 1, | ||
41 | .setup = setup, | ||
42 | -- | ||
43 | 2.37.1 | ||
44 | |||
diff --git a/meta/recipes-extended/ltp/ltp/0002-kvm-use-LD-instead-of-hardcoding-ld.patch b/meta/recipes-extended/ltp/ltp/0002-kvm-use-LD-instead-of-hardcoding-ld.patch deleted file mode 100644 index 060ba05835..0000000000 --- a/meta/recipes-extended/ltp/ltp/0002-kvm-use-LD-instead-of-hardcoding-ld.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From 1cea308a647c2a2f9790b0bac7c523de7aa83270 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ross Burton <ross.burton@arm.com> | ||
3 | Date: Tue, 12 Jul 2022 15:03:54 +0100 | ||
4 | Subject: [PATCH] kvm: use $(LD) instead of hardcoding ld | ||
5 | |||
6 | In cross-compiled builds the host ld may not know the required ELF format, | ||
7 | so ensure we use $(LD) which will be the cross-capable ld binary. | ||
8 | |||
9 | Closes: https://github.com/linux-test-project/ltp/pull/948 | ||
10 | |||
11 | Upstream-Status: Backport [https://github.com/linux-test-project/ltp/commit/f94e0ef3b7280f886384703ef9019aaf2f2dfebb] | ||
12 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
13 | |||
14 | Reviewed-by: Petr Vorel <pvorel@suse.cz> | ||
15 | Reviewed-by: Martin Doucha <mdoucha@suse.cz> | ||
16 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
17 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
18 | --- | ||
19 | testcases/kernel/kvm/Makefile | 4 ++-- | ||
20 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/testcases/kernel/kvm/Makefile b/testcases/kernel/kvm/Makefile | ||
23 | index adab56952..d67230735 100644 | ||
24 | --- a/testcases/kernel/kvm/Makefile | ||
25 | +++ b/testcases/kernel/kvm/Makefile | ||
26 | @@ -50,11 +50,11 @@ include $(top_srcdir)/include/mk/generic_leaf_target.mk | ||
27 | ifdef VERBOSE | ||
28 | $(CC) $(GUEST_CPPFLAGS) $(GUEST_CFLAGS) $(GUEST_LDFLAGS) -o $*-payload.elf $^ $(GUEST_LDLIBS) | ||
29 | objcopy -O binary -j .init.boot -j .text -j .data -j .init -j .preinit_array -j .init_array --gap-fill=0 $*-payload.elf $*-payload.bin | ||
30 | - ld -z noexecstack -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin | ||
31 | + $(LD) -z noexecstack -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin | ||
32 | else | ||
33 | @$(CC) $(GUEST_CPPFLAGS) $(GUEST_CFLAGS) $(GUEST_LDFLAGS) -o $*-payload.elf $^ $(GUEST_LDLIBS) | ||
34 | @objcopy -O binary -j .init.boot -j .text -j .data -j .init -j .preinit_array -j .init_array --gap-fill=0 $*-payload.elf $*-payload.bin | ||
35 | - @ld -z noexecstack -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin | ||
36 | + @$(LD) -z noexecstack -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin | ||
37 | @echo KVM_CC $(target_rel_dir)$@ | ||
38 | endif | ||
39 | @rm $*-payload.elf $*-payload.bin | ||
diff --git a/meta/recipes-extended/ltp/ltp/0003-Add-KVM_LD-Makefile-variable-for-building-KVM-payloa.patch b/meta/recipes-extended/ltp/ltp/0003-Add-KVM_LD-Makefile-variable-for-building-KVM-payloa.patch deleted file mode 100644 index 974ca5eebe..0000000000 --- a/meta/recipes-extended/ltp/ltp/0003-Add-KVM_LD-Makefile-variable-for-building-KVM-payloa.patch +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | From a8d41b7937a34904611011ca357f8db880d42270 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Doucha <mdoucha@suse.cz> | ||
3 | Date: Mon, 25 Jul 2022 17:37:27 +0200 | ||
4 | Subject: [PATCH] Add KVM_LD Makefile variable for building KVM payload | ||
5 | binaries | ||
6 | |||
7 | KVM linker needs to be configurable for cross-compiling but some | ||
8 | linkers don't support the linker script for wrapping arbitrary files | ||
9 | into linkable resource files. Allow KVM linker to be changed | ||
10 | independently of $LD via $KVM_LD. | ||
11 | |||
12 | Signed-off-by: Martin Doucha <mdoucha@suse.cz> | ||
13 | Acked-by: Richard Palethorpe <rpalethorpe@suse.com> | ||
14 | |||
15 | Upstream-Status: Backport [https://github.com/linux-test-project/ltp/commit/5ef0b7892a17b64040e55e9ad62d36ebb75d33fd] | ||
16 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
17 | --- | ||
18 | doc/build-system-guide.txt | 5 +++++ | ||
19 | testcases/kernel/kvm/Makefile | 5 +++-- | ||
20 | 2 files changed, 8 insertions(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/doc/build-system-guide.txt b/doc/build-system-guide.txt | ||
23 | index 166f7fb92..b8d267b4b 100644 | ||
24 | --- a/doc/build-system-guide.txt | ||
25 | +++ b/doc/build-system-guide.txt | ||
26 | @@ -145,6 +145,11 @@ $(CPPFLAGS) : Preprocessor flags, e.g. -I arguments. | ||
27 | |||
28 | $(DEBUG_CFLAGS) : Debug flags to pass to $(CC), -g, etc. | ||
29 | |||
30 | +$(KVM_LD) : Special linker for wrapping KVM payload binaries | ||
31 | + into linkable object files. Defaults to $(LD). | ||
32 | + Change this variable if the KVM Makefile fails | ||
33 | + to build files named *-payload.o. | ||
34 | + | ||
35 | $(LD) : The system linker (typically $(CC), but not | ||
36 | necessarily). | ||
37 | |||
38 | diff --git a/testcases/kernel/kvm/Makefile b/testcases/kernel/kvm/Makefile | ||
39 | index d67230735..31f144c26 100644 | ||
40 | --- a/testcases/kernel/kvm/Makefile | ||
41 | +++ b/testcases/kernel/kvm/Makefile | ||
42 | @@ -11,6 +11,7 @@ GUEST_CPPFLAGS = $(CPPFLAGS) -DCOMPILE_PAYLOAD | ||
43 | GUEST_CFLAGS = -ffreestanding -O2 -Wall -fno-asynchronous-unwind-tables -mno-mmx -mno-sse | ||
44 | GUEST_LDFLAGS = -nostdlib -Wl,--build-id=none | ||
45 | GUEST_LDLIBS = | ||
46 | +KVM_LD ?= $(LD) | ||
47 | |||
48 | FILTER_OUT_MAKE_TARGETS := lib_guest lib_host lib_x86 | ||
49 | |||
50 | @@ -50,11 +51,11 @@ include $(top_srcdir)/include/mk/generic_leaf_target.mk | ||
51 | ifdef VERBOSE | ||
52 | $(CC) $(GUEST_CPPFLAGS) $(GUEST_CFLAGS) $(GUEST_LDFLAGS) -o $*-payload.elf $^ $(GUEST_LDLIBS) | ||
53 | objcopy -O binary -j .init.boot -j .text -j .data -j .init -j .preinit_array -j .init_array --gap-fill=0 $*-payload.elf $*-payload.bin | ||
54 | - $(LD) -z noexecstack -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin | ||
55 | + $(KVM_LD) -z noexecstack -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin | ||
56 | else | ||
57 | @$(CC) $(GUEST_CPPFLAGS) $(GUEST_CFLAGS) $(GUEST_LDFLAGS) -o $*-payload.elf $^ $(GUEST_LDLIBS) | ||
58 | @objcopy -O binary -j .init.boot -j .text -j .data -j .init -j .preinit_array -j .init_array --gap-fill=0 $*-payload.elf $*-payload.bin | ||
59 | - @$(LD) -z noexecstack -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin | ||
60 | + @$(KVM_LD) -z noexecstack -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin | ||
61 | @echo KVM_CC $(target_rel_dir)$@ | ||
62 | endif | ||
63 | @rm $*-payload.elf $*-payload.bin | ||
diff --git a/meta/recipes-extended/ltp/ltp_20220527.bb b/meta/recipes-extended/ltp/ltp_20220930.bb index b657a6adb1..405b17b637 100644 --- a/meta/recipes-extended/ltp/ltp_20220527.bb +++ b/meta/recipes-extended/ltp/ltp_20220930.bb | |||
@@ -24,23 +24,11 @@ TUNE_CCARGS:remove:x86-64 = "-mfpmath=sse" | |||
24 | 24 | ||
25 | CFLAGS:append:powerpc64 = " -D__SANE_USERSPACE_TYPES__" | 25 | CFLAGS:append:powerpc64 = " -D__SANE_USERSPACE_TYPES__" |
26 | CFLAGS:append:mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" | 26 | CFLAGS:append:mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" |
27 | SRCREV = "6f88e0f6f1d6eb12c48c902f50f47ecbd3b0f18a" | 27 | SRCREV = "b763f81998f19f783982d3937d1fd05bcf649c16" |
28 | 28 | ||
29 | SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=https \ | 29 | SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=https \ |
30 | file://0001-Remove-OOM-tests-from-runtest-mm.patch \ | 30 | file://0001-Remove-OOM-tests-from-runtest-mm.patch \ |
31 | file://disable_hanging_tests.patch \ | 31 | file://disable_hanging_tests.patch \ |
32 | file://0001-kvm-Fix-stack-access-mode-in-KVM-test-ELF-headers.patch \ | ||
33 | file://0002-kvm-use-LD-instead-of-hardcoding-ld.patch \ | ||
34 | file://0003-Add-KVM_LD-Makefile-variable-for-building-KVM-payloa.patch \ | ||
35 | file://0001-nfs05_make_tree-Restore-5-min-timeout.patch \ | ||
36 | file://0001-syscalls-migrate_pages03-restore-runtime-to-5m.patch \ | ||
37 | file://0001-mountns0-1-3-wait-for-umount-completed-in-thread_b.patch \ | ||
38 | file://0001-netstress-Restore-runtime-to-5m.patch \ | ||
39 | file://0001-net_stress-Fix-usage-of-variables-from-tst_net.sh.patch \ | ||
40 | file://0001-memcg-functional-Fix-usage-of-PAGESIZE-from-memcg_li.patch \ | ||
41 | file://0001-lapi-pidfd-adding-pidfd-header-file.patch \ | ||
42 | file://0001-lapi-fsmount-resolve-conflict-in-different-header-fi.patch \ | ||
43 | file://0001-rt-migrate-Use-int-instead-of-pthread_t-for-thread-I.patch \ | ||
44 | " | 32 | " |
45 | 33 | ||
46 | S = "${WORKDIR}/git" | 34 | S = "${WORKDIR}/git" |
@@ -87,22 +75,9 @@ do_install(){ | |||
87 | # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible | 75 | # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible |
88 | rm -rf ${D}${prefix}/bin/STPfailure_report.pl | 76 | rm -rf ${D}${prefix}/bin/STPfailure_report.pl |
89 | 77 | ||
90 | # Copy POSIX test suite into ${D}${prefix}/testcases by manual | ||
91 | cp -r testcases/open_posix_testsuite ${D}${prefix}/testcases | ||
92 | |||
93 | # Makefile were configured in the build system | ||
94 | find ${D}${prefix} -name Makefile | xargs -n 1 sed -i \ | ||
95 | -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \ | ||
96 | -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \ | ||
97 | -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \ | ||
98 | -e 's@[^ ]*--sysroot=[^ "]*@@g' | ||
99 | |||
100 | # The controllers memcg_stree test seems to cause us hangs and takes 900s | 78 | # The controllers memcg_stree test seems to cause us hangs and takes 900s |
101 | # (maybe we expect more regular output?), anyhow, skip it | 79 | # (maybe we expect more regular output?), anyhow, skip it |
102 | sed -e '/^memcg_stress/d' -i ${D}${prefix}/runtest/controllers | 80 | sed -e '/^memcg_stress/d' -i ${D}${prefix}/runtest/controllers |
103 | |||
104 | # We don't need to ship the compile logs that open_posix_testsuite writes | ||
105 | rm -f ${D}${prefix}/testcases/open_posix_testsuite/logfile.* | ||
106 | } | 81 | } |
107 | 82 | ||
108 | RDEPENDS:${PN} = "\ | 83 | RDEPENDS:${PN} = "\ |