test/bdevperf: validate inputs are positive integers
Negative queue depths, I/O sizes or time durations do not make sense, so exit() if user input contains any of those cases. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I9d0261d1151f41dfc11013c797bf949b736ebba3
This commit is contained in:
parent
21ceba8855
commit
a871d5e5d7
@ -557,11 +557,11 @@ main(int argc, char **argv)
|
||||
usage(argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
if (!g_queue_depth) {
|
||||
if (g_queue_depth <= 0) {
|
||||
usage(argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
if (!g_io_size) {
|
||||
if (g_io_size <= 0) {
|
||||
usage(argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
@ -569,7 +569,7 @@ main(int argc, char **argv)
|
||||
usage(argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
if (!g_time_in_sec) {
|
||||
if (g_time_in_sec <= 0) {
|
||||
usage(argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user