Re: [PATCH v4 4/4] selftests/livepatch: run the tests with prebuilt test modules

From: Petr Mladek

Date: Mon Nov 23 2026 - 09:10:58 EST


On Tue 2026-11-10 11:10:50, Sasha Levin wrote:
> The tests are skipped unless the machine running them has a kernel
> build directory, in $KDIR or /lib/modules/$(uname -r)/build. They do
> not need one when the test modules were built with the selftests,
> because the scripts load the modules from test_modules/.
>
> As a result the tests are skipped on a machine running an installed
> selftests tree without the kernel devel files, for example one
> installed with
>
> make O=/tmp/kselftest TARGETS=livepatch kselftest-install
>
> although the modules are there.
>
> Run the tests when the test modules are available, so that they can
> run without the kernel devel files. Without the modules, keep skipping
> the tests when there is no kernel build directory to build them with.
>
> Fixes: 54ee3526796f ("selftests: livepatch: Avoid running the tests if kernel-devel is missing")
> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

Looks good and seems to work:

Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>
Tested-by: Petr Mladek <pmladek@xxxxxxxx>

Best Regards,
Petr