util-linux: fix ptest failure for musl
PATCH 1/1 util-linux: fix ptest failure for musl
From: Chen Qi <[email protected]>
The kill/decode test case fails for musl. The root cause is the test case only considers glibc and uses 34 as SIGRTMIN while musl uses 35. Add a patch to fix this issue.
--- meta/recipes-core/util-linux/util-linux.inc | 1 + .../0001-ts-kill-decode-fix-for-musl.patch | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 meta/recipes-core/util-linux/util-linux/0001-ts-kill-decode-fix-for-musl.patch
meta/recipes-core/util-linux/util-linux.inc +1 -0
@@ -42,6 +42,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin file://fcntl-lock.c \ file://0001-tests-ts-kill-decode-avoid-using-shell-built-in-kill.patch \ file://0001-lsfd-mkfds-foreign-sockets-skip-when-lacking-sock_di.patch \ + file://0001-ts-kill-decode-fix-for-musl.patch \ " SRC_URI[sha256sum] = "81ee93b3cfdfeb7d7c4090cedeba1d7bbce9141fd0b501b686b3fe475ddca4c6"
meta/recipes-core/util-linux/util-linux/0001-ts-kill-decode-fix-for-musl.patch new file +43 -0
43 lines not on this page · raw message
Signature · 1 line
2.34.1
Quoted 58 lines · Chen Qi via lists.openembedded.org
From: Chen Qi <[email protected]>
The kill/decode test case fails for musl. The root cause is the test case only considers glibc and uses 34 as SIGRTMIN while musl uses 35. Add a patch to fix this issue.
Signed-off-by Chen Qi <[email protected]>--- meta/recipes-core/util-linux/util-linux.inc | 1 + .../0001-ts-kill-decode-fix-for-musl.patch | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+)create mode 100644
meta/recipes-core/util-linux/util-linux/0001-ts-kill-decode-fix-for-musl.patchmeta/recipes-core/util-linux/util-linux.inc +1
-0@@ -42,6 +42,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin file://fcntl-lock.c \ file://0001-tests-ts-kill-decode-avoid-using-shell-built-in-kill.patch \ file://0001-lsfd-mkfds-foreign-sockets-skip-when-lacking-sock_di.patch \ + file://0001-ts-kill-decode-fix-for-musl.patch \ " SRC_URI[sha256sum] = "81ee93b3cfdfeb7d7c4090cedeba1d7bbce9141fd0b501b686b3fe475ddca4c6"meta/recipes-core/util-linux/util-linux/0001-ts-kill-decode-fix-for-musl.patch new file +27
-0@@ -0,0 +1,43 @@ +From e6b6e401b0046a524e2e3e3db66f1b85b06fa2d4 Mon Sep 17 00:00:00 2001 +From: Chen Qi <[email protected]> +Date: Tue, 3 Jun 2025 13:18:36 +0800 +Subject: [PATCH] ts/kill/decode: fix for musl + +glibc uses 34 as the value of SIGRTMIN: +https://sourceware.org/git/?p=glibc.git;a=blob;f=signal/allocrtsig.c;h=8ed8e37dd6c41f94be6eef042ce9db1af1153228;hb=HEAD#l27 +""" +static int current_rtmin = __SIGRTMIN + RESERVED_SIGRT; +""" + +musl uses 35 as the value of SIGRTMIN: +https://git.musl-libc.org/cgit/musl/tree/src/signal/sigrtmin.c + +Adjust the test case to cope with musl. Otherwise, it fails with +the following difference: + + -Ignored: HUP QUIT TRAP PIPE ALRM + +Ignored: HUP QUIT TRAP PIPE ALRM 34 + +Upstream-Status: Submitted [https://github.com/util-linux/util-linux/pull/3605] + +Signed-off-by: Chen Qi <[email protected]> +--- + tests/ts/kill/decode | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) +
meta/recipes-core/util-linux/util-linux/0001-ts-kill-decode-fix-for-musl.patch line 37
Quoted 10 lines
meta/recipes-core/util-linux/util-linux/0001-ts-kill-decode-fix-for-musl.patch new file +10
-0+diff --git a/tests/ts/kill/decode b/tests/ts/kill/decode +index 57149899e..f17ea36e2 100755 +--- a/tests/ts/kill/decode ++++ b/tests/ts/kill/decode +@@ -53,7 +53,7 @@ ACK= + # Sending one more USR1 is for making the signal pending state. + "$TS_CMD_KILL" -USR1 "$PID" + "$TS_CMD_KILL" -d "$PID" | { +- if [[ $("$TS_CMD_KILL" --list=34) == RT0 ]]; then ++ if [[ $("$TS_CMD_KILL" --list=34) == RT0 || $("$TS_CMD_KILL" --list=35) == RT0 ]]; then
hardcoding these values are perhaps not ideal. Maybe using SIGRTMIN here could make it work across platforms.
Quoted 17 lines
meta/recipes-core/util-linux/util-linux/0001-ts-kill-decode-fix-for-musl.patch new file +6
-1+ # See man signal(7). + # The Linux kernel supports a range of 33 different real-time signals, + # numbered 32 to 64. However, the glibc POSIX threads implementation in‐ +-- +2.34.1 + -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#217761): https://lists.openembedded.org/g/openembedded-core/message/217761
Mute This Topic: https://lists.openembedded.org/mt/113443532/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
I'll update PR and send out V2.
Regards,
Qi
Quoted 100 lines · Khem Raj
Quoted 71 lines · Chen Qi via lists.openembedded.org
From: Chen Qi <[email protected]>
The kill/decode test case fails for musl. The root cause is the test case only considers glibc and uses 34 as SIGRTMIN while musl uses 35. Add a patch to fix this issue.
Signed-off-by Chen Qi <[email protected]>---
meta/recipes-core/util-linux/util-linux.inc | 1 + .../0001-ts-kill-decode-fix-for-musl.patch | 43 +++++++++++++++++++2 files changed, 44 insertions(+)create mode 100644
meta/recipes-core/util-linux/util-linux/0001-ts-kill-decode-fix-for-musl.patchmeta/recipes-core/util-linux/util-linux.inc +0
-0@@ -42,6 +42,7 @@ SRC_URI ="${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin file://fcntl-lock.c \
file://0001-tests-ts-kill-decode-avoid-using-shell-built-in-kill.patch \
file://0001-lsfd-mkfds-foreign-sockets-skip-when-lacking-sock_di.patch \
+ file://0001-ts-kill-decode-fix-for-musl.patch \
"
SRC_URI[sha256sum] = "81ee93b3cfdfeb7d7c4090cedeba1d7bbce9141fd0b501b686b3fe475ddca4c6"meta/recipes-core/util-linux/util-linux/0001-ts-kill-decode-fix-for-musl.patch +0
-0new file mode 100644
index 0000000000..efdd019cda
---/dev/null
+++b/meta/recipes-core/util-linux/util-linux/0001-ts-kill-decode-fix-for-musl.patchmeta/recipes-core/util-linux/util-linux/0001-ts-kill-decode-fix-for-musl.patch +21
-0@@ -0,0 +1,43 @@ +From e6b6e401b0046a524e2e3e3db66f1b85b06fa2d4 Mon Sep 17 00:00:00 2001 +From: Chen Qi <[email protected]> +Date: Tue, 3 Jun 2025 13:18:36 +0800 +Subject: [PATCH] ts/kill/decode: fix for musl + +glibc uses 34 as the value of SIGRTMIN: +https://sourceware.org/git/?p=glibc.git;a=blob;f=signal/allocrtsig.c;h=8ed8e37dd6c41f94be6eef042ce9db1af1153228;hb=HEAD#l27 +""" +static int current_rtmin = __SIGRTMIN + RESERVED_SIGRT; +""" + +musl uses 35 as the value of SIGRTMIN: +https://git.musl-libc.org/cgit/musl/tree/src/signal/sigrtmin.c + +Adjust the test case to cope with musl. Otherwise, it fails with +the following difference: + + -Ignored: HUP QUIT TRAP PIPE ALRM + +Ignored: HUP QUIT TRAP PIPE ALRM 34 + +Upstream-Status: Submitted[https://github.com/util-linux/util-linux/pull/3605]
meta/recipes-core/util-linux/util-linux/0001-ts-kill-decode-fix-for-musl.patch +12
-0+ +Signed-off-by: Chen Qi <[email protected]> +--- + tests/ts/kill/decode | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/ts/kill/decode b/tests/ts/kill/decode +index 57149899e..f17ea36e2 100755 +--- a/tests/ts/kill/decode ++++ b/tests/ts/kill/decode +@@ -53,7 +53,7 @@ ACK= + # Sending one more USR1 is for making the signal pendingstate.
+ "$TS_CMD_KILL" -USR1 "$PID"
+ "$TS_CMD_KILL" -d "$PID" | {Quoted 3 lines
+- if [[ $("$TS_CMD_KILL" --list=34) == RT0 ]]; then ++ if [[ $("$TS_CMD_KILL" --list=34) == RT0 ||$("$TS_CMD_KILL" --list=35) == RT0 ]]; then
hardcoding these values are perhaps not ideal. Maybe using SIGRTMIN here could make it work across platforms.
Quoted 19 lines
+ # See man signal(7).
+ # The Linux kernel supports a range of 33 different real-time signals,
+ # numbered 32 to 64. However, the glibc POSIX threads implementation in‐
+--
+2.34.1
+-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#217761): https://lists.openembedded.org/g/openembedded-core/message/217761
Mute This Topic: https://lists.openembedded.org/mt/113443532/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-