LKML Archive on
 help / color / Atom feed
From: Arnd Bergmann <>
To: Andrew Morton <>,
	"Luis R. Rodriguez" <>
Cc: Arnd Bergmann <>,
Subject: [PATCH] kmod: add dependencies for test module
Date: Fri, 30 Jun 2017 17:47:44 +0200
Message-ID: <> (raw)

When we try to 'select' drivers whose dependencies are not met,
we get a kconfig warning and undefined behavior as further 'select'
statements in those drivers can not be honored:

warning: (TEST_KMOD) selects TUN which has unmet direct dependencies (NETDEVICES && NET_CORE && INET)
warning: (TEST_KMOD) selects XFS_FS which has unmet direct dependencies (BLOCK && (64BIT || LBDAF))
ERROR: "iomap_zero_range" [fs/xfs/xfs.ko] undefined!
ERROR: "iomap_fiemap" [fs/xfs/xfs.ko] undefined!
ERROR: "iomap_page_mkwrite" [fs/xfs/xfs.ko] undefined!

To work around that, this adds the dependencies required by the
'tun', 'xfs' and 'btrfs' modules for CONFIG_TEST_KMOD, guaranteeing
that we can always enable those, and fixing the 'randconfig' issues.

Unfortunately, there is another problem that I have not found a
good solution for: If any of the three drivers are built-in rather
than loadable modules, then the module load test will later fail
at runtime.

Fixes: ec159fed8677 ("kmod: add test driver to stress test the module loader")
Signed-off-by: Arnd Bergmann <>
 lib/Kconfig.debug | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 411cddd713c0..0f7ba738ef7a 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1883,6 +1883,8 @@ config TEST_KMOD
 	tristate "kmod stress tester"
 	default n
 	depends on m
+	depends on BLOCK && (64BIT || LBDAF)	  # for XFS, BTRFS
+	depends on NETDEVICES && NET_CORE && INET # for TUN
 	select TEST_LKM
 	select XFS_FS
 	select TUN

             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-30 15:47 Arnd Bergmann [this message]
2017-06-30 22:54 ` Luis R. Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git
	git clone --mirror lkml/git/9.git
	git clone --mirror lkml/git/10.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone