summaryrefslogtreecommitdiffstats
path: root/tests/signals
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-12-07 22:51:52 +0100
committerMattias Andrée <maandree@kth.se>2023-12-07 22:51:52 +0100
commit9f449569df9c94670f51fd8cd5558b66884cd877 (patch)
tree21d3c31e22b2cd0544351584c8614e70b66826e4 /tests/signals
parentFourth commit (diff)
downloadlibsyscalls-9f449569df9c94670f51fd8cd5558b66884cd877.tar.gz
libsyscalls-9f449569df9c94670f51fd8cd5558b66884cd877.tar.bz2
libsyscalls-9f449569df9c94670f51fd8cd5558b66884cd877.tar.xz
Improve portability
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'tests/signals')
-rw-r--r--tests/signals12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/signals b/tests/signals
index 7e58621..4052402 100644
--- a/tests/signals
+++ b/tests/signals
@@ -6,26 +6,26 @@ for os in $(getnamelist OS); do
for arch in $(getnamelist ARCH); do
archn=$(getnum ARCH $arch)
get-signals.tu $osn $archn $os $arch > $a
- grep -v '^[0-9]\+ -' >/dev/null < $a
+ grep -v '^[0-9]\{1,\} -' >/dev/null < $a
grep -v '^-' < $a > $b
- grep '^\([0-9]\+\) \1 ' < $a | diff -u $a -
+ grep '^\([0-9]\{1,\}\) \1 ' < $a | diff -u $a -
if issupported $os $arch; then
(! test "$(cat $a)" = x)
if test "$os" = LINUX; then
signed=1
- grep '^[0-9]\+ [0-9]\+ [A-Z0-9_+]\+$' >/dev/null < $a
- test -z "$(grep -v '^[0-9]\+ [0-9]\+ [A-Z0-9_+]\+$' < $a)"
+ grep '^[0-9]\{1,\} [0-9]\{1,\} [A-Z0-9_+]\{1,\}$' >/dev/null < $a
+ test -z "$(grep -v '^[0-9]\{1,\} [0-9]\{1,\} [A-Z0-9_+]\{1,\}$' < $a)"
required="SIGKILL SIGTERM SIGCONT SIGSTOP SIGHUP _SIGRTMIN _SIGRTMIN+8"
else
continue;
fi
for req in $required; do
- grep '^-\?[0-9]\+ [0-9]\+ '"$req"\$ >/dev/null < $a
+ grep '^-\{0,1\}[0-9]\{1,\} [0-9]\{1,\} '"$req"\$ >/dev/null < $a
done
cut -d ' ' -f $(( 2 - signed )) < $a > $b && sort -n < $b | diff -u $b -
if test -f testcases/signals-$os-$arch; then
if ! diff -u testcases/signals-$os-$arch $a; then
- printf '\x1b[33m%s\x1b[m\n' "Maybe new signals have been added for $os on $arch"
+ printf '\033[33m%s\033[m\n' "Maybe new signals have been added for $os on $arch"
exit 1
fi
fi