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 <cgoesc2@wgu.edu>
}
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
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"
SIG="$SIG+0"
fi
if [ "x$SIG" = "xRTMAX" ]; then
+ if [ "$ARCH" == "s390x" ] || [ "$is_qemu" == "1" ]; then
+ continue
+ fi
SIG="$SIG-0"
fi