From 2e4466d0f14d5a0b04f8dc8be5cd357396d4698b Mon Sep 17 00:00:00 2001 From: Konrad Sztyber Date: Tue, 21 Dec 2021 10:40:02 +0100 Subject: [PATCH] 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 Change-Id: Ib2235795ea51985d418c2be6904a68db15aa593a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10772 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Aleksey Marchuk --- examples/nvme/abort/abort.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/nvme/abort/abort.c b/examples/nvme/abort/abort.c index ae2cbac1b0..61960bfb60 100644 --- a/examples/nvme/abort/abort.c +++ b/examples/nvme/abort/abort.c @@ -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; }