From 2ac0058528e83b5a6be515c1b1772cedab12a6de Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 13 Sep 2021 13:14:29 -0600 Subject: [PATCH] t/io_uring: don't require a file for do_nop runs Signed-off-by: Jens Axboe --- t/io_uring.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/t/io_uring.c b/t/io_uring.c index c9ca3e9d..ff0dc609 100644 --- a/t/io_uring.c +++ b/t/io_uring.c @@ -626,16 +626,18 @@ int main(int argc, char *argv[]) j = 0; i = optind; nfiles = argc - i; - if (!nfiles) { - printf("No files specified\n"); - usage(argv[0], 1); - } - threads_per_f = nthreads / nfiles; - /* make sure each thread gets assigned files */ - if (threads_per_f == 0) { - threads_per_f = 1; - } else { - threads_rem = nthreads - threads_per_f * nfiles; + if (!do_nop) { + if (!nfiles) { + printf("No files specified\n"); + usage(argv[0], 1); + } + threads_per_f = nthreads / nfiles; + /* make sure each thread gets assigned files */ + if (threads_per_f == 0) { + threads_per_f = 1; + } else { + threads_rem = nthreads - threads_per_f * nfiles; + } } while (!do_nop && i < argc) { int k, limit; -- 2.25.1