* [LTP] [PATCH 0/3] Port rt_tgsigqueueinfo01 to musl
@ 2024-11-14 23:48 Petr Vorel
2024-11-14 23:48 ` [LTP] [PATCH 1/3] rt_tgsigqueueinfo01: Use siginfo_t portable members Petr Vorel
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Petr Vorel @ 2024-11-14 23:48 UTC (permalink / raw)
To: ltp
Petr Vorel (3):
rt_tgsigqueueinfo01: Use siginfo_t portable members
rt_tgsigqueueinfo01: Convert doc to docparse
ci/alpine.sh: Update list of incompatible tests
ci/alpine.sh | 3 +--
.../rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c | 22 +++++++------------
2 files changed, 9 insertions(+), 16 deletions(-)
--
2.45.2
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH 1/3] rt_tgsigqueueinfo01: Use siginfo_t portable members
2024-11-14 23:48 [LTP] [PATCH 0/3] Port rt_tgsigqueueinfo01 to musl Petr Vorel
@ 2024-11-14 23:48 ` Petr Vorel
2024-11-29 12:33 ` Cyril Hrubis
2024-12-02 6:18 ` Jan Stancek
2024-11-14 23:48 ` [LTP] [PATCH 2/3] rt_tgsigqueueinfo01: Convert doc to docparse Petr Vorel
2024-11-14 23:48 ` [LTP] [PATCH 3/3] ci/alpine.sh: Update list of incompatible tests Petr Vorel
2 siblings, 2 replies; 7+ messages in thread
From: Petr Vorel @ 2024-11-14 23:48 UTC (permalink / raw)
To: ltp
POSIX API for siginfo_t expect simple struct members (see man
sigaction(2)). Most of the implementations (including glibc, uclibc,
musl, bionic) combine many fields into union due optimisation. To
achieve POSIX API compatibility implementations provide definitions
to access members.
Depending on glibc/uclibc specific internal implementation was wrong.
eea3ba496b attempt to add bionic support. To get musl (or whatever libc)
support do what should have been done from the beginning: use portable
members.
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
.../rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/testcases/kernel/syscalls/rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c b/testcases/kernel/syscalls/rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c
index bee6a62713..2f603be945 100644
--- a/testcases/kernel/syscalls/rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c
+++ b/testcases/kernel/syscalls/rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c
@@ -25,12 +25,6 @@
#include "tst_test.h"
#include "lapi/syscalls.h"
-#ifndef __ANDROID__
-#define SI_SIGVAL si_sigval
-#else
-#define SI_SIGVAL _sigval
-#endif
-
static char sigval_send[] = "rt_tgsigqueueinfo data";
static volatile int signum_rcv;
static char *sigval_rcv;
@@ -39,7 +33,7 @@ static void sigusr1_handler(int signum, siginfo_t *uinfo,
void *p LTP_ATTRIBUTE_UNUSED)
{
signum_rcv = signum;
- sigval_rcv = uinfo->_sifields._rt.SI_SIGVAL.sival_ptr;
+ sigval_rcv = uinfo->si_ptr;
}
void *send_rcv_func(void *arg)
@@ -51,7 +45,7 @@ void *send_rcv_func(void *arg)
uinfo.si_errno = 0;
uinfo.si_code = SI_QUEUE;
- uinfo._sifields._rt.SI_SIGVAL.sival_ptr = sigval_send;
+ uinfo.si_ptr = sigval_send;
TEST(tst_syscall(__NR_rt_tgsigqueueinfo, getpid(),
syscall(__NR_gettid), SIGUSR1, &uinfo));
@@ -113,7 +107,7 @@ static void verify_signal_parent_thread(void)
uinfo.si_errno = 0;
uinfo.si_code = SI_QUEUE;
- uinfo._sifields._rt.SI_SIGVAL.sival_ptr = sigval_send;
+ uinfo.si_ptr = sigval_send;
TEST(tst_syscall(__NR_rt_tgsigqueueinfo, getpid(),
tid, SIGUSR1, &uinfo));
@@ -130,7 +124,7 @@ void *sender_func(void *arg)
uinfo.si_errno = 0;
uinfo.si_code = SI_QUEUE;
- uinfo._sifields._rt.SI_SIGVAL.sival_ptr = sigval_send;
+ uinfo.si_ptr = sigval_send;
TEST(tst_syscall(__NR_rt_tgsigqueueinfo, getpid(),
*tid, SIGUSR1, &uinfo));
--
2.45.2
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [LTP] [PATCH 2/3] rt_tgsigqueueinfo01: Convert doc to docparse
2024-11-14 23:48 [LTP] [PATCH 0/3] Port rt_tgsigqueueinfo01 to musl Petr Vorel
2024-11-14 23:48 ` [LTP] [PATCH 1/3] rt_tgsigqueueinfo01: Use siginfo_t portable members Petr Vorel
@ 2024-11-14 23:48 ` Petr Vorel
2024-11-14 23:48 ` [LTP] [PATCH 3/3] ci/alpine.sh: Update list of incompatible tests Petr Vorel
2 siblings, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2024-11-14 23:48 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
.../syscalls/rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/testcases/kernel/syscalls/rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c b/testcases/kernel/syscalls/rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c
index 2f603be945..9e45f35f78 100644
--- a/testcases/kernel/syscalls/rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c
+++ b/testcases/kernel/syscalls/rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c
@@ -1,17 +1,17 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (c) 2019 Linaro Limited. All rights reserved.
+ * Copyright (c) Linux Test Project, 2019-2024
* Author: Sumit Garg <sumit.garg@linaro.org>
*/
-/*
- * Test rt_tgsigqueueinfo
- *
- * This tests the rt_tgsigqueueinfo() syscall. It sends the signal and data
+/*\
+ * Basic test for rt_tgsigqueueinfo(2) syscall. It sends the signal and data
* to the single thread specified by the combination of tgid, a thread group
* ID, and tid, a thread in that thread group.
*
* Also this implement 3 tests differing on the basis of signal sender:
+ *
* - Sender and receiver is the same thread.
* - Sender is parent of the thread.
* - Sender is different thread.
--
2.45.2
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [LTP] [PATCH 3/3] ci/alpine.sh: Update list of incompatible tests
2024-11-14 23:48 [LTP] [PATCH 0/3] Port rt_tgsigqueueinfo01 to musl Petr Vorel
2024-11-14 23:48 ` [LTP] [PATCH 1/3] rt_tgsigqueueinfo01: Use siginfo_t portable members Petr Vorel
2024-11-14 23:48 ` [LTP] [PATCH 2/3] rt_tgsigqueueinfo01: Convert doc to docparse Petr Vorel
@ 2024-11-14 23:48 ` Petr Vorel
2 siblings, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2024-11-14 23:48 UTC (permalink / raw)
To: ltp
rt_tgsigqueueinfo01.c has been ported in previous commit.
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
ci/alpine.sh | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ci/alpine.sh b/ci/alpine.sh
index d2495c3895..2803cf9ffc 100755
--- a/ci/alpine.sh
+++ b/ci/alpine.sh
@@ -1,6 +1,6 @@
#!/bin/sh -eux
# SPDX-License-Identifier: GPL-2.0-or-later
-# Copyright (c) 2019-2022 Petr Vorel <petr.vorel@gmail.com>
+# Copyright (c) 2019-2024 Petr Vorel <petr.vorel@gmail.com>
apk update
@@ -34,7 +34,6 @@ echo "WARNING: remove unsupported tests (until they're fixed)"
cd $(dirname $0)/..
rm -rfv \
testcases/kernel/syscalls/fmtmsg/fmtmsg01.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
--
2.45.2
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH 1/3] rt_tgsigqueueinfo01: Use siginfo_t portable members
2024-11-14 23:48 ` [LTP] [PATCH 1/3] rt_tgsigqueueinfo01: Use siginfo_t portable members Petr Vorel
@ 2024-11-29 12:33 ` Cyril Hrubis
2024-12-03 13:47 ` Petr Vorel
2024-12-02 6:18 ` Jan Stancek
1 sibling, 1 reply; 7+ messages in thread
From: Cyril Hrubis @ 2024-11-29 12:33 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp
Hi!
Looks good to me, for the whole patchset:
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH 1/3] rt_tgsigqueueinfo01: Use siginfo_t portable members
2024-11-14 23:48 ` [LTP] [PATCH 1/3] rt_tgsigqueueinfo01: Use siginfo_t portable members Petr Vorel
2024-11-29 12:33 ` Cyril Hrubis
@ 2024-12-02 6:18 ` Jan Stancek
1 sibling, 0 replies; 7+ messages in thread
From: Jan Stancek @ 2024-12-02 6:18 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp
On Fri, Nov 15, 2024 at 12:48 AM Petr Vorel <petr.vorel@gmail.com> wrote:
>
> POSIX API for siginfo_t expect simple struct members (see man
> sigaction(2)). Most of the implementations (including glibc, uclibc,
> musl, bionic) combine many fields into union due optimisation. To
> achieve POSIX API compatibility implementations provide definitions
> to access members.
>
> Depending on glibc/uclibc specific internal implementation was wrong.
> eea3ba496b attempt to add bionic support. To get musl (or whatever libc)
> support do what should have been done from the beginning: use portable
> members.
>
> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Acked-by: Jan Stancek <jstancek@redhat.com>
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH 1/3] rt_tgsigqueueinfo01: Use siginfo_t portable members
2024-11-29 12:33 ` Cyril Hrubis
@ 2024-12-03 13:47 ` Petr Vorel
0 siblings, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2024-12-03 13:47 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Hi Cyril, Jan,
> Hi!
> Looks good to me, for the whole patchset:
merged. Thanks for your review!
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-12-03 13:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-14 23:48 [LTP] [PATCH 0/3] Port rt_tgsigqueueinfo01 to musl Petr Vorel
2024-11-14 23:48 ` [LTP] [PATCH 1/3] rt_tgsigqueueinfo01: Use siginfo_t portable members Petr Vorel
2024-11-29 12:33 ` Cyril Hrubis
2024-12-03 13:47 ` Petr Vorel
2024-12-02 6:18 ` Jan Stancek
2024-11-14 23:48 ` [LTP] [PATCH 2/3] rt_tgsigqueueinfo01: Convert doc to docparse Petr Vorel
2024-11-14 23:48 ` [LTP] [PATCH 3/3] ci/alpine.sh: Update list of incompatible tests Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox