The number of formats is itself populated only when there is a nfit
bus present. So skip this sub-test for all other platforms.
Signed-off-by: Santosh Sivaraj <santosh(a)fossix.org>
---
test/libndctl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/test/libndctl.c b/test/libndctl.c
index 93cbc7a..aaa72dc 100644
--- a/test/libndctl.c
+++ b/test/libndctl.c
@@ -2543,7 +2543,8 @@ static int check_dimms(struct ndctl_bus *bus, struct dimm *dimms,
int n,
return -ENXIO;
}
- if (ndctl_test_attempt(test, KERNEL_VERSION(4, 7, 0))) {
+ if (ndctl_test_attempt(test, KERNEL_VERSION(4, 7, 0)) &&
+ ndctl_bus_has_nfit(bus)) {
if (ndctl_dimm_get_formats(dimm) != dimms[i].formats) {
fprintf(stderr, "dimm%d expected formats: %d got: %d\n",
i, dimms[i].formats,
--
2.26.2