test/bdevio: exit with error when no bdevs were configured
Tests shouldn't report success when no actual tests were ran. Using bdevio without any bdevs configured, does not serve any purpose and should report failure. Change-Id: I489a0d03f5b5c2482dede56cad92befd97d24057 Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454620 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
871c805373
commit
42cefebe1d
@ -141,6 +141,11 @@ bdevio_construct_targets(void)
|
|||||||
bdev = spdk_bdev_next_leaf(bdev);
|
bdev = spdk_bdev_next_leaf(bdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_io_targets == NULL) {
|
||||||
|
SPDK_ERRLOG("No bdevs to perform tests on\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user