diff mbox series

[RFC,ndctl,5/9] test/libndctl: skip smart tests for non-nfit platforms

Message ID 20201007042256.1110626-5-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
Signed-off-by: Santosh Sivaraj <santosh@fossix.org>
---
 test/libndctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/test/libndctl.c b/test/libndctl.c
index 1a5a267..93cbc7a 100644
--- a/test/libndctl.c
+++ b/test/libndctl.c
@@ -2451,7 +2451,7 @@  static int check_commands(struct ndctl_bus *bus, struct ndctl_dimm *dimm,
 	 * The kernel did not start emulating v1.2 namespace spec smart data
 	 * until 4.9.
 	 */
-	if (!ndctl_test_attempt(test, KERNEL_VERSION(4, 9, 0)))
+	if (!ndctl_test_attempt(test, KERNEL_VERSION(4, 9, 0)) || !ndctl_bus_has_nfit(bus))
 		dimm_commands &= ~((1 << ND_CMD_SMART)
 				| (1 << ND_CMD_SMART_THRESHOLD));