Commit 96679a29 authored by GangCao's avatar GangCao Committed by Tomasz Zawadzki
Browse files

test/bdevperf: handle properly if not able to get io_channel



To fix issue: 2719

In this case, if there is successfully configured job and continue_on_failure (-f)
parameter is set, it will continue to run for these jobs. Otherwise, it will just
stop.

Change-Id: Ia2940a9e1b5da63e50857da11ff7f811c7576e3e
Signed-off-by: default avatarGangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14747


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 8afb3d00
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1122,6 +1122,12 @@ _bdevperf_construct_job_done(void *ctx)

		/* Ready to run the test */
		bdevperf_test();
	} else if (g_run_rc != 0) {
		/* Reset error as some jobs constructed right */
		g_run_rc = 0;
		if (g_continue_on_failure == false) {
			g_error_to_exit = true;
		}
	}
}

@@ -1196,6 +1202,8 @@ _bdevperf_construct_job(void *ctx)
	if (!job->ch) {
		SPDK_ERRLOG("Could not get io_channel for device %s, error=%d\n", spdk_bdev_get_name(job->bdev),
			    rc);
		spdk_bdev_close(job->bdev_desc);
		TAILQ_REMOVE(&g_bdevperf.jobs, job, link);
		g_run_rc = -ENOMEM;
		goto end;
	}