test/bdevperf: Remove duplicated codes.
Using common out to usage and exit. Signed-off-by: yidong0635 <dongx.yi@intel.com> Change-Id: Idec94789566603379e6b548fa0421ea9ccf82d5f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5289 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
f75d677908
commit
a085705f9f
@ -2006,31 +2006,21 @@ verify_test_params(struct spdk_app_opts *opts)
|
||||
}
|
||||
|
||||
if (!g_bdevperf_conf_file && g_queue_depth <= 0) {
|
||||
spdk_app_usage();
|
||||
bdevperf_usage();
|
||||
return 1;
|
||||
goto out;
|
||||
}
|
||||
if (!g_bdevperf_conf_file && g_io_size <= 0) {
|
||||
spdk_app_usage();
|
||||
bdevperf_usage();
|
||||
return 1;
|
||||
goto out;
|
||||
}
|
||||
if (!g_bdevperf_conf_file && !g_workload_type) {
|
||||
spdk_app_usage();
|
||||
bdevperf_usage();
|
||||
return 1;
|
||||
goto out;
|
||||
}
|
||||
if (g_time_in_sec <= 0) {
|
||||
spdk_app_usage();
|
||||
bdevperf_usage();
|
||||
return 1;
|
||||
goto out;
|
||||
}
|
||||
g_time_in_usec = g_time_in_sec * 1000000LL;
|
||||
|
||||
if (g_timeout_in_sec < 0) {
|
||||
spdk_app_usage();
|
||||
bdevperf_usage();
|
||||
return 1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (g_show_performance_ema_period > 0 &&
|
||||
@ -2091,6 +2081,10 @@ verify_test_params(struct spdk_app_opts *opts)
|
||||
}
|
||||
|
||||
return 0;
|
||||
out:
|
||||
spdk_app_usage();
|
||||
bdevperf_usage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user