summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ltp
diff options
context:
space:
mode:
authorHe Zhe <zhe.he@windriver.com>2019-09-03 17:28:45 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-06 08:15:45 +0100
commit40afea45e26eec585c2103cfc972642269ead787 (patch)
tree56aef035f902c29755e9af94cb8f9c561aa8b7e1 /meta/recipes-extended/ltp
parentf24aedeff83ea7b36de50985bbe600075a20e2b4 (diff)
downloadpoky-40afea45e26eec585c2103cfc972642269ead787.tar.gz
ltp: syscalls: rt_sigwaitinfo01: Fix failure for MIPS arches
Backport a patch to fix the following failure. rt_sigtimedwait01 1 TFAIL : .../sigwaitinfo01.c:58: test_empty_set (.../sigwaitinfo01.c: 148): Unexpected failure: TEST_ERRNO=EINVAL(22): Invalid argument (From OE-Core rev: 26f9a7401f6379056e0a29f45e3817dee0d56e40) Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/ltp')
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch46
-rw-r--r--meta/recipes-extended/ltp/ltp_20190517.bb1
2 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch b/meta/recipes-extended/ltp/ltp/0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch
new file mode 100644
index 0000000000..0e56c08255
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch
@@ -0,0 +1,46 @@
1From a5046625eaeed2d3fba456c3ba84c6c141c2ad7c Mon Sep 17 00:00:00 2001
2From: He Zhe <zhe.he@windriver.com>
3Date: Thu, 29 Aug 2019 21:09:46 +0800
4Subject: [PATCH] syscall/rt_sigtimedwait01: Fix wrong sigset length for MIPS
5
6rt_sigtimedwait01 fails as follow on MIPS arches
7rt_sigtimedwait01 1 TFAIL : .../sigwaitinfo01.c:58: test_empty_set
8(.../sigwaitinfo01.c: 148): Unexpected failure:
9TEST_ERRNO=EINVAL(22): Invalid argument
10
11As this case purposely bypasses glibc, it should align with the size of kernel
12definition of sigset_t which is different from other arches.
13https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/mips/include/uapi/asm/signal.h#n15
14
15This patch turns to use _NSIG which is always right for all arches.
16
17Upstream-Status: Backport [a5046625eaeed2d3fba456c3ba84c6c141c2ad7c]
18
19Suggested-by: Jan Stancek <jstancek@redhat.com>
20Acked-by: Jan Stancek <jstancek@redhat.com>
21Acked-by: Cyril Hrubis <chrubis@suse.cz>
22Signed-off-by: He Zhe <zhe.he@windriver.com>
23Signed-off-by: Petr Vorel <pvorel@suse.cz>
24---
25 testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c | 5 ++---
26 1 file changed, 2 insertions(+), 3 deletions(-)
27
28diff --git a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
29index 5a32ce1..6a30c27 100644
30--- a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
31+++ b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
32@@ -128,9 +128,8 @@ static int my_sigtimedwait(const sigset_t * set, siginfo_t * info,
33 static int my_rt_sigtimedwait(const sigset_t * set, siginfo_t * info,
34 struct timespec *timeout)
35 {
36-
37- /* The last argument is (number_of_signals)/(bits_per_byte), which are 64 and 8, resp. */
38- return ltp_syscall(__NR_rt_sigtimedwait, set, info, timeout, 8);
39+ /* _NSIG is always the right number of bits of signal map for all arches */
40+ return ltp_syscall(__NR_rt_sigtimedwait, set, info, timeout, _NSIG/8);
41 }
42 #endif
43
44--
452.7.4
46
diff --git a/meta/recipes-extended/ltp/ltp_20190517.bb b/meta/recipes-extended/ltp/ltp_20190517.bb
index 69d75d5bb8..e9a588f496 100644
--- a/meta/recipes-extended/ltp/ltp_20190517.bb
+++ b/meta/recipes-extended/ltp/ltp_20190517.bb
@@ -47,6 +47,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
47 file://0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch \ 47 file://0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch \
48 file://0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch \ 48 file://0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch \
49 file://0001-testcases-use-python3-everywhere-to-run-python-scrip.patch \ 49 file://0001-testcases-use-python3-everywhere-to-run-python-scrip.patch \
50 file://0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch \
50 " 51 "
51 52
52S = "${WORKDIR}/git" 53S = "${WORKDIR}/git"