summaryrefslogtreecommitdiffstats
path: root/tests/syscall-ranges
diff options
context:
space:
mode:
Diffstat (limited to 'tests/syscall-ranges')
-rw-r--r--tests/syscall-ranges38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/syscall-ranges b/tests/syscall-ranges
new file mode 100644
index 0000000..e42679a
--- /dev/null
+++ b/tests/syscall-ranges
@@ -0,0 +1,38 @@
+# -*- sh -*-
+# See LICENSE file for copyright and license details.
+
+for os in $(getnamelist OS); do
+ osn=$(getnum OS $os)
+ for arch in $(getnamelist ARCH); do
+ archn=$(getnum ARCH $arch)
+ get-syscall-range.tu $osn $archn $os $arch > $a
+ min="$(sed -n 's/min: //p' < $a)"
+ max="$(sed -n 's/max: //p' < $a)"
+ test -n "$min"
+ test -n "$max"
+ if test $min = x || test $max = x; then
+ (! issupported $os $arch)
+ continue
+ fi
+ issupported $os $arch
+ done
+done
+check_range () {
+ if issupported $1 $2; then
+ osn=$(getnum OS $1)
+ archn=$(getnum ARCH $2)
+ get-syscall-range.tu $osn $archn $1 $2 > $a
+ min="$(sed -n 's/min: //p' < $a)"
+ max="$(sed -n 's/max: //p' < $a)"
+ test $min -le $3
+ test $max -ge $4
+ test -z "$5" || test $min -ge $5
+ fi
+}
+check_range LINUX AMD64 0 453 0
+check_range LINUX AMD64_X32 0 547 0
+check_range LINUX M68K 0 452 0
+check_range LINUX PARISC_32 0 452 0
+check_range LINUX PARISC_64 0 452 0
+check_range LINUX SPARC_32 0 452 0
+check_range LINUX I386 0 452 0