diff mbox series

kunit: add PRINTK dependency

Message ID 20190906152800.1662489-1-arnd@arndb.de (mailing list archive)
State New
Headers show
Series kunit: add PRINTK dependency | expand

Commit Message

Arnd Bergmann Sept. 6, 2019, 3:27 p.m. UTC
The vprintk_emit() function is not available when CONFIG_PRINTK
is disabled:

kunit/test.c:22:9: error: implicit declaration of function 'vprintk_emit' [-Werror,-Wimplicit-function-declaration]

I suppose without printk(), there is not much use in kunit
either, so add a Kconfig depenedency here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 kunit/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Bird, Tim Sept. 6, 2019, 3:31 p.m. UTC | #1
Minor spelling nit..

> -----Original Message-----
> From: Arnd Bergmann
> 
> The vprintk_emit() function is not available when CONFIG_PRINTK
> is disabled:
> 
> kunit/test.c:22:9: error: implicit declaration of function 'vprintk_emit' [-
> Werror,-Wimplicit-function-declaration]
> 
> I suppose without printk(), there is not much use in kunit
> either, so add a Kconfig depenedency here.
depenedency -> dependency

> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  kunit/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kunit/Kconfig b/kunit/Kconfig
> index 8541ef95b65a..e80d8af00454 100644
> --- a/kunit/Kconfig
> +++ b/kunit/Kconfig
> @@ -6,6 +6,7 @@ menu "KUnit support"
> 
>  config KUNIT
>  	bool "Enable support for unit tests (KUnit)"
> +	depends on PRINTK
>  	help
>  	  Enables support for kernel unit tests (KUnit), a lightweight unit
>  	  testing and mocking framework for the Linux kernel. These tests are
> --
> 2.20.0
Shuah Khan Sept. 6, 2019, 3:39 p.m. UTC | #2
On 9/6/19 9:27 AM, Arnd Bergmann wrote:
> The vprintk_emit() function is not available when CONFIG_PRINTK
> is disabled:
> 
> kunit/test.c:22:9: error: implicit declaration of function 'vprintk_emit' [-Werror,-Wimplicit-function-declaration]
> 
> I suppose without printk(), there is not much use in kunit
> either, so add a Kconfig depenedency here.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   kunit/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/kunit/Kconfig b/kunit/Kconfig
> index 8541ef95b65a..e80d8af00454 100644
> --- a/kunit/Kconfig
> +++ b/kunit/Kconfig
> @@ -6,6 +6,7 @@ menu "KUnit support"
>   
>   config KUNIT
>   	bool "Enable support for unit tests (KUnit)"
> +	depends on PRINTK
>   	help
>   	  Enables support for kernel unit tests (KUnit), a lightweight unit
>   	  testing and mocking framework for the Linux kernel. These tests are
> 

Hi Arnd,

This is found and fixed already. I am just about to apply Berndan's
patch that fixes this dependency. All of this vprintk_emit() stuff
is redone.

thanks,
-- Shuah
Arnd Bergmann Sept. 6, 2019, 4:02 p.m. UTC | #3
On Fri, Sep 6, 2019 at 5:39 PM Shuah Khan <skhan@linuxfoundation.org> wrote:

> >   config KUNIT
> >       bool "Enable support for unit tests (KUnit)"
> > +     depends on PRINTK
> >       help
> >         Enables support for kernel unit tests (KUnit), a lightweight unit
> >         testing and mocking framework for the Linux kernel. These tests are
> >
>
> Hi Arnd,
>
> This is found and fixed already. I am just about to apply Berndan's
> patch that fixes this dependency. All of this vprintk_emit() stuff
> is redone.

Ok, perfect. Unfortunately I only started testing the coming
linux-next release after Stephen went on his break, so
I'm missing some updates.

    Arnd
Shuah Khan Sept. 6, 2019, 4:08 p.m. UTC | #4
On 9/6/19 10:02 AM, Arnd Bergmann wrote:
> On Fri, Sep 6, 2019 at 5:39 PM Shuah Khan <skhan@linuxfoundation.org> wrote:
> 
>>>    config KUNIT
>>>        bool "Enable support for unit tests (KUnit)"
>>> +     depends on PRINTK
>>>        help
>>>          Enables support for kernel unit tests (KUnit), a lightweight unit
>>>          testing and mocking framework for the Linux kernel. These tests are
>>>
>>
>> Hi Arnd,
>>
>> This is found and fixed already. I am just about to apply Berndan's
>> patch that fixes this dependency. All of this vprintk_emit() stuff
>> is redone.
> 
> Ok, perfect. Unfortunately I only started testing the coming
> linux-next release after Stephen went on his break, so
> I'm missing some updates.
> 

No worries. I am pushing it now - should be there in 5-10 mins.

Please use linuxk-kselftest next.

Let me know if you see any issues. Thanks for testing it.

thanks,
-- Shuah
Brendan Higgins Sept. 7, 2019, 12:43 a.m. UTC | #5
On Fri, Sep 6, 2019 at 9:08 AM Shuah Khan <skhan@linuxfoundation.org> wrote:
>
> On 9/6/19 10:02 AM, Arnd Bergmann wrote:
> > On Fri, Sep 6, 2019 at 5:39 PM Shuah Khan <skhan@linuxfoundation.org> wrote:
> >
> >>>    config KUNIT
> >>>        bool "Enable support for unit tests (KUnit)"
> >>> +     depends on PRINTK
> >>>        help
> >>>          Enables support for kernel unit tests (KUnit), a lightweight unit
> >>>          testing and mocking framework for the Linux kernel. These tests are
> >>>
> >>
> >> Hi Arnd,
> >>
> >> This is found and fixed already. I am just about to apply Berndan's
> >> patch that fixes this dependency. All of this vprintk_emit() stuff
> >> is redone.
> >
> > Ok, perfect. Unfortunately I only started testing the coming
> > linux-next release after Stephen went on his break, so
> > I'm missing some updates.
> >
>
> No worries. I am pushing it now - should be there in 5-10 mins.
>
> Please use linuxk-kselftest next.
>
> Let me know if you see any issues. Thanks for testing it.

Hi Arnd, Shuah accepted my version of the fix earlier today.
Nevertheless, I really appreciate you looking into this. Sorry for
wasting your time.

Please let me know if you run into any additional issues.

Thanks!
diff mbox series

Patch

diff --git a/kunit/Kconfig b/kunit/Kconfig
index 8541ef95b65a..e80d8af00454 100644
--- a/kunit/Kconfig
+++ b/kunit/Kconfig
@@ -6,6 +6,7 @@  menu "KUnit support"
 
 config KUNIT
 	bool "Enable support for unit tests (KUnit)"
+	depends on PRINTK
 	help
 	  Enables support for kernel unit tests (KUnit), a lightweight unit
 	  testing and mocking framework for the Linux kernel. These tests are