Linux-kselftest Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] kunit: add PRINTK dependency
@ 2019-09-06 15:27 Arnd Bergmann
  2019-09-06 15:31 ` Tim.Bird
  2019-09-06 15:39 ` Shuah Khan
  0 siblings, 2 replies; 6+ messages in thread
From: Arnd Bergmann @ 2019-09-06 15:27 UTC (permalink / raw)
  To: Brendan Higgins
  Cc: Arnd Bergmann, Greg Kroah-Hartman, Logan Gunthorpe, Stephen Boyd,
	Shuah Khan, linux-kselftest, kunit-dev, linux-kernel

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


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

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06 15:27 [PATCH] kunit: add PRINTK dependency Arnd Bergmann
2019-09-06 15:31 ` Tim.Bird
2019-09-06 15:39 ` Shuah Khan
2019-09-06 16:02   ` Arnd Bergmann
2019-09-06 16:08     ` Shuah Khan
2019-09-07  0:43       ` Brendan Higgins

Linux-kselftest Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-kselftest/0 linux-kselftest/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-kselftest linux-kselftest/ https://lore.kernel.org/linux-kselftest \
		linux-kselftest@vger.kernel.org linux-kselftest@archiver.kernel.org
	public-inbox-index linux-kselftest

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kselftest


AGPL code for this site: git clone https://public-inbox.org/ public-inbox