summaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm/Kconfig
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2019-09-05 00:43:31 +0200
committerJason Gunthorpe <jgg@mellanox.com>2019-09-07 09:28:05 +0200
commit62974fc389b364d8af70e044836362222bd3ae53 (patch)
treec3f67ed59e33874884569ecac499a2052116341c /drivers/nvdimm/Kconfig
parentmm, notifier: Catch sleeping/blocking for !blockable (diff)
downloadlinux-62974fc389b364d8af70e044836362222bd3ae53.tar.xz
linux-62974fc389b364d8af70e044836362222bd3ae53.zip
libnvdimm: Enable unit test infrastructure compile checks
The infrastructure to mock core libnvdimm routines for unit testing purposes is prone to bitrot relative to refactoring of that core. Arrange for the unit test core to be built when CONFIG_COMPILE_TEST=y. This does not result in a functional unit test environment, it is only a helper for 0day to catch unit test build regressions. Note that there are a few x86isms in the implementation, so this does not bother compile testing this architectures other than 64-bit x86. Link: https://lore.kernel.org/r/156763690875.2556198.15786177395425033830.stgit@dwillia2-desk3.amr.corp.intel.com Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/nvdimm/Kconfig')
-rw-r--r--drivers/nvdimm/Kconfig12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/nvdimm/Kconfig b/drivers/nvdimm/Kconfig
index a5fde15e91d3..36af7af6b7cf 100644
--- a/drivers/nvdimm/Kconfig
+++ b/drivers/nvdimm/Kconfig
@@ -118,4 +118,16 @@ config NVDIMM_KEYS
depends on ENCRYPTED_KEYS
depends on (LIBNVDIMM=ENCRYPTED_KEYS) || LIBNVDIMM=m
+config NVDIMM_TEST_BUILD
+ tristate "Build the unit test core"
+ depends on m
+ depends on COMPILE_TEST && X86_64
+ default m if COMPILE_TEST
+ help
+ Build the core of the unit test infrastructure. The result of
+ this build is non-functional for unit test execution, but it
+ otherwise helps catch build errors induced by changes to the
+ core devm_memremap_pages() implementation and other
+ infrastructure.
+
endif