t/zbd: Add -o option to t/zbd/test-zoned-support
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Tue, 1 Sep 2020 08:20:04 +0000 (17:20 +0900)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Sep 2020 14:37:40 +0000 (08:37 -0600)
commit7ce7422af80205fece68de44abfdda3fae360d70
tree7907bbd5f75098ad131d7a7cb427b72afcb180ca
parent17293ae38fe32c8b96fc56d247258568fd17f7bf
t/zbd: Add -o option to t/zbd/test-zoned-support

To specify maximum open zones of the test target device, add -o option
to t/zbd/test-zoned-support. When this option is specified, add
max_open_zones option to all fio commands in the test script. The option
ensures the number of zones opened by fio is within the limit. This is
useful when the test target device has maximum open zones limit.

When the fio command does not have multiple jobs and the test case does
not specify max_open_zones, add single max_open_zones option to the fio
command line.

When the fio command takes multiple jobs, add max_open_zones option to
each job. Introduce job_var_opts variable to keep options to be added to
each job. To distinguish it from global options for all jobs, rename
var_opts variable to global_var_opts. When a test case with multiple jobs
always specifies max_open_zones option, exclude the max_open_zones option
from job_var_opts, using job_var_opts_exclude() helper function.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
t/zbd/test-zbd-support