@@ -76,9 +76,6 @@ static int test_device_dax(int loglevel, struct ndctl_test *test,
return 1;
}
- if (!ndctl_test_attempt(test, KERNEL_VERSION(4, 7, 0)))
- return 77;
-
ndctl_set_log_priority(ctx, loglevel);
ndns = ndctl_get_test_dev(ctx);
@@ -88,6 +85,9 @@ static int test_device_dax(int loglevel, struct ndctl_test *test,
return 77;
}
+ if (!ndctl_test_attempt(test, KERNEL_VERSION(4, 7, 0)))
+ return 77;
+
rc = setup_device_dax(ndns);
if (rc < 0) {
fprintf(stderr, "%s: failed device-dax setup\n",
If we are unable to find a test device, then the test should report skipped. However if any ndctl_test_attempt() succeeds prior to this discovery ndctl_test_result() will return success (0) instead of skip (77). Re-arrange the 4.7 kernel version check to be after the device availability check. Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- test/device-dax.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)