mirror of
https://git.yoctoproject.org/poky
synced 2026-04-04 14:02:22 +02:00
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>
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
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
|
||||
};
|
||||
|
||||
@@ -35,6 +35,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
|
||||
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 \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
Reference in New Issue
Block a user