Message ID | 158300774836.2141307.13052648687237614794.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Multiple topics / backlog for v68 | expand |
On Sat 29-02-20 12:22:28, Dan Williams wrote: > While there are some tests that require the new "dax-bus" device model, > none of the tests require compatibility mode. Drop the requirement so > the tests work with DEV_DAX_PMEM_COMPAT=n kernels. > > Link: http://lore.kernel.org/r/20200123154720.12097-1-jack@suse.cz > Cc: Jan Kara <jack@suse.cz> > Signed-off-by: Dan Williams <dan.j.williams@intel.com> The patch looks good to me. Thanks for fixing this! I just have to say that the strstr(3) usage in this function looks rather unusual to me. Why not just strcmp(3)? Honza > --- > test/core.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/test/core.c b/test/core.c > index 888f5d8c0e42..dff842a9f378 100644 > --- a/test/core.c > +++ b/test/core.c > @@ -180,6 +180,14 @@ int nfit_test_init(struct kmod_ctx **ctx, struct kmod_module **mod, > > retry: > rc = kmod_module_new_from_name(*ctx, name, mod); > + > + /* > + * dax_pmem_compat is not required, missing is ok, > + * present-but-production is not ok. > + */ > + if (rc && strstr(name, "dax_pmem_compat")) > + continue; > + > if (rc) { > log_err(&log_ctx, "%s.ko: missing\n", name); > break; >
On Tue, Mar 3, 2020 at 5:29 AM Jan Kara <jack@suse.cz> wrote: > > On Sat 29-02-20 12:22:28, Dan Williams wrote: > > While there are some tests that require the new "dax-bus" device model, > > none of the tests require compatibility mode. Drop the requirement so > > the tests work with DEV_DAX_PMEM_COMPAT=n kernels. > > > > Link: http://lore.kernel.org/r/20200123154720.12097-1-jack@suse.cz > > Cc: Jan Kara <jack@suse.cz> > > Signed-off-by: Dan Williams <dan.j.williams@intel.com> > > The patch looks good to me. Thanks for fixing this! I just have to say that > the strstr(3) usage in this function looks rather unusual to me. Why not > just strcmp(3)? Yeah, this is confusing the 'name' check with the 'path' check, the name check should be fine to use strcmp(). Will fix up.
diff --git a/test/core.c b/test/core.c index 888f5d8c0e42..dff842a9f378 100644 --- a/test/core.c +++ b/test/core.c @@ -180,6 +180,14 @@ int nfit_test_init(struct kmod_ctx **ctx, struct kmod_module **mod, retry: rc = kmod_module_new_from_name(*ctx, name, mod); + + /* + * dax_pmem_compat is not required, missing is ok, + * present-but-production is not ok. + */ + if (rc && strstr(name, "dax_pmem_compat")) + continue; + if (rc) { log_err(&log_ctx, "%s.ko: missing\n", name); break;
While there are some tests that require the new "dax-bus" device model, none of the tests require compatibility mode. Drop the requirement so the tests work with DEV_DAX_PMEM_COMPAT=n kernels. Link: http://lore.kernel.org/r/20200123154720.12097-1-jack@suse.cz Cc: Jan Kara <jack@suse.cz> Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- test/core.c | 8 ++++++++ 1 file changed, 8 insertions(+)