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 <[email protected]> --- test/device-dax.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/device-dax.c b/test/device-dax.c index 04d53da544cd..c1409ac8b8b8 100644 --- a/test/device-dax.c +++ b/test/device-dax.c @@ -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", _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
