linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lib/Kconfig.debug: change KUnit tests to default to KUNIT_ALL_TESTS
@ 2022-04-05 19:06 Daniel Latypov
  2022-04-06  4:44 ` David Gow
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Daniel Latypov @ 2022-04-05 19:06 UTC (permalink / raw)
  To: brendanhiggins, davidgow
  Cc: linux-kernel, kunit-dev, linux-kselftest, skhan, Daniel Latypov

This is in line with Documentation/dev-tools/kunit/style.rst.
Some of these tests predate that so they don't follow this convention.

With this and commit b0841b51cac9 ("kunit: arch/um/configs: Enable
KUNIT_ALL_TESTS by default"), kunit.py will now run these tests by
default. This hopefully makes it easier to run and maintain the tests.
If any of these were to start failing, people would notice much quicker.

Note: this commit doesn't update LINEAR_RANGES_TEST since that would
select its dependency (LINEAR_RANGES). We don't want KUNIT_ALL_TESTS
to enable anything other than test kconfigs.

Signed-off-by: Daniel Latypov <dlatypov@google.com>
---
 lib/Kconfig.debug | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 075cd25363ac..36865b37b33b 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -2140,10 +2140,11 @@ config TEST_DIV64
 	  If unsure, say N.
 
 config KPROBES_SANITY_TEST
-	tristate "Kprobes sanity tests"
+	tristate "Kprobes sanity tests" if !KUNIT_ALL_TESTS
 	depends on DEBUG_KERNEL
 	depends on KPROBES
 	depends on KUNIT
+	default KUNIT_ALL_TESTS
 	help
 	  This option provides for testing basic kprobes functionality on
 	  boot. Samples of kprobe and kretprobe are inserted and
@@ -2417,8 +2418,9 @@ config TEST_SYSCTL
 	  If unsure, say N.
 
 config BITFIELD_KUNIT
-	tristate "KUnit test bitfield functions at runtime"
+	tristate "KUnit test bitfield functions at runtime" if !KUNIT_ALL_TESTS
 	depends on KUNIT
+	default KUNIT_ALL_TESTS
 	help
 	  Enable this option to test the bitfield functions at boot.
 
@@ -2452,8 +2454,9 @@ config HASH_KUNIT_TEST
 	  optimized versions. If unsure, say N.
 
 config RESOURCE_KUNIT_TEST
-	tristate "KUnit test for resource API"
+	tristate "KUnit test for resource API" if !KUNIT_ALL_TESTS
 	depends on KUNIT
+	default KUNIT_ALL_TESTS
 	help
 	  This builds the resource API unit test.
 	  Tests the logic of API provided by resource.c and ioport.h.
@@ -2506,8 +2509,9 @@ config LINEAR_RANGES_TEST
 	  If unsure, say N.
 
 config CMDLINE_KUNIT_TEST
-	tristate "KUnit test for cmdline API"
+	tristate "KUnit test for cmdline API" if !KUNIT_ALL_TESTS
 	depends on KUNIT
+	default KUNIT_ALL_TESTS
 	help
 	  This builds the cmdline API unit test.
 	  Tests the logic of API provided by cmdline.c.
@@ -2517,8 +2521,9 @@ config CMDLINE_KUNIT_TEST
 	  If unsure, say N.
 
 config BITS_TEST
-	tristate "KUnit test for bits.h"
+	tristate "KUnit test for bits.h" if !KUNIT_ALL_TESTS
 	depends on KUNIT
+	default KUNIT_ALL_TESTS
 	help
 	  This builds the bits unit test.
 	  Tests the logic of macros defined in bits.h.

base-commit: 3123109284176b1532874591f7c81f3837bbdc17
-- 
2.35.1.1094.g7c7d902a7c-goog


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

* Re: [PATCH] lib/Kconfig.debug: change KUnit tests to default to KUNIT_ALL_TESTS
  2022-04-05 19:06 [PATCH] lib/Kconfig.debug: change KUnit tests to default to KUNIT_ALL_TESTS Daniel Latypov
@ 2022-04-06  4:44 ` David Gow
  2022-04-18 18:43 ` Nico Pache
  2022-05-11 21:05 ` Brendan Higgins
  2 siblings, 0 replies; 6+ messages in thread
From: David Gow @ 2022-04-06  4:44 UTC (permalink / raw)
  To: Daniel Latypov
  Cc: Brendan Higgins, Linux Kernel Mailing List, KUnit Development,
	open list:KERNEL SELFTEST FRAMEWORK, Shuah Khan

On Wed, Apr 6, 2022 at 3:06 AM Daniel Latypov <dlatypov@google.com> wrote:
>
> This is in line with Documentation/dev-tools/kunit/style.rst.
> Some of these tests predate that so they don't follow this convention.
>
> With this and commit b0841b51cac9 ("kunit: arch/um/configs: Enable
> KUNIT_ALL_TESTS by default"), kunit.py will now run these tests by
> default. This hopefully makes it easier to run and maintain the tests.
> If any of these were to start failing, people would notice much quicker.
>
> Note: this commit doesn't update LINEAR_RANGES_TEST since that would
> select its dependency (LINEAR_RANGES). We don't want KUNIT_ALL_TESTS
> to enable anything other than test kconfigs.
>
> Signed-off-by: Daniel Latypov <dlatypov@google.com>
> ---

I'd forgotten these were missing KUNIT_ALL_TESTS support, thanks!

Reviewed-by: David Gow <davidgow@google.com>

Cheers,
-- David

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

* Re: [PATCH] lib/Kconfig.debug: change KUnit tests to default to KUNIT_ALL_TESTS
  2022-04-05 19:06 [PATCH] lib/Kconfig.debug: change KUnit tests to default to KUNIT_ALL_TESTS Daniel Latypov
  2022-04-06  4:44 ` David Gow
@ 2022-04-18 18:43 ` Nico Pache
  2022-04-18 18:54   ` Daniel Latypov
  2022-05-11 21:05 ` Brendan Higgins
  2 siblings, 1 reply; 6+ messages in thread
From: Nico Pache @ 2022-04-18 18:43 UTC (permalink / raw)
  To: Daniel Latypov, brendanhiggins, davidgow
  Cc: linux-kernel, kunit-dev, linux-kselftest, skhan



On 4/5/22 15:06, Daniel Latypov wrote:
> This is in line with Documentation/dev-tools/kunit/style.rst.
> Some of these tests predate that so they don't follow this convention.
> 
> With this and commit b0841b51cac9 ("kunit: arch/um/configs: Enable
> KUNIT_ALL_TESTS by default"), kunit.py will now run these tests by
> default. This hopefully makes it easier to run and maintain the tests.
> If any of these were to start failing, people would notice much quicker.
> 
> Note: this commit doesn't update LINEAR_RANGES_TEST since that would
> select its dependency (LINEAR_RANGES). We don't want KUNIT_ALL_TESTS
> to enable anything other than test kconfigs.
> 
> Signed-off-by: Daniel Latypov <dlatypov@google.com>
> ---
I have tried posting something similar in the past!
https://lore.kernel.org/lkml/f427ed5cbc08da83086c504fbb3ad1bab50340cd.1618388989.git.npache@redhat.com/

Reviewed-by: Nico Pache <npache@redhat.com>
Acked-by: Nico Pache <npache@redhat.com>


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

* Re: [PATCH] lib/Kconfig.debug: change KUnit tests to default to KUNIT_ALL_TESTS
  2022-04-18 18:43 ` Nico Pache
@ 2022-04-18 18:54   ` Daniel Latypov
  2022-05-11 21:07     ` Brendan Higgins
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Latypov @ 2022-04-18 18:54 UTC (permalink / raw)
  To: Nico Pache
  Cc: brendanhiggins, davidgow, linux-kernel, kunit-dev,
	linux-kselftest, skhan

On Mon, Apr 18, 2022 at 1:43 PM Nico Pache <npache@redhat.com> wrote:
>

<snip>

> I have tried posting something similar in the past!
> https://lore.kernel.org/lkml/f427ed5cbc08da83086c504fbb3ad1bab50340cd.1618388989.git.npache@redhat.com/

Aha, so that's why I vaguely thought someone had already done this.

>
> Reviewed-by: Nico Pache <npache@redhat.com>
> Acked-by: Nico Pache <npache@redhat.com>

Thanks!

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

* Re: [PATCH] lib/Kconfig.debug: change KUnit tests to default to KUNIT_ALL_TESTS
  2022-04-05 19:06 [PATCH] lib/Kconfig.debug: change KUnit tests to default to KUNIT_ALL_TESTS Daniel Latypov
  2022-04-06  4:44 ` David Gow
  2022-04-18 18:43 ` Nico Pache
@ 2022-05-11 21:05 ` Brendan Higgins
  2 siblings, 0 replies; 6+ messages in thread
From: Brendan Higgins @ 2022-05-11 21:05 UTC (permalink / raw)
  To: Daniel Latypov; +Cc: davidgow, linux-kernel, kunit-dev, linux-kselftest, skhan

On Tue, Apr 5, 2022 at 3:06 PM Daniel Latypov <dlatypov@google.com> wrote:
>
> This is in line with Documentation/dev-tools/kunit/style.rst.
> Some of these tests predate that so they don't follow this convention.
>
> With this and commit b0841b51cac9 ("kunit: arch/um/configs: Enable
> KUNIT_ALL_TESTS by default"), kunit.py will now run these tests by
> default. This hopefully makes it easier to run and maintain the tests.
> If any of these were to start failing, people would notice much quicker.
>
> Note: this commit doesn't update LINEAR_RANGES_TEST since that would
> select its dependency (LINEAR_RANGES). We don't want KUNIT_ALL_TESTS
> to enable anything other than test kconfigs.
>
> Signed-off-by: Daniel Latypov <dlatypov@google.com>

Reviewed-by: Brendan Higgins <brendanhiggins@google.com>

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

* Re: [PATCH] lib/Kconfig.debug: change KUnit tests to default to KUNIT_ALL_TESTS
  2022-04-18 18:54   ` Daniel Latypov
@ 2022-05-11 21:07     ` Brendan Higgins
  0 siblings, 0 replies; 6+ messages in thread
From: Brendan Higgins @ 2022-05-11 21:07 UTC (permalink / raw)
  To: Nico Pache
  Cc: Daniel Latypov, davidgow, linux-kernel, kunit-dev,
	linux-kselftest, skhan

On Mon, Apr 18, 2022 at 2:54 PM Daniel Latypov <dlatypov@google.com> wrote:
>
> On Mon, Apr 18, 2022 at 1:43 PM Nico Pache <npache@redhat.com> wrote:
> >
>
> <snip>
>
> > I have tried posting something similar in the past!
> > https://lore.kernel.org/lkml/f427ed5cbc08da83086c504fbb3ad1bab50340cd.1618388989.git.npache@redhat.com/

Ooops, sorry, we should probably go back and pull those in as well.

Thanks for your fixes, and sorry for not picking them up.

> Aha, so that's why I vaguely thought someone had already done this.
>
> >
> > Reviewed-by: Nico Pache <npache@redhat.com>
> > Acked-by: Nico Pache <npache@redhat.com>
>
> Thanks!

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

end of thread, other threads:[~2022-05-11 21:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-05 19:06 [PATCH] lib/Kconfig.debug: change KUnit tests to default to KUNIT_ALL_TESTS Daniel Latypov
2022-04-06  4:44 ` David Gow
2022-04-18 18:43 ` Nico Pache
2022-04-18 18:54   ` Daniel Latypov
2022-05-11 21:07     ` Brendan Higgins
2022-05-11 21:05 ` Brendan Higgins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).