Jan Kara <[email protected]> writes:

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

> ---
>  tools/testing/nvdimm/test/nfit.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> 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);
_______________________________________________
Linux-nvdimm mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to