Re: [PATCH 2/3] selftests/lib.mk: Introduce check to validate required configs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue 2024-12-10 22:40:51, BiscuitBobby wrote:
> On Tue, 10 Dec 2024 at 20:26, Petr Mladek <pmladek@xxxxxxxx> wrote:
> >
> > What is the reason to add another set of dependencies, please?
> 
> I had done this because not every test required all the options specified in
> tools/testing/selftests/<test>/config. I thought it would not be desirable to
> prevent these tests from compiling/running.

The biggest problem is that tools/testing/selftests/<test>/config are
not used during build or tests at the moment. It means that they
are not tested and might be outdated.

If we add the dependency then some <test>/config files might need
to get fixed.

I am not sure how many problems it might cause. But it might
be worth the effort.

> > Both CONFIG_LIVEPATCH CONFIG_DYNAMIC_DEBUG are already mentioned in
> > tools/testing/selftests/livepatch/config
>
> This particular test only required CONFIG_LIVEPATCH to compile, but I
> had included CONFIG_DYNAMIC_DEBUG, as Miroslav had expressed
> wanting both of them checked.

I see. The build succeeds even without CONFIG_DYNAMIC_DEBUG.
But it must be enabled on the kernel where the test modules
are loaded. Otherwise, the tests would fail.

Honestly, I think that this is rather an exception. It works
only because all the needed pr_debug() messages are in
the livepatch core code. The test modules do not use pr_debug()
on its own.

I believe that most options in tools/testing/selftests/<test>/config
have to be enabled on both compile and runtime. Otherwise, the test
binaries might not have access to the needed API.

I suggest to keep it simple and require all <test>/config options
at both compile and run time. IMHO, most people build and run
the tests on the same kernel anyway.

Best Regards,
Petr




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux