workflows.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] kselftest framework to introduce TEST_CONFIG_DEPS
@ 2024-12-05 11:47 Siddharth Menon
  2024-12-05 11:47 ` [PATCH 1/3] docs/kselftests: Explain the usage of TEST_CONFIG_DEPS Siddharth Menon
  0 siblings, 1 reply; 3+ messages in thread
From: Siddharth Menon @ 2024-12-05 11:47 UTC (permalink / raw)
  To: simeddon, corbet, jikos, jpoimboe, mbenes, pmladek, shuah
  Cc: linux-doc, linux-kselftest, live-patching, workflows

Currently, kselftests does not have a generalised mechanism to skip compilation
and run tests when required kernel configuration options are disabled.

This patch series addresses this limitation by introducing a new flag, 
'TEST_CONFIG_DEPS' in lib.mk, along with corresponding updates to the 
documentation. 
The selftests/livepatch/Makefile has been updated to utilize TEST_CONFIG_DEPS.

Siddharth Menon (3):
  docs/kselftests: Explain the usage of TEST_CONFIG_DEPS
  selftests/lib.mk: Introduce check to validate required configs
  selftests/livepatch: Check if required config options are enabled

 Documentation/dev-tools/kselftest.rst      |  3 +++
 tools/testing/selftests/lib.mk             | 18 ++++++++++++++++--
 tools/testing/selftests/livepatch/Makefile |  1 +
 3 files changed, 20 insertions(+), 2 deletions(-)

-- 
2.39.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/3] docs/kselftests: Explain the usage of TEST_CONFIG_DEPS
  2024-12-05 11:47 [PATCH 0/3] kselftest framework to introduce TEST_CONFIG_DEPS Siddharth Menon
@ 2024-12-05 11:47 ` Siddharth Menon
  2024-12-10 14:30   ` Petr Mladek
  0 siblings, 1 reply; 3+ messages in thread
From: Siddharth Menon @ 2024-12-05 11:47 UTC (permalink / raw)
  To: simeddon, shuah, corbet; +Cc: mbenes, linux-kselftest, workflows, linux-doc

Update documentation to explain the TEST_CONFIG_DEPS flag in lib.mk.
TEST_CONFIG_DEPS is used to validate the presence of required config flags
specified in the selftest makefile before compiling or running a test.

Signed-off-by: Siddharth Menon <simeddon@gmail.com>
---
 Documentation/dev-tools/kselftest.rst | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools/kselftest.rst
index fdb1df86783a..e816b282363f 100644
--- a/Documentation/dev-tools/kselftest.rst
+++ b/Documentation/dev-tools/kselftest.rst
@@ -301,6 +301,9 @@ Contributing new tests (details)
 
    e.g: tools/testing/selftests/android/config
 
+ * Use TEST_CONFIG_DEPS to specify required config options to be enabled 
+   before a test is allowed to run or compile.
+
  * Create a .gitignore file inside test directory and add all generated objects
    in it.
 
-- 
2.39.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/3] docs/kselftests: Explain the usage of TEST_CONFIG_DEPS
  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
  0 siblings, 0 replies; 3+ messages in thread
From: Petr Mladek @ 2024-12-10 14:30 UTC (permalink / raw)
  To: Siddharth Menon
  Cc: shuah, corbet, mbenes, linux-kselftest, workflows, linux-doc

On Thu 2024-12-05 17:17:55, Siddharth Menon wrote:
> Update documentation to explain the TEST_CONFIG_DEPS flag in lib.mk.
> TEST_CONFIG_DEPS is used to validate the presence of required config flags
> specified in the selftest makefile before compiling or running a test.
> 
> Signed-off-by: Siddharth Menon <simeddon@gmail.com>
> ---
>  Documentation/dev-tools/kselftest.rst | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools/kselftest.rst
> index fdb1df86783a..e816b282363f 100644
> --- a/Documentation/dev-tools/kselftest.rst
> +++ b/Documentation/dev-tools/kselftest.rst
> @@ -301,6 +301,9 @@ Contributing new tests (details)
>  
>     e.g: tools/testing/selftests/android/config
>  
> + * Use TEST_CONFIG_DEPS to specify required config options to be enabled 
> +   before a test is allowed to run or compile.
> +
>   * Create a .gitignore file inside test directory and add all generated objects
>     in it.

It might be a matter of taste. It is a chicken & egg problem. I
personally find it weird to document something which does not exist yet.

Please, either update the documentation together with the code or
later :-)

Best Regards,
Petr

PS: I haven't got this mail. I have got only 2nd and 3rd patch.
    I prefer to see the entire patchset. I suggest to always
    send all patches to the same list of people and mailing lists.
    

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-10 14:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox