Re: [PATCH] check-uapi: avoid truncating the failure count in the exit status
From: Nathan Chancellor
Date: Wed Nov 11 2026 - 01:26:42 EST
> check_uapi_files() returns the number of failed header checks as its
> status. Bash truncates this to eight bits, so 256 failed checks return
> zero. run() then treats the ABI check as successful. With -q, the error
> diagnostics are hidden as well.
>
> Return a boolean status instead, while keeping the full failure count
> in the existing summary.
>
> Tested the complete CLI with fixture Git trees containing 0, 1, 255,
> 256, 257 and 512 removed headers, plus -j 1 and -q. The 256- and
> 512-failure cases now exit 1 instead of 0.
>
> AI assistance: ChatGPT/Codex identified the issue and prepared the
> change, commit message and executable regression tests.
>
> Fixes: 1f7f31bf7202 ("check-uapi: Introduce check-uapi.sh")
> Signed-off-by: Hamdy Abou El Anein <hamdy.aea@xxxxxxxxxxxxxx>
Seems a little contrived but the fix is simple so:
Reviewed-by: Nathan Chancellor <nathan@xxxxxxxxxx>
--
Cheers,
Nathan