summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-05-28 19:03:02 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-04 13:27:29 +0100
commit4613d28b37d8ee496bc167b13d95d2e61a88df7a (patch)
tree3be5e253df7942fe8e81a47f3cc2d015c04f89a1 /meta/recipes-extended
parent2f63944eaa2b524276dc45f3f810d953548ae38a (diff)
downloadpoky-4613d28b37d8ee496bc167b13d95d2e61a88df7a.tar.gz
ltp: Disable sigwaitinfo tests relying on undefined behavior
Musl finds these issues, which were undetected thus far. (From OE-Core rev: c650737ea4d3c6e6d93191fdc605de2e5f52f9ac) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-sigwaitinfo-Do-not-run-invalid-undefined-test-cases.patch69
-rw-r--r--meta/recipes-extended/ltp/ltp_20200515.bb1
2 files changed, 70 insertions, 0 deletions
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
new file mode 100644
index 0000000000..17d5af89e2
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-sigwaitinfo-Do-not-run-invalid-undefined-test-cases.patch
@@ -0,0 +1,69 @@
1From e0a63deb1857eb90288e90d6368df70cdd0c0ec9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 28 May 2020 13:04:33 -0700
4Subject: [PATCH] sigwaitinfo: Do not run invalid/undefined test cases
5
6These testcases run for eternity on musl
7
8test_bad_address* cases are passing invalid pointers to a function; that's always UB
9empty_set and timeout rely on the implementation-defined "may fail" for EINTR in sigtimedwait [1]
10
11normally "may fail" is an "unspecified" but here the impl
12is supposed to document it so it's "impl-defined"
13
14[1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigtimedwait.html
15
16Upstream-Status: Submitted [https://patchwork.ozlabs.org/project/ltp/patch/20200528204556.2444156-1-raj.khem@gmail.com/]
17Signed-off-by: Khem Raj <raj.khem@gmail.com>
18Cc: Rich Felker <dalias@aerifal.cx>
19---
20 .../kernel/syscalls/sigwaitinfo/sigwaitinfo01.c | 12 ++----------
21 1 file changed, 2 insertions(+), 10 deletions(-)
22
23--- a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
24+++ b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
25@@ -422,15 +422,10 @@ struct test_desc {
26 } tests[] = {
27 #ifdef TEST_RT_SIGTIMEDWAIT
28 {
29- test_empty_set, my_rt_sigtimedwait, SIGUSR1}, {
30 test_unmasked_matching, my_rt_sigtimedwait, SIGUSR1}, {
31 test_masked_matching, my_rt_sigtimedwait, SIGUSR1}, {
32 test_unmasked_matching_noinfo, my_rt_sigtimedwait, SIGUSR1}, {
33- test_masked_matching_noinfo, my_rt_sigtimedwait, SIGUSR1}, {
34- test_bad_address, my_rt_sigtimedwait, SIGUSR1}, {
35- test_bad_address2, my_rt_sigtimedwait, SIGUSR1}, {
36- test_bad_address3, my_rt_sigtimedwait, SIGUSR1}, {
37- test_timeout, my_rt_sigtimedwait, 0},
38+ test_masked_matching_noinfo, my_rt_sigtimedwait, SIGUSR1},
39 /* Special cases */
40 /* 1: sigwaitinfo does respond to ignored signal */
41 {
42@@ -452,25 +447,17 @@ struct test_desc {
43 #endif
44 #if defined TEST_SIGWAITINFO
45 {
46- test_empty_set, my_sigwaitinfo, SIGUSR1}, {
47 test_unmasked_matching, my_sigwaitinfo, SIGUSR1}, {
48 test_masked_matching, my_sigwaitinfo, SIGUSR1}, {
49 test_unmasked_matching_noinfo, my_sigwaitinfo, SIGUSR1}, {
50- test_masked_matching_noinfo, my_sigwaitinfo, SIGUSR1}, {
51- test_bad_address, my_sigwaitinfo, SIGUSR1}, {
52- test_bad_address2, my_sigwaitinfo, SIGUSR1},
53+ test_masked_matching_noinfo, my_sigwaitinfo, SIGUSR1},
54 #endif
55 #if defined TEST_SIGTIMEDWAIT
56 {
57- test_empty_set, my_sigtimedwait, SIGUSR1}, {
58 test_unmasked_matching, my_sigtimedwait, SIGUSR1}, {
59 test_masked_matching, my_sigtimedwait, SIGUSR1}, {
60 test_unmasked_matching_noinfo, my_sigtimedwait, SIGUSR1}, {
61- test_masked_matching_noinfo, my_sigtimedwait, SIGUSR1}, {
62- test_bad_address, my_sigtimedwait, SIGUSR1}, {
63- test_bad_address2, my_sigtimedwait, SIGUSR1}, {
64- test_bad_address3, my_sigtimedwait, SIGUSR1}, {
65- test_timeout, my_sigtimedwait, 0},
66+ test_masked_matching_noinfo, my_sigtimedwait, SIGUSR1},
67 #endif
68 };
69
diff --git a/meta/recipes-extended/ltp/ltp_20200515.bb b/meta/recipes-extended/ltp/ltp_20200515.bb
index 67c7590320..f2510baa68 100644
--- a/meta/recipes-extended/ltp/ltp_20200515.bb
+++ b/meta/recipes-extended/ltp/ltp_20200515.bb
@@ -35,6 +35,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
35 file://0007-Fix-test_proc_kill-hanging.patch \ 35 file://0007-Fix-test_proc_kill-hanging.patch \
36 file://0001-Add-more-musl-exclusions.patch \ 36 file://0001-Add-more-musl-exclusions.patch \
37 file://0001-ptrace01-Fix-missing-format-string.patch \ 37 file://0001-ptrace01-Fix-missing-format-string.patch \
38 file://0001-sigwaitinfo-Do-not-run-invalid-undefined-test-cases.patch \
38 " 39 "
39 40
40S = "${WORKDIR}/git" 41S = "${WORKDIR}/git"