mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
tests: kill: check that real-time signals are listed
* tests/misc/kill.sh: Call getlimits_. Check for RTMIN and RTMAX in the output of 'kill -l' if the system defines SIGRTMIN and SIGRTMAX.
This commit is contained in:
1 parent
7e1b4f76d3
commit
d45598f237
1 file changed
+13
@@ -18,6 +18,7 @@
|
||||
|
||||
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
|
||||
print_ver_ kill seq
|
||||
getlimits_
|
||||
|
||||
# params required
|
||||
returns_ 1 env kill || fail=1
|
||||
@@ -71,4 +72,16 @@ env kill -t -- $SIG_SEQ || fail=1
|
||||
# Verify first signal number listed is 0
|
||||
test $(env kill -l $(env kill -l | head -n1)) = 0 || fail=1
|
||||
|
||||
# If the system's signal.h defines SIGRTMIN and SIGRTMAX, assume that real-time
|
||||
# signals are supported.
|
||||
if test $SIGRTMIN -gt 0 && test $SIGRTMAX -gt $SIGRTMIN; then
|
||||
rtmin=$(env kill -l | grep -c '^RTMIN')
|
||||
rtmax=$(env kill -l | grep -c '^RTMAX')
|
||||
# We only check that at least RTMIN and RTMAX are listed in the output.
|
||||
# POSIX states the range of signals between SIGRTMIN and SIGRTMAX are
|
||||
# reserved for real-time signals, but does not require that all signals
|
||||
# in the range are usable.
|
||||
test $rtmin -gt 0 && test $rtmax -gt 0 || fail=1
|
||||
fi
|
||||
|
||||
Exit $fail
|
||||
Reference in new issue
Block a user