raz / commit 505decc4

commit
505decc441b2c42ef2641d9701496af69dbc3363
author
Luis <42945842+ldiaz94@users.noreply.github.com>
date
parent
e1dff012
check: tools/cabi.c, with cc and musl-gcc, writes lib/'s CAbi again

Where each is installed, make check compiles tools/cabi.c and compares
its output with lib/CAbi.linux-x86_64.raz, so that one file is known
to serve glibc and musl alike.

patch · log

1 file changed, +12 -0

test/check.sh (history) modified +12 -0

@@ -254,6 +254,18 @@
254254 else pass=$((pass + 1)); fi
255255 done
256256
257+# CAbi is tools/cabi.c's output, from the C library's own headers:
258+# compiled with cc, and with musl-gcc, each where it is installed, it
259+# writes lib/'s file again
260+for cc in cc musl-gcc; do
261+ command -v $cc >/dev/null || continue
262+ if ! $cc -o $out/cabi tools/cabi.c 2>$out/cabi.cerr; then
263+ echo "FAIL tools/cabi.c with $cc: $(cat $out/cabi.cerr)"; fail=$((fail + 1))
264+ elif ! $out/cabi linux-x86_64 | cmp -s - lib/CAbi.linux-x86_64.raz; then
265+ echo "FAIL tools/cabi.c with $cc: lib/CAbi.linux-x86_64.raz differs"; fail=$((fail + 1))
266+ else pass=$((pass + 1)); fi
267+done
268+
257269 # Thread's test again, with too little memory for all its threads:
258270 # spawn must fail, with Thread.Failed
259271 if (ulimit -v 60000; $out/lib_Thread.linux-x86_64 fail) > /dev/null 2>&1; then pass=$((pass + 1))