From 6d77b155bcd4725e09837604e6ea86f5f124ba9c Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 5 Dec 2023 20:10:48 +0100 Subject: Third commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- tests/syscall-ranges | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tests/syscall-ranges (limited to 'tests/syscall-ranges') 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 -- cgit v1.2.3-70-g09d2