From: Petr Mladek <pmladek@suse.com>
To: BiscuitBobby <simeddon@gmail.com>
Cc: shuah@kernel.org, mbenes@suse.cz,
Shuah Khan <skhan@linuxfoundation.org>,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH 2/3] selftests/lib.mk: Introduce check to validate required configs
Date: Thu, 12 Dec 2024 10:02:03 +0100 [thread overview]
Message-ID: <Z1qmiwXqJ6rvYmYa@pathway.suse.cz> (raw)
In-Reply-To: <CAGd6pzNUquikRS8pw7D14qXqLixOCQUWqcCcD0C1O6K2TMLeNg@mail.gmail.com>
On Tue 2024-12-10 22:40:51, BiscuitBobby wrote:
> On Tue, 10 Dec 2024 at 20:26, Petr Mladek <pmladek@suse.com> 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
next prev parent reply other threads:[~2024-12-12 9:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-05 11:47 [PATCH 0/3] kselftest framework to introduce TEST_CONFIG_DEPS Siddharth Menon
2024-12-05 11:47 ` [PATCH 1/3] docs/kselftests: Explain the usage of TEST_CONFIG_DEPS Siddharth Menon
2024-12-10 14:30 ` Petr Mladek
2024-12-05 11:47 ` [PATCH 2/3] selftests/lib.mk: Introduce check to validate required configs Siddharth Menon
2024-12-05 15:35 ` Mark Brown
2024-12-06 19:20 ` BiscuitBobby
2024-12-06 19:50 ` Mark Brown
2024-12-06 20:12 ` BiscuitBobby
2024-12-10 14:56 ` Petr Mladek
2024-12-10 17:10 ` BiscuitBobby
2024-12-12 9:02 ` Petr Mladek [this message]
2024-12-05 11:47 ` [PATCH 3/3] selftests/livepatch: Check if required config options are enabled Siddharth Menon
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=Z1qmiwXqJ6rvYmYa@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=shuah@kernel.org \
--cc=simeddon@gmail.com \
--cc=skhan@linuxfoundation.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