From f43aab595c1b8832d5f2641606f5bd5a7cdd22ea Mon Sep 17 00:00:00 2001 From: Anuj Gupta Date: Tue, 31 May 2022 19:01:49 +0530 Subject: [PATCH] init: return error incase an invalid value is passed as option Currently, fio exits incase an invalid value is passed as fio option, but continues even if an invalid value is passed for I/O engine specific options. Exit in that scenario. Signed-off-by: Anuj Gupta Link: https://lore.kernel.org/r/20220531133155.17493-4-ankit.kumar@samsung.com Signed-off-by: Jens Axboe --- init.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/init.c b/init.c index f7d702f8..da800776 100644 --- a/init.c +++ b/init.c @@ -2810,6 +2810,15 @@ int parse_cmd_line(int argc, char *argv[], int client_type) break; ret = fio_cmd_ioengine_option_parse(td, opt, val); + + if (ret) { + if (td) { + put_job(td); + td = NULL; + } + do_exit++; + exit_val = 1; + } break; } case 'w': -- 2.25.1