linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools/testing/nvdimm: Fix compilation failure without CONFIG_DEV_DAX_PMEM_COMPAT
@ 2020-01-23 15:47 Jan Kara
  2020-02-10 11:28 ` Jan Kara
  2020-02-12 14:04 ` Jeff Moyer
  0 siblings, 2 replies; 7+ messages in thread
From: Jan Kara @ 2020-01-23 15:47 UTC (permalink / raw)
  To: Dan Williams; +Cc: linux-nvdimm, Jan Kara

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>
---
 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);
 
-- 
2.16.4
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/testing/nvdimm: Fix compilation failure without CONFIG_DEV_DAX_PMEM_COMPAT
  2020-01-23 15:47 [PATCH] tools/testing/nvdimm: Fix compilation failure without CONFIG_DEV_DAX_PMEM_COMPAT Jan Kara
@ 2020-02-10 11:28 ` Jan Kara
  2020-02-12 14:04 ` Jeff Moyer
  1 sibling, 0 replies; 7+ messages in thread
From: Jan Kara @ 2020-02-10 11:28 UTC (permalink / raw)
  To: Dan Williams; +Cc: linux-nvdimm, Jan Kara

On Thu 23-01-20 16:47:20, Jan Kara wrote:
> 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>

Ping?

								Honza

> ---
>  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);
>  
> -- 
> 2.16.4
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/testing/nvdimm: Fix compilation failure without CONFIG_DEV_DAX_PMEM_COMPAT
  2020-01-23 15:47 [PATCH] tools/testing/nvdimm: Fix compilation failure without CONFIG_DEV_DAX_PMEM_COMPAT Jan Kara
  2020-02-10 11:28 ` Jan Kara
@ 2020-02-12 14:04 ` Jeff Moyer
  2020-02-12 20:49   ` Dan Williams
  1 sibling, 1 reply; 7+ messages in thread
From: Jeff Moyer @ 2020-02-12 14:04 UTC (permalink / raw)
  To: Jan Kara; +Cc: linux-nvdimm

Jan Kara <jack@suse.cz> 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 <jack@suse.cz>

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 -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/testing/nvdimm: Fix compilation failure without CONFIG_DEV_DAX_PMEM_COMPAT
  2020-02-12 14:04 ` Jeff Moyer
@ 2020-02-12 20:49   ` Dan Williams
  2020-02-13 20:58     ` Jan Kara
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Williams @ 2020-02-12 20:49 UTC (permalink / raw)
  To: Jeff Moyer; +Cc: Jan Kara, linux-nvdimm

On Wed, Feb 12, 2020 at 6:04 AM Jeff Moyer <jmoyer@redhat.com> wrote:
>
> Jan Kara <jack@suse.cz> 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 <jack@suse.cz>
>
> 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.

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

> 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 -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/testing/nvdimm: Fix compilation failure without CONFIG_DEV_DAX_PMEM_COMPAT
  2020-02-12 20:49   ` Dan Williams
@ 2020-02-13 20:58     ` Jan Kara
  2020-02-14 16:13       ` Dan Williams
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Kara @ 2020-02-13 20:58 UTC (permalink / raw)
  To: Dan Williams; +Cc: Jan Kara, linux-nvdimm

On Wed 12-02-20 12:49:41, Dan Williams wrote:
> On Wed, Feb 12, 2020 at 6:04 AM Jeff Moyer <jmoyer@redhat.com> wrote:
> >
> > Jan Kara <jack@suse.cz> 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 <jack@suse.cz>
> >
> > 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.
> 
> 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

OK.

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

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


-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/testing/nvdimm: Fix compilation failure without CONFIG_DEV_DAX_PMEM_COMPAT
  2020-02-13 20:58     ` Jan Kara
@ 2020-02-14 16:13       ` Dan Williams
  2020-02-17  8:16         ` Jan Kara
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Williams @ 2020-02-14 16:13 UTC (permalink / raw)
  To: Jan Kara; +Cc: linux-nvdimm

On Fri, Feb 14, 2020 at 1:42 AM Jan Kara <jack@suse.cz> wrote:
>
> On Wed 12-02-20 12:49:41, Dan Williams wrote:
> > On Wed, Feb 12, 2020 at 6:04 AM Jeff Moyer <jmoyer@redhat.com> wrote:
> > >
> > > Jan Kara <jack@suse.cz> 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 <jack@suse.cz>
> > >
> > > 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.
> >
> > 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
>
> OK.
>
> > > 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?
>
> 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.

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 -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/testing/nvdimm: Fix compilation failure without CONFIG_DEV_DAX_PMEM_COMPAT
  2020-02-14 16:13       ` Dan Williams
@ 2020-02-17  8:16         ` Jan Kara
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Kara @ 2020-02-17  8:16 UTC (permalink / raw)
  To: Dan Williams; +Cc: Jan Kara, linux-nvdimm

On Fri 14-02-20 08:13:59, Dan Williams wrote:
> On Fri, Feb 14, 2020 at 1:42 AM Jan Kara <jack@suse.cz> wrote:
> > > > 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?
> >
> > 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.
> 
> Sounds good, minus the fact that Jing and I were not on the same page.
> I'll send the ndctl fixup.

Thanks!

								Honza

-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-02-17  8:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-23 15:47 [PATCH] tools/testing/nvdimm: Fix compilation failure without CONFIG_DEV_DAX_PMEM_COMPAT Jan Kara
2020-02-10 11:28 ` Jan Kara
2020-02-12 14:04 ` Jeff Moyer
2020-02-12 20:49   ` Dan Williams
2020-02-13 20:58     ` Jan Kara
2020-02-14 16:13       ` Dan Williams
2020-02-17  8:16         ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).