summaryrefslogtreecommitdiffstats
path: root/tests/syscall-ranges
blob: e42679ab0fc89c79c1f8e7fcbfa8e2537ad47c81 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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