examples/abort: fail when no controllers are found

Otherwise, the test using this application will succeed, even if no test
is actually executed.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ib2235795ea51985d418c2be6904a68db15aa593a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10772
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Konrad Sztyber 2021-12-21 10:40:02 +01:00 committed by Tomasz Zawadzki
parent b6fba11db7
commit 2e4466d0f1

View File

@ -1096,6 +1096,7 @@ int main(int argc, char **argv)
if (g_num_namespaces == 0) {
fprintf(stderr, "No valid NVMe controllers found\n");
rc = -1;
goto cleanup;
}