software node: introduce CONFIG_KUNIT_DRIVER_PE_TEST
diff mbox series

Message ID 1579018183-14879-1-git-send-email-alan.maguire@oracle.com
State New
Headers show
Series
  • software node: introduce CONFIG_KUNIT_DRIVER_PE_TEST
Related show

Commit Message

Alan Maguire Jan. 14, 2020, 4:09 p.m. UTC
currently the property entry kunit tests are built if CONFIG_KUNIT=y.
This will cause warnings when merged with the kunit tree that now
supports tristate CONFIG_KUNIT.  While the tests appear to compile
as a module, we get a warning about missing module license.

It's better to have a per-test suite CONFIG variable so that
we can do selective building of kunit-based suites, and can
also avoid merge issues like this.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: c032ace71c29 ("software node: add basic tests for property entries")
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
---
 drivers/base/test/Kconfig  | 3 +++
 drivers/base/test/Makefile | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

Comments

Randy Dunlap Jan. 14, 2020, 4:30 p.m. UTC | #1
Hi Alan,

On 1/14/20 8:09 AM, Alan Maguire wrote:
> currently the property entry kunit tests are built if CONFIG_KUNIT=y.
> This will cause warnings when merged with the kunit tree that now
> supports tristate CONFIG_KUNIT.  While the tests appear to compile
> as a module, we get a warning about missing module license.
> 
> It's better to have a per-test suite CONFIG variable so that
> we can do selective building of kunit-based suites, and can
> also avoid merge issues like this.
> 
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>

Reported-by: Randy Dunlap <rdunlap@infradead.org>

> Fixes: c032ace71c29 ("software node: add basic tests for property entries")
> Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
> ---
>  drivers/base/test/Kconfig  | 3 +++
>  drivers/base/test/Makefile | 2 +-
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/base/test/Kconfig b/drivers/base/test/Kconfig
> index 86e85da..d29ae95 100644
> --- a/drivers/base/test/Kconfig
> +++ b/drivers/base/test/Kconfig
> @@ -8,3 +8,6 @@ config TEST_ASYNC_DRIVER_PROBE
>  	  The module name will be test_async_driver_probe.ko
>  
>  	  If unsure say N.
> +config KUNIT_DRIVER_PE_TEST
> +	bool "KUnit Tests for property entry API"
> +	depends on KUNIT

Why is this bool instead of tristate?

> diff --git a/drivers/base/test/Makefile b/drivers/base/test/Makefile
> index 2214310..3ca5636 100644
> --- a/drivers/base/test/Makefile
> +++ b/drivers/base/test/Makefile
> @@ -1,4 +1,4 @@
>  # SPDX-License-Identifier: GPL-2.0
>  obj-$(CONFIG_TEST_ASYNC_DRIVER_PROBE)	+= test_async_driver_probe.o
>  
> -obj-$(CONFIG_KUNIT) += property-entry-test.o
> +obj-$(CONFIG_KUNIT_DRIVER_PE_TEST) += property-entry-test.o
> 

thanks.
Alan Maguire Jan. 14, 2020, 4:42 p.m. UTC | #2
On Tue, 14 Jan 2020, Randy Dunlap wrote:

> Hi Alan,
> 
> On 1/14/20 8:09 AM, Alan Maguire wrote:
> > currently the property entry kunit tests are built if CONFIG_KUNIT=y.
> > This will cause warnings when merged with the kunit tree that now
> > supports tristate CONFIG_KUNIT.  While the tests appear to compile
> > as a module, we get a warning about missing module license.
> > 
> > It's better to have a per-test suite CONFIG variable so that
> > we can do selective building of kunit-based suites, and can
> > also avoid merge issues like this.
> > 
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
>

Apologies for missing you out here.
 
> > Fixes: c032ace71c29 ("software node: add basic tests for property entries")
> > Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
> > ---
> >  drivers/base/test/Kconfig  | 3 +++
> >  drivers/base/test/Makefile | 2 +-
> >  2 files changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/base/test/Kconfig b/drivers/base/test/Kconfig
> > index 86e85da..d29ae95 100644
> > --- a/drivers/base/test/Kconfig
> > +++ b/drivers/base/test/Kconfig
> > @@ -8,3 +8,6 @@ config TEST_ASYNC_DRIVER_PROBE
> >  	  The module name will be test_async_driver_probe.ko
> >  
> >  	  If unsure say N.
> > +config KUNIT_DRIVER_PE_TEST
> > +	bool "KUnit Tests for property entry API"
> > +	depends on KUNIT
> 
> Why is this bool instead of tristate?
>

The support for building kunit and kunit tests as modules has not merged 
into linux-next yet, so if we set the option to tristate the build would
fail for allmodconfig builds.   Once it's merged we can revisit though; I 
should have mentioned this, thanks for reminding me!

Alan
 
> > diff --git a/drivers/base/test/Makefile b/drivers/base/test/Makefile
> > index 2214310..3ca5636 100644
> > --- a/drivers/base/test/Makefile
> > +++ b/drivers/base/test/Makefile
> > @@ -1,4 +1,4 @@
> >  # SPDX-License-Identifier: GPL-2.0
> >  obj-$(CONFIG_TEST_ASYNC_DRIVER_PROBE)	+= test_async_driver_probe.o
> >  
> > -obj-$(CONFIG_KUNIT) += property-entry-test.o
> > +obj-$(CONFIG_KUNIT_DRIVER_PE_TEST) += property-entry-test.o
> > 
> 
> thanks.
> -- 
> ~Randy
> 
>
Randy Dunlap Jan. 14, 2020, 4:45 p.m. UTC | #3
On 1/14/20 8:42 AM, Alan Maguire wrote:
> On Tue, 14 Jan 2020, Randy Dunlap wrote:
> 
>> Hi Alan,
>>
>> On 1/14/20 8:09 AM, Alan Maguire wrote:
>>> currently the property entry kunit tests are built if CONFIG_KUNIT=y.
>>> This will cause warnings when merged with the kunit tree that now
>>> supports tristate CONFIG_KUNIT.  While the tests appear to compile
>>> as a module, we get a warning about missing module license.
>>>
>>> It's better to have a per-test suite CONFIG variable so that
>>> we can do selective building of kunit-based suites, and can
>>> also avoid merge issues like this.
>>>
>>> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
>>
>> Reported-by: Randy Dunlap <rdunlap@infradead.org>
>>
> 
> Apologies for missing you out here.
>  
>>> Fixes: c032ace71c29 ("software node: add basic tests for property entries")
>>> Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
>>> ---
>>>  drivers/base/test/Kconfig  | 3 +++
>>>  drivers/base/test/Makefile | 2 +-
>>>  2 files changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/base/test/Kconfig b/drivers/base/test/Kconfig
>>> index 86e85da..d29ae95 100644
>>> --- a/drivers/base/test/Kconfig
>>> +++ b/drivers/base/test/Kconfig
>>> @@ -8,3 +8,6 @@ config TEST_ASYNC_DRIVER_PROBE
>>>  	  The module name will be test_async_driver_probe.ko
>>>  
>>>  	  If unsure say N.
>>> +config KUNIT_DRIVER_PE_TEST
>>> +	bool "KUnit Tests for property entry API"
>>> +	depends on KUNIT
>>
>> Why is this bool instead of tristate?
>>
> 
> The support for building kunit and kunit tests as modules has not merged 
> into linux-next yet, so if we set the option to tristate the build would
> fail for allmodconfig builds.   Once it's merged we can revisit though; I 
> should have mentioned this, thanks for reminding me!

Oh. I see.  Thanks.
Rafael J. Wysocki Jan. 14, 2020, 10:43 p.m. UTC | #4
On Tuesday, January 14, 2020 5:45:56 PM CET Randy Dunlap wrote:
> On 1/14/20 8:42 AM, Alan Maguire wrote:
> > On Tue, 14 Jan 2020, Randy Dunlap wrote:
> > 
> >> Hi Alan,
> >>
> >> On 1/14/20 8:09 AM, Alan Maguire wrote:
> >>> currently the property entry kunit tests are built if CONFIG_KUNIT=y.
> >>> This will cause warnings when merged with the kunit tree that now
> >>> supports tristate CONFIG_KUNIT.  While the tests appear to compile
> >>> as a module, we get a warning about missing module license.
> >>>
> >>> It's better to have a per-test suite CONFIG variable so that
> >>> we can do selective building of kunit-based suites, and can
> >>> also avoid merge issues like this.
> >>>
> >>> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> >>
> >> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> >>
> > 
> > Apologies for missing you out here.
> >  
> >>> Fixes: c032ace71c29 ("software node: add basic tests for property entries")
> >>> Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
> >>> ---
> >>>  drivers/base/test/Kconfig  | 3 +++
> >>>  drivers/base/test/Makefile | 2 +-
> >>>  2 files changed, 4 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/drivers/base/test/Kconfig b/drivers/base/test/Kconfig
> >>> index 86e85da..d29ae95 100644
> >>> --- a/drivers/base/test/Kconfig
> >>> +++ b/drivers/base/test/Kconfig
> >>> @@ -8,3 +8,6 @@ config TEST_ASYNC_DRIVER_PROBE
> >>>  	  The module name will be test_async_driver_probe.ko
> >>>  
> >>>  	  If unsure say N.
> >>> +config KUNIT_DRIVER_PE_TEST
> >>> +	bool "KUnit Tests for property entry API"
> >>> +	depends on KUNIT
> >>
> >> Why is this bool instead of tristate?
> >>
> > 
> > The support for building kunit and kunit tests as modules has not merged 
> > into linux-next yet, so if we set the option to tristate the build would
> > fail for allmodconfig builds.   Once it's merged we can revisit though; I 
> > should have mentioned this, thanks for reminding me!
> 
> Oh. I see.  Thanks.

Patch applied, thanks!
Brendan Higgins Jan. 14, 2020, 11:52 p.m. UTC | #5
On Tue, Jan 14, 2020 at 2:43 PM Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
>
> On Tuesday, January 14, 2020 5:45:56 PM CET Randy Dunlap wrote:
> > On 1/14/20 8:42 AM, Alan Maguire wrote:
> > > On Tue, 14 Jan 2020, Randy Dunlap wrote:
> > >
> > >> Hi Alan,
> > >>
> > >> On 1/14/20 8:09 AM, Alan Maguire wrote:
> > >>> currently the property entry kunit tests are built if CONFIG_KUNIT=y.
> > >>> This will cause warnings when merged with the kunit tree that now
> > >>> supports tristate CONFIG_KUNIT.  While the tests appear to compile
> > >>> as a module, we get a warning about missing module license.
> > >>>
> > >>> It's better to have a per-test suite CONFIG variable so that
> > >>> we can do selective building of kunit-based suites, and can
> > >>> also avoid merge issues like this.
> > >>>
> > >>> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > >>
> > >> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> > >>
> > >
> > > Apologies for missing you out here.
> > >
> > >>> Fixes: c032ace71c29 ("software node: add basic tests for property entries")
> > >>> Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
> > >>> ---
> > >>>  drivers/base/test/Kconfig  | 3 +++
> > >>>  drivers/base/test/Makefile | 2 +-
> > >>>  2 files changed, 4 insertions(+), 1 deletion(-)
> > >>>
> > >>> diff --git a/drivers/base/test/Kconfig b/drivers/base/test/Kconfig
> > >>> index 86e85da..d29ae95 100644
> > >>> --- a/drivers/base/test/Kconfig
> > >>> +++ b/drivers/base/test/Kconfig
> > >>> @@ -8,3 +8,6 @@ config TEST_ASYNC_DRIVER_PROBE
> > >>>     The module name will be test_async_driver_probe.ko
> > >>>
> > >>>     If unsure say N.
> > >>> +config KUNIT_DRIVER_PE_TEST
> > >>> + bool "KUnit Tests for property entry API"
> > >>> + depends on KUNIT
> > >>
> > >> Why is this bool instead of tristate?
> > >>
> > >
> > > The support for building kunit and kunit tests as modules has not merged
> > > into linux-next yet, so if we set the option to tristate the build would
> > > fail for allmodconfig builds.   Once it's merged we can revisit though; I
> > > should have mentioned this, thanks for reminding me!
> >
> > Oh. I see.  Thanks.
>
> Patch applied, thanks!

Cool, looks good. Thanks!

Patch
diff mbox series

diff --git a/drivers/base/test/Kconfig b/drivers/base/test/Kconfig
index 86e85da..d29ae95 100644
--- a/drivers/base/test/Kconfig
+++ b/drivers/base/test/Kconfig
@@ -8,3 +8,6 @@  config TEST_ASYNC_DRIVER_PROBE
 	  The module name will be test_async_driver_probe.ko
 
 	  If unsure say N.
+config KUNIT_DRIVER_PE_TEST
+	bool "KUnit Tests for property entry API"
+	depends on KUNIT
diff --git a/drivers/base/test/Makefile b/drivers/base/test/Makefile
index 2214310..3ca5636 100644
--- a/drivers/base/test/Makefile
+++ b/drivers/base/test/Makefile
@@ -1,4 +1,4 @@ 
 # SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_TEST_ASYNC_DRIVER_PROBE)	+= test_async_driver_probe.o
 
-obj-$(CONFIG_KUNIT) += property-entry-test.o
+obj-$(CONFIG_KUNIT_DRIVER_PE_TEST) += property-entry-test.o