Skip to content

run_test.sh: filter the pahole version warning header from make.log - #614

Merged
scaronni merged 1 commit into
dkms-project:mainfrom
kylee0215:filter-pahole-warning
Oct 22, 2026
Merged

scaronni merged 1 commit into
dkms-project:mainfrom
kylee0215:filter-pahole-warning

Conversation

@kylee0215

Copy link
Copy Markdown
Contributor

What this does

Adds one rule to generalize_make_log() in run_test.sh to drop the warning: pahole version differs from the one used to build the kernel line from make.log before comparison.

Why

Since Linux v7.0, the kernel's top-level Makefile prints this warning for external module builds when the pahole version in the environment differs from the one the kernel was built with:

warning: pahole version differs from the one used to build the kernel
  The kernel was built with: 131
  You are using:             0

#609 (for #608) filtered the The kernel was built with: line, and the You are using: line is already covered by the compiler warning rule, but the first line is still left in the log. On testbeds without pahole (or with a different version), run_test.sh still fails:

 Building module(s)
 # command: make -j1 KERNELRELEASE=7.0.0-38-generic -C /lib/modules/7.0.0-38-generic/build M=/var/lib/dkms/dkms_test/1.0/build
+warning: pahole version differs from the one used to build the kernel
   CC      dkms_test.o
   CC      dkms_test.mod.o
   LD      dkms_test.ko
Error: unexpected make.log difference

This is hit by Ubuntu test with 7.0 kernels.

How

 /warning: the compiler differs from the one used to build the kernel/d
 /  The kernel was built by:/d
 /  You are using:/d
+/warning: pahole version differs from the one used to build the kernel/d
 /  The kernel was built with:/d

This mirrors the existing handling of the compiler version warning, where the header line and both detail lines are all filtered.

Since Linux v7.0, commit 90e5b38a2652 ("kbuild: Sync kconfig when
PAHOLE_VERSION changes") makes external module builds print a warning
when the pahole version differs from the one used to build the kernel:

  warning: pahole version differs from the one used to build the kernel
    The kernel was built with: 131
    You are using:             0

The last two lines are already filtered, but the first "warning: pahole
version differs ..." line is still left in make.log. This makes
run_test.sh fail with "unexpected make.log difference" on any testbed
where pahole is missing or its version does not match, e.g. Ubuntu
autopkgtest with 7.0 kernels.

Filter that line as well, in the same way as the compiler version
warning.

Signed-off-by: Kuan-Ying Lee <kuan-ying.lee@canonical.com>
@scaronni

Copy link
Copy Markdown
Member

This was happening on Fedora as well, but the issue was the updates in the repositories not exactly aligned; so the fix should be there. I will merge it anyway after the tests pass as it's useful to have. Thanks.

@scaronni scaronni self-assigned this Oct 22, 2026
@scaronni
scaronni merged commit 9949ef8 into dkms-project:main Oct 22, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants