From 505decc441b2c42ef2641d9701496af69dbc3363 Mon Sep 17 00:00:00 2001 From: Luis <42945842+ldiaz94@users.noreply.github.com> Date: Fri, 16 Oct 2026 22:13:15 +0100 Subject: [PATCH] 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. --- diff --git a/test/check.sh b/test/check.sh index 9f8bf5c..6d58260 100755 --- a/test/check.sh +++ b/test/check.sh @@ -254,6 +254,18 @@ else pass=$((pass + 1)); fi done +# CAbi is tools/cabi.c's output, from the C library's own headers: +# compiled with cc, and with musl-gcc, each where it is installed, it +# writes lib/'s file again +for cc in cc musl-gcc; do + command -v $cc >/dev/null || continue + if ! $cc -o $out/cabi tools/cabi.c 2>$out/cabi.cerr; then + echo "FAIL tools/cabi.c with $cc: $(cat $out/cabi.cerr)"; fail=$((fail + 1)) + elif ! $out/cabi linux-x86_64 | cmp -s - lib/CAbi.linux-x86_64.raz; then + echo "FAIL tools/cabi.c with $cc: lib/CAbi.linux-x86_64.raz differs"; fail=$((fail + 1)) + else pass=$((pass + 1)); fi +done + # Thread's test again, with too little memory for all its threads: # spawn must fail, with Thread.Failed if (ulimit -v 60000; $out/lib_Thread.linux-x86_64 fail) > /dev/null 2>&1; then pass=$((pass + 1))