All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: vishal.l.verma@intel.com
Cc: nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org
Subject: [ndctl PATCH v3 08/16] ndctl/test: Fix support for missing dax_pmem_compat module
Date: Wed, 05 Jan 2022 13:32:21 -0800	[thread overview]
Message-ID: <164141834155.3990253.5388773351209410262.stgit@dwillia2-desk3.amr.corp.intel.com> (raw)
In-Reply-To: <164141829899.3990253.17547886681174580434.stgit@dwillia2-desk3.amr.corp.intel.com>

The kernel is moving to drop CONFIG_DEV_DAX_PMEM_COMPAT. Update
ndctl_test_init() to not error out if dax_pmem_compat is missing. It seems
that the original implementation of support for missing dax_pmem_compat was
broken, or since that time newer versions of kmod_module_new_from_name() no
longer fail when the module is missing.

Fixes: b7991dbc22f3 ("ndctl/test: Relax dax_pmem_compat requirement")
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 test/core.c |   25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/test/core.c b/test/core.c
index dc1405d75c49..5d1aa23723f1 100644
--- a/test/core.c
+++ b/test/core.c
@@ -120,7 +120,6 @@ int ndctl_test_init(struct kmod_ctx **ctx, struct kmod_module **mod,
 		"nfit",
 		"device_dax",
 		"dax_pmem",
-		"dax_pmem_core",
 		"dax_pmem_compat",
 		"libnvdimm",
 		"nd_btt",
@@ -180,29 +179,27 @@ int ndctl_test_init(struct kmod_ctx **ctx, struct kmod_module **mod,
 		/*
 		 * Skip device-dax bus-model modules on pre-v5.1
 		 */
-		if ((strcmp(name, "dax_pmem_core") == 0
-				|| strcmp(name, "dax_pmem_compat") == 0)
-				&& !ndctl_test_attempt(test,
-					KERNEL_VERSION(5, 1, 0)))
+		if ((strcmp(name, "dax_pmem_compat") == 0) &&
+		    !ndctl_test_attempt(test, KERNEL_VERSION(5, 1, 0)))
 			continue;
 
 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 && strcmp(name, "dax_pmem_compat") == 0)
-			continue;
-
 		if (rc) {
-			log_err(&log_ctx, "%s.ko: missing\n", name);
+			log_err(&log_ctx, "failed to interrogate %s.ko\n",
+				name);
 			break;
 		}
 
 		path = kmod_module_get_path(*mod);
 		if (!path) {
+			/*
+			 * dax_pmem_compat is not required, missing is
+			 * ok, present-but-production is not ok.
+			 */
+			if (strcmp(name, "dax_pmem_compat") == 0)
+				continue;
+
 			if (family != NVDIMM_FAMILY_INTEL &&
 			    (strcmp(name, "nfit") == 0 ||
 			     strcmp(name, "nd_e820") == 0))


  parent reply	other threads:[~2022-01-05 21:32 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05 21:31 [ndctl PATCH v3 00/16] ndctl: Meson support Dan Williams
2022-01-05 21:31 ` [ndctl PATCH v3 01/16] ndctl/docs: Clarify update-firwmware activation 'overflow' conditions Dan Williams
2022-01-05 21:31 ` [ndctl PATCH v3 02/16] ndctl/test: Prepare for BLK-aperture support removal Dan Williams
2022-01-05 21:31 ` [ndctl PATCH v3 03/16] ndctl/test: Move 'reset()' to function in 'common' Dan Williams
2022-01-05 21:32 ` [ndctl PATCH v3 04/16] ndctl/test: Initialize the label area by default Dan Williams
2022-01-05 21:32 ` [ndctl PATCH v3 05/16] ndctl/test: Skip BLK flags checks Dan Williams
2022-01-05 21:32 ` [ndctl PATCH v3 06/16] ndctl/test: Move sector-mode to a different region Dan Williams
2022-01-05 21:32 ` [ndctl PATCH v3 07/16] ndctl: Deprecate BLK aperture support Dan Williams
2022-01-05 21:32 ` Dan Williams [this message]
2022-01-05 21:32 ` [ndctl PATCH v3 09/16] util: Distribute 'filter' and 'json' helpers to per-tool objects Dan Williams
2022-01-05 21:32 ` [ndctl PATCH v3 10/16] Documentation: Drop attrs.adoc include Dan Williams
2022-01-05 21:32 ` [ndctl PATCH v3 11/16] build: Drop unnecessary $tool/config.h includes Dan Williams
2022-01-05 21:32 ` [ndctl PATCH v3 12/16] test: Prepare out of line builds Dan Williams
2022-01-05 21:32 ` [ndctl PATCH v3 13/16] ndctl: Drop executable bit for bash-completion script Dan Williams
2022-01-05 21:32 ` [ndctl PATCH v3 14/16] build: Add meson build infrastructure Dan Williams
2022-01-05 21:32 ` [ndctl PATCH v3 15/16] build: Add meson rpmbuild support Dan Williams
2022-01-05 21:33 ` [ndctl PATCH v3 16/16] ndctl: Jettison autotools Dan Williams
2022-01-12 13:54 ` [ndctl PATCH v3 00/16] ndctl: Meson support Vaibhav Jain
2022-01-13  1:23 ` Alison Schofield
2022-01-14 16:04 ` Verma, Vishal L
2022-01-14 16:55   ` Michal Suchánek
2022-01-14 22:30   ` Jane Chu
2022-01-14 22:47     ` Dan Williams
2022-01-15  1:16       ` Verma, Vishal L

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=164141834155.3990253.5388773351209410262.stgit@dwillia2-desk3.amr.corp.intel.com \
    --to=dan.j.williams@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=nvdimm@lists.linux.dev \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.