From: Hamdy Abou El Anein <info@daylightlinux.ch>
To: nathan@kernel.org, nsc@kernel.org
Cc: arnd@arndb.de, quic_johmoo@quicinc.com,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
hamdy.aea@protonmail.com
Subject: [PATCH] check-uapi: avoid truncating the failure count in the exit status
Date: Sat, 7 Nov 2026 20:13:55 +0100 [thread overview]
Message-ID: <20261107191355.151276-1-info@daylightlinux.ch> (raw)
From: Hamdy Abou El Anein <hamdy.aea@protonmail.com>
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@protonmail.com>
---
The regression fixtures use a minimal headers_install Makefile and
an abidiff stand-in that only supplies --version. Actual removed-header
checks, Git archives and the CLI exit path are exercised; no ABI
comparison is invoked for these removed headers.
scripts/check-uapi.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/check-uapi.sh b/scripts/check-uapi.sh
index c8beec588..93095a5b8 100755
--- a/scripts/check-uapi.sh
+++ b/scripts/check-uapi.sh
@@ -295,7 +295,7 @@ check_uapi_files() {
"$total" "$ARCH"
fi
- return "$failed"
+ return "$((failed != 0))"
}
# Check an individual file for UAPI compatibility
base-commit: d48723711bae9b8cdc56719c448ba42fef28cbee
--
2.56.0
reply other threads:[~2026-11-07 19:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261107191355.151276-1-info@daylightlinux.ch \
--to=info@daylightlinux.ch \
--cc=arnd@arndb.de \
--cc=hamdy.aea@protonmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=quic_johmoo@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®