[PATCH blktests 1/3] common/nvme: do not call 'nvme id-ns' to non-nvme devices
Chaitanya Kulkarni
chaitanyak at nvidia.com
Wed Feb 25 21:38:47 PST 2026
On 2/22/26 23:41, Shin'ichiro Kawasaki wrote:
> The test case block/041 tests PI metadata capability in the block layer.
> At this moment, nvme is the only one block device that supports the
> capability. To check that the test target nvme devices fulfills the
> requirement, the test case calls 'nvme ns-id' command via
> _test_dev_disable_extended_lba(). However, since the test case is in
> the block group, TEST_DEVS can specify non-nvme devices. Even though the
> test case is skipped by _require_test_dev_is_nvme() check, the
> 'nvme ns-id' is called for the non-nvme device and fails. It spits out
> unnecessary error messages.
>
> To avoid the error message, check if the test device is nvme before
> calling 'nvme ns-id'. For the check, factor out a helper function
> _test_dev_is_nvme(). While at it, replace short command options -q and
> -f with long options --quiet and --canonicalize for readability.
>
> Signed-off-by: Shin'ichiro Kawasaki<shinichiro.kawasaki at wdc.com>
Looks good.
Reviewed-by: Chaitanya Kulkarni <kch at nvidia.com>
-ck
More information about the Linux-nvme
mailing list