From: TAKANO Mitsuhiro <takano32@gmail.com>
To: linux-perf-users@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>
Cc: Ian Rogers <irogers@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>,
linux-kernel@vger.kernel.org,
TAKANO Mitsuhiro <takano32@gmail.com>
Subject: [PATCH 2/2] perf build: Make check-headers.sh fail on a difference
Date: Wed, 25 Nov 2026 18:09:12 +0000 [thread overview]
Message-ID: <20261125180912.2388197-2-takano32@gmail.com> (raw)
In-Reply-To: <20261125180912.2388197-1-takano32@gmail.com>
The script collects the stale copies in FAILURES, prints them and exits
with the status of the last echo, so `make check-headers` succeeds on a
tree whose copies are out of sync and cannot be used as a gate. This is
what it prints for a stale x86 cpufeatures.h:
Warning: Kernel ABI header differences:
diff -u tools/arch/x86/include/asm/cpufeatures.h \
arch/x86/include/asm/cpufeatures.h
Exit 1 when the array is not empty, so a caller can tell the two apart.
The list that fills the array has a typo: include/linux/list-sort.h does
not exist, the file is list_sort.h. check_2() tests the source file with
-f and skips the pair silently, so that copy was never checked. The two
files are identical today, and the pair is compared now.
Verification: with a difference in either file the script exits 1 and
names the pair; with none it exits 0 and prints nothing. Before the
change it exited 0 in both cases.
Signed-off-by: TAKANO Mitsuhiro <takano32@gmail.com>
---
| 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index 531c0e0e84df..3211e5f3dd9a 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -28,7 +28,7 @@ declare -a FILES=(
"include/vdso/unaligned.h"
"include/linux/gfp_types.h"
"include/linux/hash.h"
- "include/linux/list-sort.h"
+ "include/linux/list_sort.h"
"include/uapi/linux/hw_breakpoint.h"
"arch/x86/include/asm/cpufeatures.h"
"arch/x86/include/asm/inat_types.h"
@@ -231,4 +231,5 @@ then
do
echo " diff -u $i"
done
+ exit 1
fi
--
2.53.0
prev parent reply other threads:[~2026-11-25 18:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 18:09 [PATCH 1/2] perf tools: Sync the x86 cpufeatures header TAKANO Mitsuhiro
2026-11-25 18:09 ` TAKANO Mitsuhiro [this message]
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=20261125180912.2388197-2-takano32@gmail.com \
--to=takano32@gmail.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/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®