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: GangCao <gang.cao@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14747 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
8afb3d0037
commit
96679a2910
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user