diff options
author | Mattias Andrée <maandree@kth.se> | 2023-12-05 20:10:48 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2023-12-05 20:10:48 +0100 |
commit | 6d77b155bcd4725e09837604e6ea86f5f124ba9c (patch) | |
tree | 7cfdf466bb94bbbe3e7929432bc048da5eaa2349 /tests/is-struct | |
parent | Second commit (diff) | |
download | libsyscalls-6d77b155bcd4725e09837604e6ea86f5f124ba9c.tar.gz libsyscalls-6d77b155bcd4725e09837604e6ea86f5f124ba9c.tar.bz2 libsyscalls-6d77b155bcd4725e09837604e6ea86f5f124ba9c.tar.xz |
Third commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | tests/is-struct | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/is-struct b/tests/is-struct new file mode 100644 index 0000000..310e615 --- /dev/null +++ b/tests/is-struct @@ -0,0 +1,20 @@ +# -*- sh -*- +# See LICENSE file for copyright and license details. + +printf '%s\n' "$types" | grep STRUCT >/dev/null +printf '%s\n' "$types" | grep UNION >/dev/null +structs="$(printf '%s\n' "$types" | grep '\(STRUCT\|UNION\)' | cut -d ' ' -f 1)" +int=$(lookupnum "$types" INT) +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 + continue + fi + ( ! is-datatype-struct.tu $osn $archn $int $os $arch INT ) + for type in $structs; do + is-datatype-struct.tu $osn $archn $type $os $arch 'some struct or union' + done + done +done |