Skip to contentSkip to conversation

kunit: add PRINTK dependency

PATCH In review Arnd Bergmann 4 participants 6 messages Sep 6, 2019 – Sep 7, 2019 Kselftest

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kunit: add PRINTK dependency

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.

---
 kunit/Kconfig | 1 +
 1 file changed, 1 insertion(+)
kunit/Kconfig +1 -0
index 8541ef95b65a..e80d8af00454 100644
@@ -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
Signature · 1 line
2.20.0
#1 lore raw

Minor spelling nit..

Quoted 11 lines

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

Quoted 20 lines
---
 kunit/Kconfig | 1 +
 1 file changed, 1 insertion(+)
kunit/Kconfig +1 -1
index 8541ef95b65a..e80d8af00454 100644
@@ -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

maintainer
#2 lore raw
In reply to Arnd Bergmann
Quoted 19 lines · 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.

---
  kunit/Kconfig | 1 +
  1 file changed, 1 insertion(+)
kunit/Kconfig +0 -0
index 8541ef95b65a..e80d8af00454 100644

kunit/Kconfig menu "KUnit support" · line 12

Quoted 7 lines
kunit/Kconfig +1 -0
@@ -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

#3 lore raw
Quoted 8 lines · Shuah Khan
Quoted 7 lines

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

Quoted 5 lines

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

maintainer
#4 lore raw
Quoted 12 lines · Arnd Bergmann
Quoted 10 lines · Shuah Khan
Quoted 7 lines

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,

Quoted 8 lines
Quoted 3 lines

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

#5 lore raw
Quoted 23 lines · Shuah Khan
Quoted 12 lines · Arnd Bergmann
Quoted 10 lines · Shuah Khan
Quoted 7 lines

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,

Quoted 8 lines
Quoted 3 lines

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.

Quoted 5 lines

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!