tools/testing/nvdimm: Fix compilation failure without CONFIG_DEV_DAX_PMEM_COMPAT
PATCH 1/1 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.
--- tools/testing/nvdimm/test/nfit.c | 2 ++ 1 file changed, 2 insertions(+)
tools/testing/nvdimm/test/nfit.c +2 -0
@@ -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);
Signature · 4 lines
2.16.4 _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]
Quoted 11 lines · Jan Kara
When a kernel is configured without
CONFIG_DEV_DAX_PMEM_COMPAT, the compilation oftools/testing/nvdimmfails 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 <[email protected]>
Ping?
Honza
Quoted 21 lines
--- tools/testing/nvdimm/test/nfit.c | 2 ++ 1 file changed, 2 insertions(+)tools/testing/nvdimm/test/nfit.c +2
-0@@ -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);Signature · 1 line
2.16.4
Signature · 5 lines
Jan Kara <[email protected]> SUSE Labs, CR _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]
Quoted 11 lines · Jan Kara
When a kernel is configured without
CONFIG_DEV_DAX_PMEM_COMPAT, the compilation oftools/testing/nvdimmfails 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 <[email protected]>
What's the motivation? Is this just to fix randconfig builds? The reason I ask is that the test suite will expect to be able to find the dax_pmem_compat module, so it doesn't make sense to me to disable those tests only in the kernel as you'll hit a problem when running the tests anyway.
But, I understand if you want to prevent build bots from hitting compilation failures due to this.
-Jeff
Quoted 9 lines
--- tools/testing/nvdimm/test/nfit.c | 2 ++ 1 file changed, 2 insertions(+)tools/testing/nvdimm/test/nfit.c +0
-0
tools/testing/nvdimm/test/nfit.c static __init int nfit_test_init(void) · line 3171
Quoted 8 lines
tools/testing/nvdimm/test/nfit.c +2
-0@@ -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);
_______________________________________________
Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]
Quoted 13 lines · Jeff Moyer
Quoted 10 lines · Jan Kara
When a kernel is configured without
CONFIG_DEV_DAX_PMEM_COMPAT, the compilation oftools/testing/nvdimmfails 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.
Quoted 7 lines
Quoted 1 line
Signed-off-by Jan Kara <[email protected]>What's the motivation? Is this just to fix randconfig builds? The reason I ask is that the test suite will expect to be able to find the
dax_pmem_compatmodule, so it doesn't make sense to me to disable those tests only in the kernel as you'll hit a problem when running the tests anyway.
Yeah, at a minimum you'd also need to go fix up nfit_test_init() to not check for the dax_pmem_compat module:
https://github.com/pmem/ndctl/blob/master/test/core.c#L119
Quoted 2 lines
But, I understand if you want to prevent build bots from hitting compilation failures due to this.
Hmm, build bots would only hit what's covered by CONFIG_NVDIMM_TEST_BUILD, and that's only building tools/testing/nvdimm/test/iomap.c.
Jan, were you just looking to use nfit_test outside of running the ndctl test suites? Or was this just a drive-by compilation test?
_______________________________________________
Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]
Quoted 22 lines · Dan Williams
Quoted 13 lines · Jeff Moyer
Quoted 10 lines · Jan Kara
When a kernel is configured without
CONFIG_DEV_DAX_PMEM_COMPAT, the compilation oftools/testing/nvdimmfails 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.Quoted 7 lines
Quoted 1 line
Signed-off-by Jan Kara <[email protected]>What's the motivation? Is this just to fix randconfig builds? The reason I ask is that the test suite will expect to be able to find the
dax_pmem_compatmodule, so it doesn't make sense to me to disable those tests only in the kernel as you'll hit a problem when running the tests anyway.
Quoted 4 lines
Yeah, at a minimum you'd also need to go fix up
nfit_test_init()to not check for thedax_pmem_compatmodule:
OK.
Quoted 9 lines
Quoted 2 lines
But, I understand if you want to prevent build bots from hitting compilation failures due to this.
Hmm, build bots would only hit what's covered by
CONFIG_NVDIMM_TEST_BUILD, and that's only buildingtools/testing/nvdimm/test/iomap.c.Jan, were you just looking to use
nfit_testoutside of running the ndctl test suites? Or was this just a drive-by compilation test?
The problem is following: We build our distro kernels without CONFIG_DEV_DAX_PMEM_COMPAT because we don't need that functionality. And Jing Han (from Intel ;) is now complaining that he cannot compile and run the ndctl testsuite on our kernels... It seems stupid to enable that config option for all distro users just to be able to run the testsuite but OTOH it would be neat to be able to run the testsuite with stock distro config.
Honza
Signature · 5 lines
Jan Kara <[email protected]> SUSE Labs, CR _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]
Quoted 41 lines · Jan Kara
Quoted 22 lines · Dan Williams
Quoted 13 lines · Jeff Moyer
Quoted 10 lines · Jan Kara
When a kernel is configured without
CONFIG_DEV_DAX_PMEM_COMPAT, the compilation oftools/testing/nvdimmfails 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.Quoted 7 lines
Quoted 1 line
Signed-off-by Jan Kara <[email protected]>What's the motivation? Is this just to fix randconfig builds? The reason I ask is that the test suite will expect to be able to find the
dax_pmem_compatmodule, so it doesn't make sense to me to disable those tests only in the kernel as you'll hit a problem when running the tests anyway.Quoted 4 lines
Yeah, at a minimum you'd also need to go fix up
nfit_test_init()to not check for thedax_pmem_compatmodule:OK.
Quoted 9 lines
Quoted 2 lines
But, I understand if you want to prevent build bots from hitting compilation failures due to this.
Hmm, build bots would only hit what's covered by
CONFIG_NVDIMM_TEST_BUILD, and that's only buildingtools/testing/nvdimm/test/iomap.c.Jan, were you just looking to use
nfit_testoutside of running the ndctl test suites? Or was this just a drive-by compilation test?
Quoted 7 lines
The problem is following: We build our distro kernels without
CONFIG_DEV_DAX_PMEM_COMPATbecause we don't need that functionality. And Jing Han (from Intel ;) is now complaining that he cannot compile and run the ndctl testsuite on our kernels... It seems stupid to enable that config option for all distro users just to be able to run the testsuite but OTOH it would be neat to be able to run the testsuite with stock distro config.
Sounds good, minus the fact that Jing and I were not on the same page. I'll send the ndctl fixup.
_______________________________________________
Linux-nvdimm mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Quoted 19 lines · Dan Williams
Quoted 10 lines · Jan Kara
Quoted 9 lines
Quoted 2 lines
But, I understand if you want to prevent build bots from hitting compilation failures due to this.
Hmm, build bots would only hit what's covered by
CONFIG_NVDIMM_TEST_BUILD, and that's only buildingtools/testing/nvdimm/test/iomap.c.Jan, were you just looking to use
nfit_testoutside of running the ndctl test suites? Or was this just a drive-by compilation test?Quoted 7 lines
The problem is following: We build our distro kernels without
CONFIG_DEV_DAX_PMEM_COMPATbecause we don't need that functionality. And Jing Han (from Intel ;) is now complaining that he cannot compile and run the ndctl testsuite on our kernels... It seems stupid to enable that config option for all distro users just to be able to run the testsuite but OTOH it would be neat to be able to run the testsuite with stock distro config.
Quoted 2 lines
Sounds good, minus the fact that Jing and I were not on the same page. I'll send the ndctl fixup.
Thanks!
Honza
Signature · 5 lines
Jan Kara <[email protected]> SUSE Labs, CR _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]