summaryrefslogtreecommitdiffstats
path: root/linux/tests/os-dependent-arrays
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-12-05 20:10:48 +0100
committerMattias Andrée <maandree@kth.se>2023-12-05 20:10:48 +0100
commit6d77b155bcd4725e09837604e6ea86f5f124ba9c (patch)
tree7cfdf466bb94bbbe3e7929432bc048da5eaa2349 /linux/tests/os-dependent-arrays
parentSecond commit (diff)
downloadlibsyscalls-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 'linux/tests/os-dependent-arrays')
-rw-r--r--linux/tests/os-dependent-arrays17
1 files changed, 17 insertions, 0 deletions
diff --git a/linux/tests/os-dependent-arrays b/linux/tests/os-dependent-arrays
new file mode 100644
index 0000000..3140ce4
--- /dev/null
+++ b/linux/tests/os-dependent-arrays
@@ -0,0 +1,17 @@
+# -*- sh -*-
+# See LICENSE file for copyright and license details.
+
+for arch in $(getnamelist ARCH); do
+ archn=$(getnum ARCH $arch)
+ if ! issupported $os $arch; then
+ continue
+ fi
+
+ ptype=ULONG
+ atype=FD_SET
+ get-datatype-description.tu $osn $archn $(lookupnum "$types" $ptype) $os $arch $ptype > $a
+ get-datatype-description.tu $osn $archn $(lookupnum "$types" $atype) $os $arch $atype > $b
+ sed 's/^\(array_size\) = 1$/\1 = '"$(( 1024 / $(sed -n 's/^width_in_bits = //p' < $a) ))"/ < $a \
+ | sed 's/^\(is_unsigned\) = 1/\1 = 0/' \
+ | diff -u - $b
+done