From: Christian Goeschel Ndjomouo Date: Sat, 4 Apr 2026 18:29:55 +0000 (-0400) Subject: tests: skip SIGRTMAX check on s390x/QEMU X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a24589a0734e20dc4c27604fdebfa51c3e19c029;p=thirdparty%2Futil-linux.git tests: skip SIGRTMAX check on s390x/QEMU The CI fails the kill/name_to_number test when SIGRTMAX-0 (64) is checked for s390x packaging. Although SIGRTMAX is a valid signal number, kill(2) still returns EINVAL. This seems to be related to the fact that QEMU reserves a signal number from the high real-time signal range for internal usage, which limits the maximum real-time signal number range. We already check for the QEMU_USER environment variable, let us also check if the QEMU emulator is mapped in memory for PID 1 to get more reliable information. In addition to that lets skip RTMAX checks on s390x and QEMU emulated environments. Signed-off-by: Christian Goeschel Ndjomouo --- diff --git a/tests/functions.sh b/tests/functions.sh index 4a00463a8..2569a5877 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -176,11 +176,20 @@ function ts_skip_capability { } function ts_skip_qemu_user { - if [ "$QEMU_USER" == "1" ]; then + if [ "$QEMU_USER" == "1" ] || grep -q 'qemu-' /proc/1/smaps &>/dev/null; then ts_skip "running under qemu-user emulation" fi } +function ts_runs_on_qemu { + if [ "$QEMU_USER" == "1" ] || grep -q 'qemu-' /proc/1/smaps &>/dev/null; then + echo 1 + return + fi + echo 0 + return +} + function ts_failed_subtest { local msg="FAILED" local ret=1 diff --git a/tests/ts/kill/name_to_number b/tests/ts/kill/name_to_number index 955d861ec..7a8ad587f 100755 --- a/tests/ts/kill/name_to_number +++ b/tests/ts/kill/name_to_number @@ -27,7 +27,8 @@ ts_check_test_command "$TS_CMD_KILL" ts_check_test_command "$TS_HELPER_SIGRECEIVE" # SIGRTMAX-0 and SIGRTMAX-1 are not usable under QEMU -ts_skip_qemu_user +is_qemu=$(ts_runs_on_qemu) +ARCH="$(uname -m)" . "$TS_SELF/kill_functions.sh" @@ -51,6 +52,9 @@ for SIG in $($TS_CMD_KILL -L); do SIG="$SIG+0" fi if [ "x$SIG" = "xRTMAX" ]; then + if [ "$ARCH" == "s390x" ] || [ "$is_qemu" == "1" ]; then + continue + fi SIG="$SIG-0" fi