linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Documentation: kunit: Update Kconfig parts for KUNIT's module support
@ 2020-10-21 19:25 SeongJae Park
  2020-10-21 20:44 ` Brendan Higgins
  0 siblings, 1 reply; 5+ messages in thread
From: SeongJae Park @ 2020-10-21 19:25 UTC (permalink / raw)
  To: brendanhiggins, corbet
  Cc: SeongJae Park, skhan, davidgow, linux-kselftest, kunit-dev,
	linux-doc, linux-kernel

From: SeongJae Park <sjpark@amazon.de>

If 'CONFIG_KUNIT=m', letting kunit tests that do not support loadable
module build depends on 'KUNIT' instead of 'KUNIT=y' result in compile
errors.  This commit updates the document for this.

Fixes: 9fe124bf1b77 ("kunit: allow kunit to be loaded as a module")
Signed-off-by: SeongJae Park <sjpark@amazon.de>
Reviewed-by: David Gow <davidgow@google.com>
---

Changes from v2
(https://lore.kernel.org/linux-kselftest/20201013063743.32179-1-sjpark@amazon.com/)
- Fix a grammar issue (David Gow)
- Add 'Reviewed-by: David Gow <davidgow@google.com>'

Changes from v1
(https://lore.kernel.org/linux-kselftest/20201012105420.5945-1-sjpark@amazon.com/)
- Fix a typo (Marco Elver)

---

 Documentation/dev-tools/kunit/start.rst | 2 +-
 Documentation/dev-tools/kunit/usage.rst | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst
index d23385e3e159..454f307813ea 100644
--- a/Documentation/dev-tools/kunit/start.rst
+++ b/Documentation/dev-tools/kunit/start.rst
@@ -197,7 +197,7 @@ Now add the following to ``drivers/misc/Kconfig``:
 
 	config MISC_EXAMPLE_TEST
 		bool "Test for my example"
-		depends on MISC_EXAMPLE && KUNIT
+		depends on MISC_EXAMPLE && KUNIT=y
 
 and the following to ``drivers/misc/Makefile``:
 
diff --git a/Documentation/dev-tools/kunit/usage.rst b/Documentation/dev-tools/kunit/usage.rst
index 961d3ea3ca19..62142a47488c 100644
--- a/Documentation/dev-tools/kunit/usage.rst
+++ b/Documentation/dev-tools/kunit/usage.rst
@@ -561,6 +561,11 @@ Once the kernel is built and installed, a simple
 
 ...will run the tests.
 
+.. note::
+   Note that you should make sure your test depends on ``KUNIT=y`` in Kconfig
+   if the test does not support module build.  Otherwise, it will trigger
+   compile errors if ``CONFIG_KUNIT`` is ``m``.
+
 Writing new tests for other architectures
 -----------------------------------------
 
-- 
2.17.1


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

* Re: [PATCH] Documentation: kunit: Update Kconfig parts for KUNIT's module support
  2020-10-21 19:25 [PATCH] Documentation: kunit: Update Kconfig parts for KUNIT's module support SeongJae Park
@ 2020-10-21 20:44 ` Brendan Higgins
  0 siblings, 0 replies; 5+ messages in thread
From: Brendan Higgins @ 2020-10-21 20:44 UTC (permalink / raw)
  To: SeongJae Park
  Cc: Jonathan Corbet, SeongJae Park, Shuah Khan, David Gow,
	open list:KERNEL SELFTEST FRAMEWORK, KUnit Development,
	open list:DOCUMENTATION, Linux Kernel Mailing List

On Wed, Oct 21, 2020 at 12:32 PM SeongJae Park <sjpark@amazon.com> wrote:
>
> From: SeongJae Park <sjpark@amazon.de>
>
> If 'CONFIG_KUNIT=m', letting kunit tests that do not support loadable
> module build depends on 'KUNIT' instead of 'KUNIT=y' result in compile
> errors.  This commit updates the document for this.
>
> Fixes: 9fe124bf1b77 ("kunit: allow kunit to be loaded as a module")
> Signed-off-by: SeongJae Park <sjpark@amazon.de>
> Reviewed-by: David Gow <davidgow@google.com>

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

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

* Re: [PATCH] Documentation: kunit: Update Kconfig parts for KUNIT's module support
  2020-10-12 11:28 ` Marco Elver
@ 2020-10-12 18:19   ` SeongJae Park
  0 siblings, 0 replies; 5+ messages in thread
From: SeongJae Park @ 2020-10-12 18:19 UTC (permalink / raw)
  To: Marco Elver
  Cc: SeongJae Park, Brendan Higgins, SeongJae Park, Jonathan Corbet,
	skhan, open list:KERNEL SELFTEST FRAMEWORK, KUnit Development,
	open list:DOCUMENTATION, LKML

On Mon, 12 Oct 2020 13:28:42 +0200 Marco Elver <elver@google.com> wrote:

> On Mon, 12 Oct 2020 at 12:54, 'SeongJae Park' via KUnit Development
> <kunit-dev@googlegroups.com> wrote:
> >
> > From: SeongJae Park <sjpark@amazon.de>
> >
> > If 'CONFIG_KUNIT=m', letting kunit tests that do not support loadable
> > module build depends on 'KUNIT' instead of 'KUNIT=y' result in compile
> > errors.  This commit updates the document for this.
> >
> > Fixes: 9fe124bf1b77 ("kunit: allow kunit to be loaded as a module")
> > Signed-off-by: SeongJae Park <sjpark@amazon.de>
> > ---
> >  Documentation/dev-tools/kunit/start.rst | 2 +-
> >  Documentation/dev-tools/kunit/usage.rst | 5 +++++
> >  2 files changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst
> > index d23385e3e159..454f307813ea 100644
> > --- a/Documentation/dev-tools/kunit/start.rst
> > +++ b/Documentation/dev-tools/kunit/start.rst
> > @@ -197,7 +197,7 @@ Now add the following to ``drivers/misc/Kconfig``:
> >
> >         config MISC_EXAMPLE_TEST
> >                 bool "Test for my example"
> > -               depends on MISC_EXAMPLE && KUNIT
> > +               depends on MISC_EXAMPLE && KUNIT=y
> >
> >  and the following to ``drivers/misc/Makefile``:
> >
> > diff --git a/Documentation/dev-tools/kunit/usage.rst b/Documentation/dev-tools/kunit/usage.rst
> > index 3c3fe8b5fecc..410380fc7fb4 100644
> > --- a/Documentation/dev-tools/kunit/usage.rst
> > +++ b/Documentation/dev-tools/kunit/usage.rst
> > @@ -556,6 +556,11 @@ Once the kernel is built and installed, a simple
> >
> >  ...will run the tests.
> >
> > +.. note::
> > +   Note that you should make your test depends on ``KUNIT=y`` in Kcofig if the
> > +   test does not support module build.  Otherwise, it will trigger compile
> > +   errors if ``CONFIG_KUNIT`` is ``m``.
> 
> s/Kcofig/Kconfig/

Thanks, I will fix this in the next version of this patch.


Thanks,
SeongJae Park

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

* Re: [PATCH] Documentation: kunit: Update Kconfig parts for KUNIT's module support
  2020-10-12 10:54 SeongJae Park
@ 2020-10-12 11:28 ` Marco Elver
  2020-10-12 18:19   ` SeongJae Park
  0 siblings, 1 reply; 5+ messages in thread
From: Marco Elver @ 2020-10-12 11:28 UTC (permalink / raw)
  To: SeongJae Park
  Cc: Brendan Higgins, SeongJae Park, Jonathan Corbet, skhan,
	open list:KERNEL SELFTEST FRAMEWORK, KUnit Development,
	open list:DOCUMENTATION, LKML

On Mon, 12 Oct 2020 at 12:54, 'SeongJae Park' via KUnit Development
<kunit-dev@googlegroups.com> wrote:
>
> From: SeongJae Park <sjpark@amazon.de>
>
> If 'CONFIG_KUNIT=m', letting kunit tests that do not support loadable
> module build depends on 'KUNIT' instead of 'KUNIT=y' result in compile
> errors.  This commit updates the document for this.
>
> Fixes: 9fe124bf1b77 ("kunit: allow kunit to be loaded as a module")
> Signed-off-by: SeongJae Park <sjpark@amazon.de>
> ---
>  Documentation/dev-tools/kunit/start.rst | 2 +-
>  Documentation/dev-tools/kunit/usage.rst | 5 +++++
>  2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst
> index d23385e3e159..454f307813ea 100644
> --- a/Documentation/dev-tools/kunit/start.rst
> +++ b/Documentation/dev-tools/kunit/start.rst
> @@ -197,7 +197,7 @@ Now add the following to ``drivers/misc/Kconfig``:
>
>         config MISC_EXAMPLE_TEST
>                 bool "Test for my example"
> -               depends on MISC_EXAMPLE && KUNIT
> +               depends on MISC_EXAMPLE && KUNIT=y
>
>  and the following to ``drivers/misc/Makefile``:
>
> diff --git a/Documentation/dev-tools/kunit/usage.rst b/Documentation/dev-tools/kunit/usage.rst
> index 3c3fe8b5fecc..410380fc7fb4 100644
> --- a/Documentation/dev-tools/kunit/usage.rst
> +++ b/Documentation/dev-tools/kunit/usage.rst
> @@ -556,6 +556,11 @@ Once the kernel is built and installed, a simple
>
>  ...will run the tests.
>
> +.. note::
> +   Note that you should make your test depends on ``KUNIT=y`` in Kcofig if the
> +   test does not support module build.  Otherwise, it will trigger compile
> +   errors if ``CONFIG_KUNIT`` is ``m``.

s/Kcofig/Kconfig/

>  Writing new tests for other architectures
>  -----------------------------------------
>
> --
> 2.17.1
>
> --
> 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/20201012105420.5945-1-sjpark%40amazon.com.

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

* [PATCH] Documentation: kunit: Update Kconfig parts for KUNIT's module support
@ 2020-10-12 10:54 SeongJae Park
  2020-10-12 11:28 ` Marco Elver
  0 siblings, 1 reply; 5+ messages in thread
From: SeongJae Park @ 2020-10-12 10:54 UTC (permalink / raw)
  To: brendanhiggins
  Cc: SeongJae Park, corbet, skhan, linux-kselftest, kunit-dev,
	linux-doc, linux-kernel

From: SeongJae Park <sjpark@amazon.de>

If 'CONFIG_KUNIT=m', letting kunit tests that do not support loadable
module build depends on 'KUNIT' instead of 'KUNIT=y' result in compile
errors.  This commit updates the document for this.

Fixes: 9fe124bf1b77 ("kunit: allow kunit to be loaded as a module")
Signed-off-by: SeongJae Park <sjpark@amazon.de>
---
 Documentation/dev-tools/kunit/start.rst | 2 +-
 Documentation/dev-tools/kunit/usage.rst | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst
index d23385e3e159..454f307813ea 100644
--- a/Documentation/dev-tools/kunit/start.rst
+++ b/Documentation/dev-tools/kunit/start.rst
@@ -197,7 +197,7 @@ Now add the following to ``drivers/misc/Kconfig``:
 
 	config MISC_EXAMPLE_TEST
 		bool "Test for my example"
-		depends on MISC_EXAMPLE && KUNIT
+		depends on MISC_EXAMPLE && KUNIT=y
 
 and the following to ``drivers/misc/Makefile``:
 
diff --git a/Documentation/dev-tools/kunit/usage.rst b/Documentation/dev-tools/kunit/usage.rst
index 3c3fe8b5fecc..410380fc7fb4 100644
--- a/Documentation/dev-tools/kunit/usage.rst
+++ b/Documentation/dev-tools/kunit/usage.rst
@@ -556,6 +556,11 @@ Once the kernel is built and installed, a simple
 
 ...will run the tests.
 
+.. note::
+   Note that you should make your test depends on ``KUNIT=y`` in Kcofig if the
+   test does not support module build.  Otherwise, it will trigger compile
+   errors if ``CONFIG_KUNIT`` is ``m``.
+
 Writing new tests for other architectures
 -----------------------------------------
 
-- 
2.17.1


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

end of thread, other threads:[~2020-10-21 20:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-21 19:25 [PATCH] Documentation: kunit: Update Kconfig parts for KUNIT's module support SeongJae Park
2020-10-21 20:44 ` Brendan Higgins
  -- strict thread matches above, loose matches on Subject: below --
2020-10-12 10:54 SeongJae Park
2020-10-12 11:28 ` Marco Elver
2020-10-12 18:19   ` SeongJae Park

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).