diff options
Diffstat (limited to '')
-rw-r--r-- | tests/signals | 13 | ||||
-rw-r--r-- | tests/syscall-errors | 13 |
2 files changed, 8 insertions, 18 deletions
diff --git a/tests/signals b/tests/signals index 733baa4..f2fdb80 100644 --- a/tests/signals +++ b/tests/signals @@ -8,21 +8,17 @@ for os in $(getnamelist OS); do get-signals.tu $osn $archn $os $arch > $a if issupported $os $arch; then (! test "$(cat $a)" = x) - grep -v '^[0-9]\{1,\} -' >/dev/null < $a - grep -v '^-' < $a > $b - grep '^\([0-9]\{1,\}\) \1 ' < $a | diff -u $a - if test "$os" = LINUX; then - signed=1 - 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)" + grep '^[0-9]\{1,\} [A-Z0-9_+]\{1,\}$' >/dev/null < $a + test -z "$(grep -v '^[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,1\}[0-9]\{1,\} [0-9]\{1,\} '"$req"\$ >/dev/null < $a + grep '^[+-]\{0,1\}[0-9]\{1,\} '"$req"\$ >/dev/null < $a done - cut -d ' ' -f $(( 2 - signed )) < $a > $b && sort -n < $b | diff -u $b - + cut -d ' ' -f 1 < $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 '\033[33m%s\033[m\n' "Maybe new signals have been added for $os on $arch" @@ -37,7 +33,6 @@ for os in $(getnamelist OS); do fi test -z "$(cut -d ' ' -f 1 < $a | sort | uniq -d)" test -z "$(cut -d ' ' -f 2 < $a | sort | uniq -d)" - test -z "$(cut -d ' ' -f 3 < $a | sort | uniq -d)" done done test -f testcases/signals-LINUX-AMD64 diff --git a/tests/syscall-errors b/tests/syscall-errors index 4608fe7..9e04f1f 100644 --- a/tests/syscall-errors +++ b/tests/syscall-errors @@ -8,21 +8,17 @@ for os in $(getnamelist OS); do get-syscall-errors.tu $osn $archn $os $arch > $a if issupported $os $arch; then (! test "$(cat $a)" = x) - grep -v '^[0-9]\{1,\} -' >/dev/null < $a - grep -v '^-' < $a > $b - grep '^\([0-9]\{1,\}\) \1 ' < $a | diff -u $a - if test "$os" = LINUX; then - signed=1 - 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)" + grep '^[0-9]\{1,\} [A-Z0-9_]\{1,\}$' >/dev/null < $a + test -z "$(grep -v '^[0-9]\{1,\} [A-Z0-9_]\{1,\}$' < $a)" required="ERESTARTSYS ERESTARTNOINTR ERESTARTNOHAND ERESTART_RESTARTBLOCK EPERM ENOENT EDOM ELOOP" else continue; fi for req in $required; do - grep '^-\{0,1\}[0-9]\{1,\} [0-9]\{1,\} '"$req"\$ >/dev/null < $a + grep '^[+-]\{0,1\}[0-9]\{1,\} '"$req"\$ >/dev/null < $a done - cut -d ' ' -f $(( 2 - signed )) < $a > $b && sort -n < $b | diff -u $b - + cut -d ' ' -f 1 < $a > $b && sort -n < $b | diff -u $b - if test -f testcases/errors-$os-$arch; then if ! diff -u testcases/errors-$os-$arch $a; then printf '\033[33m%s\033[m\n' "Maybe new errors have been added for $os on $arch" @@ -37,7 +33,6 @@ for os in $(getnamelist OS); do fi test -z "$(cut -d ' ' -f 1 < $a | sort | uniq -d)" test -z "$(cut -d ' ' -f 2 < $a | sort | uniq -d)" - test -z "$(cut -d ' ' -f 3 < $a | sort | uniq -d)" done done test -f testcases/errors-LINUX-AMD64 |