From b19a6de1c4b4c56f195f6394e6505f057366a047 Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Wed, 25 Jun 2025 16:34:18 +0800 Subject: util-linux: replace submitted patches with a merged one The original PR, https://github.com/util-linux/util-linux/pull/3605, was updated. Use the merged patch to avoid any confusion. (From OE-Core rev: ae5a6fe3bb1bb5f42eb653aeccb2d76ab142d6fe) Signed-off-by: Chen Qi Signed-off-by: Richard Purdie --- meta/recipes-core/util-linux/util-linux.inc | 3 +- .../0001-test_sysinfo.c-print-out-SIGRTMIN.patch | 50 ------------------- ...ode-use-RTMIN-from-kill-L-instead-of-hard.patch | 58 ++++++++++++++++++++++ ...ode-use-SIGRTMIN-from-test_sysinfo-instea.patch | 56 --------------------- 4 files changed, 59 insertions(+), 108 deletions(-) delete mode 100644 meta/recipes-core/util-linux/util-linux/0001-test_sysinfo.c-print-out-SIGRTMIN.patch create mode 100644 meta/recipes-core/util-linux/util-linux/0001-ts-kill-decode-use-RTMIN-from-kill-L-instead-of-hard.patch delete mode 100644 meta/recipes-core/util-linux/util-linux/0002-ts-kill-decode-use-SIGRTMIN-from-test_sysinfo-instea.patch diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc index 6611ec0fe7..111f29cb92 100644 --- a/meta/recipes-core/util-linux/util-linux.inc +++ b/meta/recipes-core/util-linux/util-linux.inc @@ -19,8 +19,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-test_sysinfo.c-print-out-SIGRTMIN.patch \ - file://0002-ts-kill-decode-use-SIGRTMIN-from-test_sysinfo-instea.patch \ + file://0001-ts-kill-decode-use-RTMIN-from-kill-L-instead-of-hard.patch \ " SRC_URI[sha256sum] = "81ee93b3cfdfeb7d7c4090cedeba1d7bbce9141fd0b501b686b3fe475ddca4c6" diff --git a/meta/recipes-core/util-linux/util-linux/0001-test_sysinfo.c-print-out-SIGRTMIN.patch b/meta/recipes-core/util-linux/util-linux/0001-test_sysinfo.c-print-out-SIGRTMIN.patch deleted file mode 100644 index ee9f220842..0000000000 --- a/meta/recipes-core/util-linux/util-linux/0001-test_sysinfo.c-print-out-SIGRTMIN.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 50774e34fee0cd528b195a863bcd4e3a04fbfc4b Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Wed, 4 Jun 2025 10:52:18 +0800 -Subject: [PATCH 1/2] test_sysinfo.c: print out SIGRTMIN - -This will be used by ts/kill/decode. - -Upstream-Status: Submitted [https://github.com/util-linux/util-linux/pull/3605] - -Signed-off-by: Chen Qi ---- - tests/helpers/test_sysinfo.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/tests/helpers/test_sysinfo.c b/tests/helpers/test_sysinfo.c -index 1559d471f..3a791e7f1 100644 ---- a/tests/helpers/test_sysinfo.c -+++ b/tests/helpers/test_sysinfo.c -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include - - #include "c.h" - -@@ -116,6 +117,12 @@ static int hlp_ulong_max32(void) - return 0; - } - -+static int hlp_sigrtmin(void) -+{ -+ printf("%d\n", SIGRTMIN); -+ return 0; -+} -+ - static int hlp_wcsspn_ok(void) - { - printf("%d\n", wcsspn(L"FOO", L"F") == 1); -@@ -229,6 +236,7 @@ static const mntHlpfnc hlps[] = - { "ULONG_MAX", hlp_ulong_max }, - { "ULONG_MAX32",hlp_ulong_max32 }, - { "UINT64_MAX", hlp_u64_max }, -+ { "SIGRTMIN", hlp_sigrtmin }, - { "byte-order", hlp_endianness }, - { "wcsspn-ok", hlp_wcsspn_ok }, - { "enotty-ok", hlp_enotty_ok }, --- -2.34.1 - diff --git a/meta/recipes-core/util-linux/util-linux/0001-ts-kill-decode-use-RTMIN-from-kill-L-instead-of-hard.patch b/meta/recipes-core/util-linux/util-linux/0001-ts-kill-decode-use-RTMIN-from-kill-L-instead-of-hard.patch new file mode 100644 index 0000000000..f4e2f9e745 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/0001-ts-kill-decode-use-RTMIN-from-kill-L-instead-of-hard.patch @@ -0,0 +1,58 @@ +From c5d5e8873029d170fcab38a6fbd5d5a355574b9f Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Wed, 4 Jun 2025 16:27:19 +0800 +Subject: [PATCH] ts/kill/decode: use RTMIN from 'kill -L' instead of + hardcoding 34 + +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 + +With the hardcoded 34, test case fails with the following difference: + +-Ignored: HUP QUIT TRAP PIPE ALRM ++Ignored: HUP QUIT TRAP PIPE ALRM 34 + +Extract the value of RTMIN from 'kill -L' to avoid such hardcoding. + +Signed-off-by: Chen Qi + +Upstream-Status: Backport [https://github.com/util-linux/util-linux/commit/c5d5e8873029d170fcab38a6fbd5d5a355574b9f] + +Signed-off-by: Chen Qi +--- + tests/ts/kill/decode | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/tests/ts/kill/decode b/tests/ts/kill/decode +index 57149899e..524b4e5e2 100755 +--- a/tests/ts/kill/decode ++++ b/tests/ts/kill/decode +@@ -53,14 +53,19 @@ 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 ++ SIGRTMIN=$("$TS_CMD_KILL" -L | grep -o '[0-9]\+ RTMIN' | cut -d " " -f 1) ++ if [[ $("$TS_CMD_KILL" --list=$SIGRTMIN) == RT0 ]]; then + # 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‐ + # ternally uses two (for NPTL) or three (for LinuxThreads) real-time sig‐ + # nals (see pthreads(7)), and adjusts the value of SIGRTMIN suitably (to + # 34 or 35). +- sed -e s/' 32 33'// -e s/' 34'// ++ sed_cmd="sed" ++ for ((i=32; i<=SIGRTMIN; i++)); do ++ sed_cmd+=" -e s/' $i'//" ++ done ++ eval $sed_cmd + else + cat + fi +-- +2.34.1 + diff --git a/meta/recipes-core/util-linux/util-linux/0002-ts-kill-decode-use-SIGRTMIN-from-test_sysinfo-instea.patch b/meta/recipes-core/util-linux/util-linux/0002-ts-kill-decode-use-SIGRTMIN-from-test_sysinfo-instea.patch deleted file mode 100644 index 5a00c9037a..0000000000 --- a/meta/recipes-core/util-linux/util-linux/0002-ts-kill-decode-use-SIGRTMIN-from-test_sysinfo-instea.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 9848b0d8c90d9a24275bf402f6d76e97f62b3ba4 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Wed, 4 Jun 2025 16:27:19 +0800 -Subject: [PATCH 2/2] ts/kill/decode: use SIGRTMIN from test_sysinfo instead of - hardcoding 34 - -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 - -With the hardcoded 34, test case fails with the following difference: - --Ignored: HUP QUIT TRAP PIPE ALRM -+Ignored: HUP QUIT TRAP PIPE ALRM 34 - -Use SIGRTMIN got from test_sysinfo to fix this issue. - -Upstream-Status: Submitted [https://github.com/util-linux/util-linux/pull/3605] - -Signed-off-by: Chen Qi ---- - tests/ts/kill/decode | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/tests/ts/kill/decode b/tests/ts/kill/decode -index 03bc25ff6..dd34aacef 100755 ---- a/tests/ts/kill/decode -+++ b/tests/ts/kill/decode -@@ -48,14 +48,19 @@ 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 -+ SIGRTMIN=$($TS_HELPER_SYSINFO SIGRTMIN) -+ if [[ $("$TS_CMD_KILL" --list=$SIGRTMIN) == RT0 ]]; then - # 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‐ - # ternally uses two (for NPTL) or three (for LinuxThreads) real-time sig‐ - # nals (see pthreads(7)), and adjusts the value of SIGRTMIN suitably (to - # 34 or 35). -- sed -e s/' 32 33'// -e s/' 34'// -+ sed_cmd="sed" -+ for ((i=32; i<=SIGRTMIN; i++)); do -+ sed_cmd+=" -e s/' $i'//" -+ done -+ eval $sed_cmd - else - cat - fi --- -2.34.1 - -- cgit v1.2.3-54-g00ecf