Commit 283923d
committed
nvme/rc, md/001: check that nvme-cli supports json output format
When nvme-cli is built on a system without the json-c library, the nvme
command does not support the json output format. Consequently, the
"-o json" option, or in the long form "--output-format=json", of the
nvme command fails. It causes the helper function _nvme_connect_subsys()
to break. This leads to silent failures in many test cases in the nvme
test group as well as the test case md/001.
To inform blktests users this prerequisite, call the helper function
_have_nvme_cli_with_json_support(). As to the nvme test group, do the
check in group_requires() so that the check is done only once for all of
the test cases in the group. If the format is unsupported, the nvme test
group and the test case md/001 are skipped, and the reason to skip is
printed. This change makes the nvme command existence check in
_nvme_requires() redundant, then remove it.
Link: https://lore.kernel.org/linux-nvme/[email protected]/
Fixes: 444f0df ("nvme: check for controller device in _nvme_connect_subsys()")
Reported-by: Christoph Hellwig <[email protected]>
Reviewed-by: Chaitanya Kulkarni <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Daniel Wagner <[email protected]>
Signed-off-by: Shin'ichiro Kawasaki <[email protected]>1 parent 3b2355a commit 283923d
2 files changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
| |||
123 | 122 | | |
124 | 123 | | |
125 | 124 | | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
0 commit comments