[PATCH blktests] nvme/046: change nvme io-passthru command option from -o to --opcode

Keith Busch kbusch at kernel.org
Thu Feb 1 07:20:08 PST 2024


On Wed, Jan 31, 2024 at 03:34:14PM +0100, Daniel Wagner wrote:
> On Fri, Jan 26, 2024 at 03:10:37PM +0900, Shin'ichiro Kawasaki wrote:
> > A recent commit in nvme-cli v2.6 changed the single letter of the
> > --opcode option from -o to -O. This caused the failure of nvme/046. To
> > make the test case work regardless of the nvme-cli version, replace -o
> > with --opcode.
> > 
> > Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki at wdc.com>
> 
> Sorry about this. We introduced a couple of global flags, -v (verbose)
> and -o (output) and this changed a bunch commands. This was done in the
> quest to add JSON output format support add to all commands.
> 
> I will refrain from doing more like this for the 2.x cycle.

Changing intput/output is always going to trip someone up. Maintaining
backward compatibility vs. improving the design is a challenge.

IMO, though, scripts should always use the long options. The short
options are convenient for hacking away at a terminal, but they're not
readily readable. The long options are more descriptive for when you
have to maintain the script in the future.



More information about the Linux-nvme mailing list