[PATCH blktests 0/2] nvme: check that nvme-cli supports json output format

Shin'ichiro Kawasaki shinichiro.kawasaki at wdc.com
Mon May 19 23:18:17 PDT 2025


The commit 444f0df9f0c5 ("nvme: check for controller device in
_nvme_connect_subsys()") assumed that the nvme command always supports
json output format. However, when nvme-cli is built on a system without
the json-c library, the nvme command does not support the format. This
leads to silent failures in many test cases in the nvme test group [1].

This series address the problem. The first patch introduces a helper
function to prepare for the fix. The second patch fixes the problem by
checking that the nvme command supports the json format.

[1] https://lore.kernel.org/linux-nvme/20250519054905.GA6156@lst.de/

Shin'ichiro Kawasaki (2):
  common/nvme: introduce _have_nvme_cli_with_json_support()
  nvme/rc, md/001: check that nvme-cli supports json output format

 common/nvme   | 12 +++++++++++-
 tests/md/001  |  1 +
 tests/nvme/rc |  2 +-
 3 files changed, 13 insertions(+), 2 deletions(-)

-- 
2.49.0




More information about the Linux-nvme mailing list