test/bdevio: return failure when unable to open a bdev

Tests shouldn't disregard when opening a bdev fails.

Change-Id: I5211e9d7bcb48ed3e7e22f7480106ceeea12c23a
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454621
Tested-by: SPDK CI Jenkins <sys_sgci@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:
Tomasz Zawadzki 2019-05-15 10:22:18 -04:00 committed by Jim Harris
parent 42cefebe1d
commit 1cb299addc

View File

@ -124,8 +124,7 @@ bdevio_construct_targets(void)
if (rc != 0) {
free(target);
SPDK_ERRLOG("Could not open leaf bdev %s, error=%d\n", spdk_bdev_get_name(bdev), rc);
bdev = spdk_bdev_next_leaf(bdev);
continue;
return rc;
}
printf(" %s: %" PRIu64 " blocks of %" PRIu32 " bytes (%" PRIu64 " MiB)\n",