* [PATCH] HID: uclogic: Modular KUnit tests should not depend on KUNIT=y
@ 2023-05-02 10:08 Geert Uytterhoeven
2023-05-04 6:04 ` David Gow
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2023-05-02 10:08 UTC (permalink / raw)
To: Jiri Kosina, Benjamin Tissoires, Daniel Latypov,
José Expósito, Brendan Higgins, David Gow
Cc: linux-input, linux-kselftest, kunit-dev, linux-kernel,
Geert Uytterhoeven
While KUnit tests that cannot be built as a loadable module must depend
on "KUNIT=y", this is not true for modular tests, where it adds an
unnecessary limitation.
Fix this by relaxing the dependency to "KUNIT".
Fixes: 08809e482a1c44d9 ("HID: uclogic: KUnit best practices and naming conventions")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/hid/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 4ce012f83253ec9f..b977450cac75265d 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -1285,7 +1285,7 @@ config HID_MCP2221
config HID_KUNIT_TEST
tristate "KUnit tests for HID" if !KUNIT_ALL_TESTS
- depends on KUNIT=y
+ depends on KUNIT
depends on HID_BATTERY_STRENGTH
depends on HID_UCLOGIC
default KUNIT_ALL_TESTS
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] HID: uclogic: Modular KUnit tests should not depend on KUNIT=y
2023-05-02 10:08 [PATCH] HID: uclogic: Modular KUnit tests should not depend on KUNIT=y Geert Uytterhoeven
@ 2023-05-04 6:04 ` David Gow
2023-05-15 16:31 ` José Expósito
0 siblings, 1 reply; 3+ messages in thread
From: David Gow @ 2023-05-04 6:04 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Jiri Kosina, Benjamin Tissoires, Daniel Latypov,
José Expósito, Brendan Higgins, linux-input,
linux-kselftest, kunit-dev, linux-kernel
On Tue, 2 May 2023 at 18:09, Geert Uytterhoeven <geert+renesas@glider.be> wrote:
>
> While KUnit tests that cannot be built as a loadable module must depend
> on "KUNIT=y", this is not true for modular tests, where it adds an
> unnecessary limitation.
>
> Fix this by relaxing the dependency to "KUNIT".
>
> Fixes: 08809e482a1c44d9 ("HID: uclogic: KUnit best practices and naming conventions")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
This works here, and I definitely agree we should get rid of these
unnecessary constraints.
Let me know if this should go in via the kselftest/kunit tree, or if
it makes sense to take this via input?
Reviewed-by: David Gow <davidgow@google.com>
Cheers,
-- David
> drivers/hid/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
> index 4ce012f83253ec9f..b977450cac75265d 100644
> --- a/drivers/hid/Kconfig
> +++ b/drivers/hid/Kconfig
> @@ -1285,7 +1285,7 @@ config HID_MCP2221
>
> config HID_KUNIT_TEST
> tristate "KUnit tests for HID" if !KUNIT_ALL_TESTS
> - depends on KUNIT=y
> + depends on KUNIT
> depends on HID_BATTERY_STRENGTH
> depends on HID_UCLOGIC
> default KUNIT_ALL_TESTS
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] HID: uclogic: Modular KUnit tests should not depend on KUNIT=y
2023-05-04 6:04 ` David Gow
@ 2023-05-15 16:31 ` José Expósito
0 siblings, 0 replies; 3+ messages in thread
From: José Expósito @ 2023-05-15 16:31 UTC (permalink / raw)
To: David Gow
Cc: Geert Uytterhoeven, Jiri Kosina, Benjamin Tissoires,
Daniel Latypov, Brendan Higgins, linux-input, linux-kselftest,
kunit-dev, linux-kernel
On Thu, May 04, 2023 at 02:04:18PM +0800, David Gow wrote:
> On Tue, 2 May 2023 at 18:09, Geert Uytterhoeven <geert+renesas@glider.be> wrote:
> >
> > While KUnit tests that cannot be built as a loadable module must depend
> > on "KUNIT=y", this is not true for modular tests, where it adds an
> > unnecessary limitation.
> >
> > Fix this by relaxing the dependency to "KUNIT".
> >
> > Fixes: 08809e482a1c44d9 ("HID: uclogic: KUnit best practices and naming conventions")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
>
> This works here, and I definitely agree we should get rid of these
> unnecessary constraints.
>
> Let me know if this should go in via the kselftest/kunit tree, or if
> it makes sense to take this via input?
>
> Reviewed-by: David Gow <davidgow@google.com>
>
> Cheers,
> -- David
>
> > drivers/hid/Kconfig | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
> > index 4ce012f83253ec9f..b977450cac75265d 100644
> > --- a/drivers/hid/Kconfig
> > +++ b/drivers/hid/Kconfig
> > @@ -1285,7 +1285,7 @@ config HID_MCP2221
> >
> > config HID_KUNIT_TEST
> > tristate "KUnit tests for HID" if !KUNIT_ALL_TESTS
> > - depends on KUNIT=y
> > + depends on KUNIT
Tested here as well with different configurations for the UCLogic
driver and it is working.
Reviewed-by: José Expósito <jose.exposito89@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-15 16:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-02 10:08 [PATCH] HID: uclogic: Modular KUnit tests should not depend on KUNIT=y Geert Uytterhoeven
2023-05-04 6:04 ` David Gow
2023-05-15 16:31 ` José Expósito
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).