diff mbox series

[RFC,ndctl,3/9] test/libndctl: Don't compare phys-id if no-interleave support

Message ID 20201007042256.1110626-3-santosh@fossix.org (mailing list archive)
State New
Headers show
Series [RFC,ndctl,1/9] libndctl: test enablement for non-nfit devices | expand

Commit Message

Santosh Sivaraj Oct. 7, 2020, 4:22 a.m. UTC
The tests expect some regions to have the same physical id, but that
will not be the case if there is no interleave support.

Signed-off-by: Santosh Sivaraj <santosh@fossix.org>
---
 test/libndctl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/test/libndctl.c b/test/libndctl.c
index 994e0fa..d508948 100644
--- a/test/libndctl.c
+++ b/test/libndctl.c
@@ -2484,7 +2484,8 @@  static int check_dimms(struct ndctl_bus *bus, struct dimm *dimms, int n,
 			return -ENXIO;
 		}
 
-		if (ndctl_dimm_get_phys_id(dimm) != dimms[i].phys_id) {
+		if (ndctl_bus_has_nfit(bus) &&
+		    ndctl_dimm_get_phys_id(dimm) != dimms[i].phys_id) {
 			fprintf(stderr, "dimm%d expected phys_id: %d got: %d\n",
 					i, dimms[i].phys_id,
 					ndctl_dimm_get_phys_id(dimm));