aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/nvdimm/test
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2020-01-23 16:47:20 +0100
committerDan Williams <dan.j.williams@intel.com>2020-02-18 11:00:01 -0800
commitc0e71d602053e4e7637e4bc7d0bc9603ea77a33f (patch)
tree75def58bb3c97066d88499ef2824f00ea71e23a2 /tools/testing/nvdimm/test
parentMAINTAINERS: clarify maintenance of nvdimm testing tool (diff)
downloadlinux-dev-c0e71d602053e4e7637e4bc7d0bc9603ea77a33f.tar.xz
linux-dev-c0e71d602053e4e7637e4bc7d0bc9603ea77a33f.zip
tools/testing/nvdimm: Fix compilation failure without CONFIG_DEV_DAX_PMEM_COMPAT
When a kernel is configured without CONFIG_DEV_DAX_PMEM_COMPAT, the compilation of tools/testing/nvdimm fails with: Building modules, stage 2. MODPOST 11 modules ERROR: "dax_pmem_compat_test" [tools/testing/nvdimm/test/nfit_test.ko] undefined! Fix the problem by calling dax_pmem_compat_test() only if the kernel has the required functionality. Signed-off-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20200123154720.12097-1-jack@suse.cz Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'tools/testing/nvdimm/test')
-rw-r--r--tools/testing/nvdimm/test/nfit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c
index bf6422a6af7f..a8ee5c4d41eb 100644
--- a/tools/testing/nvdimm/test/nfit.c
+++ b/tools/testing/nvdimm/test/nfit.c
@@ -3164,7 +3164,9 @@ static __init int nfit_test_init(void)
mcsafe_test();
dax_pmem_test();
dax_pmem_core_test();
+#ifdef CONFIG_DEV_DAX_PMEM_COMPAT
dax_pmem_compat_test();
+#endif
nfit_test_setup(nfit_test_lookup, nfit_test_evaluate_dsm);