perf: Log error if mandatory parameters are missing

If "-o" (block size), "-q" (query size), "-t" (time in seconds),
 "-w" (io pattern) is absent, per doesn't report
 any message.

Change-Id: Icfe8e7136e41b9e4698e0553def8f8f386742e56
Signed-off-by: Ivan Betsis <c_ivanb@mellanox.com>
Signed-off-by: Alla Kiseleva <c_allaki@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481706
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Ivan Betsis 2020-01-13 14:28:26 +02:00 committed by Tomasz Zawadzki
parent 66585bd4be
commit 9a21cb5772

View File

@ -1719,18 +1719,22 @@ parse_args(int argc, char **argv)
}
if (!g_queue_depth) {
fprintf(stderr, "missing -q (queue size) operand\n");
usage(argv[0]);
return 1;
}
if (!g_io_size_bytes) {
fprintf(stderr, "missing -o (block size) operand\n");
usage(argv[0]);
return 1;
}
if (!workload_type) {
fprintf(stderr, "missing -w (io pattern type) operand\n");
usage(argv[0]);
return 1;
}
if (!g_time_in_sec) {
fprintf(stderr, "missing -t (test time in seconds) operand\n");
usage(argv[0]);
return 1;
}