All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kunit: arch/um/configs: Enable KUNIT_ALL_TESTS by default
@ 2021-05-18  3:58 David Gow
  2021-05-18 20:14 ` Daniel Latypov
  2021-05-18 21:15 ` Brendan Higgins
  0 siblings, 2 replies; 3+ messages in thread
From: David Gow @ 2021-05-18  3:58 UTC (permalink / raw)
  To: Brendan Higgins, Shuah Khan
  Cc: David Gow, Jeff Dike, Richard Weinberger, kunit-dev,
	linux-kselftest, linux-um, linux-kernel

Make the default .kunitconfig (specified in
arch/um/configs/kunit_defconfig) specify CONFIG_KUNIT_ALL_TESTS by
default. KUNIT_ALL_TESTS runs all tests which have satisfied
dependencies in the current .config (which would be the architecture
defconfig).

Currently, the default .kunitconfig enables only the example tests and
KUnit's own tests. While this does provide a good example of what a
.kunitconfig for running a few individual tests should look like, it
does mean that kunit_tool runs a pretty paltry collection of tests by
default.

A default run of ./tools/testing/kunit/kunit.py run now runs 70 tests
instead of 14.

Signed-off-by: David Gow <davidgow@google.com>
---
 arch/um/configs/kunit_defconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/um/configs/kunit_defconfig b/arch/um/configs/kunit_defconfig
index 9235b7d42d38..becf3432a375 100644
--- a/arch/um/configs/kunit_defconfig
+++ b/arch/um/configs/kunit_defconfig
@@ -1,3 +1,2 @@
 CONFIG_KUNIT=y
-CONFIG_KUNIT_TEST=y
-CONFIG_KUNIT_EXAMPLE_TEST=y
+CONFIG_KUNIT_ALL_TESTS=y
-- 
2.31.1.751.gd2f1c929bd-goog


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

* Re: [PATCH] kunit: arch/um/configs: Enable KUNIT_ALL_TESTS by default
  2021-05-18  3:58 [PATCH] kunit: arch/um/configs: Enable KUNIT_ALL_TESTS by default David Gow
@ 2021-05-18 20:14 ` Daniel Latypov
  2021-05-18 21:15 ` Brendan Higgins
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Latypov @ 2021-05-18 20:14 UTC (permalink / raw)
  To: David Gow
  Cc: Brendan Higgins, Shuah Khan, Jeff Dike, Richard Weinberger,
	KUnit Development, open list:KERNEL SELFTEST FRAMEWORK, linux-um,
	Linux Kernel Mailing List

On Mon, May 17, 2021 at 8:58 PM 'David Gow' via KUnit Development
<kunit-dev@googlegroups.com> wrote:
>
> Make the default .kunitconfig (specified in
> arch/um/configs/kunit_defconfig) specify CONFIG_KUNIT_ALL_TESTS by
> default. KUNIT_ALL_TESTS runs all tests which have satisfied
> dependencies in the current .config (which would be the architecture
> defconfig).
>
> Currently, the default .kunitconfig enables only the example tests and
> KUnit's own tests. While this does provide a good example of what a
> .kunitconfig for running a few individual tests should look like, it
> does mean that kunit_tool runs a pretty paltry collection of tests by
> default.

From the perspective of someone trying out KUnit for the first time,
I'd personally
* try out `kunit.py run`
* then maybe grep for a test/suite name that sounds interesting.

So I'm strongly in favor of the default running a wider variety of tests.
The build and execution time is still very quick, so no complaints there.

I also think this makes the set of (most of) the existing tests more
discoverable then grepping around for #include <kunit/test.h> or
similar indicators.

But I'm also biased in that I like seeing larger numbers of tests.

>
> A default run of ./tools/testing/kunit/kunit.py run now runs 70 tests
> instead of 14.
>
> Signed-off-by: David Gow <davidgow@google.com>

Acked-by: Daniel Latypov <dlatypov@google.com>

> ---
>  arch/um/configs/kunit_defconfig | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/um/configs/kunit_defconfig b/arch/um/configs/kunit_defconfig
> index 9235b7d42d38..becf3432a375 100644
> --- a/arch/um/configs/kunit_defconfig
> +++ b/arch/um/configs/kunit_defconfig
> @@ -1,3 +1,2 @@
>  CONFIG_KUNIT=y
> -CONFIG_KUNIT_TEST=y
> -CONFIG_KUNIT_EXAMPLE_TEST=y

I think it's maybe still useful to have an example of selecting a specific test.
I'd lean towards keeping one or both of these.

KUNIT_TEST might not be as clear as KUNIT_EXAMPLE_TEST, so I'd lean
towards keeping that one, if we don't want both.


> +CONFIG_KUNIT_ALL_TESTS=y
> --
> 2.31.1.751.gd2f1c929bd-goog
>
> --
> You received this message because you are subscribed to the Google Groups "KUnit Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to kunit-dev+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/kunit-dev/20210518035825.1885357-1-davidgow%40google.com.

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

* Re: [PATCH] kunit: arch/um/configs: Enable KUNIT_ALL_TESTS by default
  2021-05-18  3:58 [PATCH] kunit: arch/um/configs: Enable KUNIT_ALL_TESTS by default David Gow
  2021-05-18 20:14 ` Daniel Latypov
@ 2021-05-18 21:15 ` Brendan Higgins
  1 sibling, 0 replies; 3+ messages in thread
From: Brendan Higgins @ 2021-05-18 21:15 UTC (permalink / raw)
  To: David Gow
  Cc: Shuah Khan, Jeff Dike, Richard Weinberger, KUnit Development,
	open list:KERNEL SELFTEST FRAMEWORK, linux-um,
	Linux Kernel Mailing List

On Mon, May 17, 2021 at 8:58 PM David Gow <davidgow@google.com> wrote:
>
> Make the default .kunitconfig (specified in
> arch/um/configs/kunit_defconfig) specify CONFIG_KUNIT_ALL_TESTS by
> default. KUNIT_ALL_TESTS runs all tests which have satisfied
> dependencies in the current .config (which would be the architecture
> defconfig).
>
> Currently, the default .kunitconfig enables only the example tests and
> KUnit's own tests. While this does provide a good example of what a
> .kunitconfig for running a few individual tests should look like, it
> does mean that kunit_tool runs a pretty paltry collection of tests by
> default.
>
> A default run of ./tools/testing/kunit/kunit.py run now runs 70 tests
> instead of 14.
>
> Signed-off-by: David Gow <davidgow@google.com>

I am totally on board with what you want to do here, but I have one
minor issue below.

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

> ---
>  arch/um/configs/kunit_defconfig | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/um/configs/kunit_defconfig b/arch/um/configs/kunit_defconfig
> index 9235b7d42d38..becf3432a375 100644
> --- a/arch/um/configs/kunit_defconfig
> +++ b/arch/um/configs/kunit_defconfig

Could we also apply this to
tools/testing/kunit/configs/all_tests.config ? The contents of the
file are identical, and I think are supposed to be for the same
purpose.

> @@ -1,3 +1,2 @@
>  CONFIG_KUNIT=y
> -CONFIG_KUNIT_TEST=y
> -CONFIG_KUNIT_EXAMPLE_TEST=y
> +CONFIG_KUNIT_ALL_TESTS=y
> --
> 2.31.1.751.gd2f1c929bd-goog
>

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

end of thread, other threads:[~2021-05-18 21:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18  3:58 [PATCH] kunit: arch/um/configs: Enable KUNIT_ALL_TESTS by default David Gow
2021-05-18 20:14 ` Daniel Latypov
2021-05-18 21:15 ` Brendan Higgins

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.