tools: fiograph: do not overwrite input script file
authorDamien Le Moal <damien.lemoal@wdc.com>
Fri, 3 Sep 2021 15:20:22 +0000 (15:20 +0000)
committerJens Axboe <axboe@kernel.dk>
Fri, 3 Sep 2021 16:12:12 +0000 (10:12 -0600)
commit04cd8b6fd11cfde50a433ff41c3dc8e9c1032139
tree93826011c8335cc9af7f075857c3d86f4cfdf904
parentda75bad420585c6fce4e3d9a131cc34578332290
tools: fiograph: do not overwrite input script file

In fiograph.py, the setup_commandline() function mistakenly initializes
the output_file variable to the input fio script file, causing this file
to always be overwritten, even if an output file is specified using the
--output option. Fix this by properly initializing the output_file
variable using the --output option argument value. If an output file
name is not provided, the input script file name is used by default.

Also fix fiograph configuration file to remove the cmdprio_percentage
option repeated entry for io_uring and libaio.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
tools/fiograph/fiograph.conf
tools/fiograph/fiograph.py