diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/archinfo | 17 | ||||
-rw-r--r-- | tests/error-search | 13 | ||||
-rw-r--r-- | tests/load-archinfo | 7 | ||||
-rw-r--r-- | tests/run | 4 | ||||
-rw-r--r-- | tests/signal-search | 13 |
5 files changed, 45 insertions, 9 deletions
diff --git a/tests/archinfo b/tests/archinfo index 5034766..334571e 100644 --- a/tests/archinfo +++ b/tests/archinfo @@ -1,19 +1,22 @@ # -*- sh -*- # See LICENSE file for copyright and license details. -printf '%s\n' "$archinfo" | grep '^AMD64 8 64 64 Little TWOS_COMPLEMENT' >/dev/null -printf '%s\n' "$archinfo" | grep '^AMD64_X32 8 32 32 Little TWOS_COMPLEMENT' >/dev/null -printf '%s\n' "$archinfo" | grep '^M68K 8 32 32 Big TWOS_COMPLEMENT' >/dev/null -printf '%s\n' "$archinfo" | grep '^PARISC_32 8 32 32 Big TWOS_COMPLEMENT' >/dev/null -printf '%s\n' "$archinfo" | grep '^PARISC_64 8 64 64 Big TWOS_COMPLEMENT' >/dev/null -printf '%s\n' "$archinfo" | grep '^SPARC_32 8 32 32 Big TWOS_COMPLEMENT' >/dev/null -printf '%s\n' "$archinfo" | grep '^I386 8 32 32 Little TWOS_COMPLEMENT' >/dev/null +printf '%s\n' "$archinfo" | grep '^AMD64 8 64 64 64 Little TWOS_COMPLEMENT' >/dev/null +printf '%s\n' "$archinfo" | grep '^AMD64_X32 8 32 32 64 Little TWOS_COMPLEMENT' >/dev/null +printf '%s\n' "$archinfo" | grep '^M68K 8 32 32 16 Big TWOS_COMPLEMENT' >/dev/null +printf '%s\n' "$archinfo" | grep '^PARISC_32 8 32 32 64 Big TWOS_COMPLEMENT' >/dev/null +printf '%s\n' "$archinfo" | grep '^PARISC_64 8 64 64 64 Big TWOS_COMPLEMENT' >/dev/null +printf '%s\n' "$archinfo" | grep '^SPARC_32 8 32 32 64 Big TWOS_COMPLEMENT' >/dev/null +printf '%s\n' "$archinfo" | grep '^I386 8 32 32 32 Little TWOS_COMPLEMENT' >/dev/null test $(getbytesize AMD64) = 8 test $(getbytesize I386) = 8 test $(getaddrsize I386) = 32 test $(getaddrsize AMD64) = 64 test $(getsizesize AMD64) = 64 test $(getsizesize I386) = 32 +test $(getintalign I386) = 32 +test $(getintalign AMD64) = 64 +test $(getintalign M68K) = 16 test $(getendian I386) = Little test $(getendian AMD64) = Little test $(getendian M68K) = Big diff --git a/tests/error-search b/tests/error-search new file mode 100644 index 0000000..dd71bd9 --- /dev/null +++ b/tests/error-search @@ -0,0 +1,13 @@ +# -*- 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) + if issupported $os $arch; then + p tests/run test-search.tu errors $osn $archn $os $arch + fi + done + await +done diff --git a/tests/load-archinfo b/tests/load-archinfo index e5413b4..8e6b2a6 100644 --- a/tests/load-archinfo +++ b/tests/load-archinfo @@ -33,9 +33,12 @@ getaddrsize () { getsizesize () { printf '%s\n' "$archinfo" | grep "^$1 " | cut -d ' ' -f 4 } -getendian () { +getintalign () { printf '%s\n' "$archinfo" | grep "^$1 " | cut -d ' ' -f 5 } -getsign () { +getendian () { printf '%s\n' "$archinfo" | grep "^$1 " | cut -d ' ' -f 6 } +getsign () { + printf '%s\n' "$archinfo" | grep "^$1 " | cut -d ' ' -f 7 +} diff --git a/tests/run b/tests/run new file mode 100644 index 0000000..c9bd4b6 --- /dev/null +++ b/tests/run @@ -0,0 +1,4 @@ +# -*- sh -*- +# See LICENSE file for copyright and license details. + +"$@" diff --git a/tests/signal-search b/tests/signal-search new file mode 100644 index 0000000..b4afc49 --- /dev/null +++ b/tests/signal-search @@ -0,0 +1,13 @@ +# -*- 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) + if issupported $os $arch; then + p tests/run test-search.tu signals $osn $archn $os $arch + fi + done + await +done |