diff mbox series

[ndctl,v2,16/26] ndctl/test: Fix device-dax bus-model detection

Message ID 156426364779.531577.16728668403285407838.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive)
State Superseded
Headers show
Series Improvements for namespace creation/interrogation | expand

Commit Message

Dan Williams July 27, 2019, 9:40 p.m. UTC
Don't look for bus-model patches on pre-v5.1 kernels.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 test/core.c |   10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox series

Patch

diff --git a/test/core.c b/test/core.c
index b9e3bbf7d7a9..888f5d8c0e42 100644
--- a/test/core.c
+++ b/test/core.c
@@ -168,6 +168,16 @@  int nfit_test_init(struct kmod_ctx **ctx, struct kmod_module **mod,
 				&& !ndctl_test_attempt(test,
 					KERNEL_VERSION(4, 7, 0)))
 			continue;
+
+		/*
+		 * Skip device-dax bus-model modules on pre-v5.1
+		 */
+		if ((strstr(name, "dax_pmem_core")
+				|| strstr(name, "dax_pmem_compat"))
+				&& !ndctl_test_attempt(test,
+					KERNEL_VERSION(5, 1, 0)))
+			continue;
+
 retry:
 		rc = kmod_module_new_from_name(*ctx, name, mod);
 		if (rc) {