From: sashiko-bot@kernel.org
To: "Sasha Levin" <sashal@kernel.org>,
"Josh Poimboeuf" <jpoimboe@kernel.org>,
"Miroslav Benes" <mbenes@suse.cz>,
"Petr Mladek" <pmladek@suse.com>,
"Joe Lawrence" <joe.lawrence@redhat.com>
Cc: "Song Liu" <song@kernel.org>,
"Marcos Paulo de Souza" <mpdesouza@suse.com>,
"Eva Kurchatova" <eva.kurchatova@virtuozzo.com>,
"Yafang Shao" <laoar.shao@gmail.com>,
"Shuah Khan" <shuah@kernel.org>,
live-patching@vger.kernel.org
Subject: Re: [PATCH] selftests/livepatch: build test modules against the selected kernel
Date: Wed, 14 Oct 2026 20:12:26 +0000 [thread overview]
Message-ID: <sashiko-outbox-171842@kernel.org> (raw)
In-Reply-To: <20261014200154.1365200-1-sashal@kernel.org>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] kbuild: target-specific MAKEOVERRIDES assignment is ignored by GNU Make
- [Medium] selftests: livepatch: tests falsely skip on target machines without KDIR
--
commit 52a5776aaff15a8419816c34023de1b05a2d6d7f
Author: Sasha Levin <sashal@kernel.org>
selftests/livepatch: build test modules against the selected kernel
This commit attempts to fix building livepatch test modules against an output
directory by selecting KDIR from O or KBUILD_OUTPUT. It also aims to stop
forwarding O and KBUILD_OUTPUT to the kernel sub-make so that the build works
correctly against distribution headers or output directories.
> diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh
> index 429fce1f31431..8b26b70f92d8c 100644
> --- a/tools/testing/selftests/livepatch/functions.sh
> +++ b/tools/testing/selftests/livepatch/functions.sh
> @@ -150,6 +150,7 @@ function cleanup() {
> # the ftrace_enabled sysctl.
> function setup_config() {
> is_root
> + [[ -d "$SYSFS_KLP_DIR" ]] || skip "livepatch is not available"
> has_kdir
> push_config
[Severity: Medium]
Is the call to has_kdir inside setup_config still appropriate here?
When running tests via the kselftest_install workflow on a target system
without a kernel build tree, has_kdir fails and unconditionally skips the
tests. This causes the tests to falsely skip on installed target machines,
even if the test modules were already successfully compiled and are available
to load.
> diff --git a/tools/testing/selftests/livepatch/test_modules/Makefile b/tools/testing/selftests/livepatch/test_modules/Makefile
> index a13d398585dcb..1fbeaac9c2b2c 100644
> --- a/tools/testing/selftests/livepatch/test_modules/Makefile
> +++ b/tools/testing/selftests/livepatch/test_modules/Makefile
> @@ -16,14 +16,16 @@ obj-m += test_klp_atomic_replace.o \
> test_klp_state3.o \
> test_klp_syscall.o
>
> +modules clean: MAKEOVERRIDES := $(filter-out O=% KBUILD_OUTPUT=%,$(MAKEOVERRIDES))
[Severity: Medium]
Will this target-specific assignment of MAKEOVERRIDES be ignored by GNU Make?
GNU Make does not support target-specific assignments for special variables
like MAKEOVERRIDES and MAKEFLAGS. As a result, the global O= and
KBUILD_OUTPUT= overrides will still be passed to the sub-make via MAKEFLAGS.
Could this leak the un-filtered variables to Kbuild and cause the build to
fail against output directories when make O=... is used, defeating the purpose
of the patch?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261014200154.1365200-1-sashal@kernel.org?part=1
prev parent reply other threads:[~2026-10-14 20:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 20:01 [PATCH] selftests/livepatch: build test modules against the selected kernel Sasha Levin
2026-10-14 20:12 ` sashiko-bot [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=sashiko-outbox-171842@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=eva.kurchatova@virtuozzo.com \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@kernel.org \
--cc=laoar.shao@gmail.com \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=mpdesouza@suse.com \
--cc=pmladek@suse.com \
--cc=sashal@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shuah@kernel.org \
--cc=song@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.