]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/blob
5a00c9037a3f9f7978957f9ec1c58e926c773428
[thirdparty/openembedded/openembedded-core-contrib.git] /
1 From 9848b0d8c90d9a24275bf402f6d76e97f62b3ba4 Mon Sep 17 00:00:00 2001
2 From: Chen Qi <Qi.Chen@windriver.com>
3 Date: Wed, 4 Jun 2025 16:27:19 +0800
4 Subject: [PATCH 2/2] ts/kill/decode: use SIGRTMIN from test_sysinfo instead of
5 hardcoding 34
6
7 glibc uses 34 as the value of SIGRTMIN:
8 https://sourceware.org/git/?p=glibc.git;a=blob;f=signal/allocrtsig.c;h=8ed8e37dd6c41f94be6eef042ce9db1af1153228;hb=HEAD#l27 """
9 static int current_rtmin = __SIGRTMIN + RESERVED_SIGRT; """
10
11 musl uses 35 as the value of SIGRTMIN:
12 https://git.musl-libc.org/cgit/musl/tree/src/signal/sigrtmin.c
13
14 With the hardcoded 34, test case fails with the following difference:
15
16 -Ignored: HUP QUIT TRAP PIPE ALRM
17 +Ignored: HUP QUIT TRAP PIPE ALRM 34
18
19 Use SIGRTMIN got from test_sysinfo to fix this issue.
20
21 Upstream-Status: Submitted [https://github.com/util-linux/util-linux/pull/3605]
22
23 Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
24 ---
25 tests/ts/kill/decode | 9 +++++++--
26 1 file changed, 7 insertions(+), 2 deletions(-)
27
28 diff --git a/tests/ts/kill/decode b/tests/ts/kill/decode
29 index 03bc25ff6..dd34aacef 100755
30 --- a/tests/ts/kill/decode
31 +++ b/tests/ts/kill/decode
32 @@ -48,14 +48,19 @@ ACK=
33 # Sending one more USR1 is for making the signal pending state.
34 "$TS_CMD_KILL" -USR1 "$PID"
35 "$TS_CMD_KILL" -d "$PID" | {
36 - if [[ $("$TS_CMD_KILL" --list=34) == RT0 ]]; then
37 + SIGRTMIN=$($TS_HELPER_SYSINFO SIGRTMIN)
38 + if [[ $("$TS_CMD_KILL" --list=$SIGRTMIN) == RT0 ]]; then
39 # See man signal(7).
40 # The Linux kernel supports a range of 33 different real-time signals,
41 # numbered 32 to 64. However, the glibc POSIX threads implementation in‐
42 # ternally uses two (for NPTL) or three (for LinuxThreads) real-time sig‐
43 # nals (see pthreads(7)), and adjusts the value of SIGRTMIN suitably (to
44 # 34 or 35).
45 - sed -e s/' 32 33'// -e s/' 34'//
46 + sed_cmd="sed"
47 + for ((i=32; i<=SIGRTMIN; i++)); do
48 + sed_cmd+=" -e s/' $i'//"
49 + done
50 + eval $sed_cmd
51 else
52 cat
53 fi
54 --
55 2.34.1
56