nvme: Add test for sending admin commands over disabled paths#178
nvme: Add test for sending admin commands over disabled paths#178hreinecke wants to merge 1 commit intolinux-blktests:masterfrom
Conversation
8c6224a to
05fbdf9
Compare
ANA states only apply to commands to individual namespaces, not to commands for the controller. So add a testcase to check if we can send admin commands over inaccessible paths. Signed-off-by: Hannes Reinecke <[email protected]>
| ns=$(_find_nvme_ns "${def_subsys_uuid}") | ||
| [ -z "${ns}" ] && return 1 | ||
| nvme nvm-id-ctrl "/dev/${ns}" | ||
| nvme nvm-id-ns "/dev/${ns}" |
There was a problem hiding this comment.
Everytime nvm-id-ctrl or nvm-id-ns is touched this test will break. I think it would be better to test for expected values.
There was a problem hiding this comment.
I ran this test case, and observed the failure message below:
nvme/064 (tr=loop) (test admin commands on disabled paths) [failed]
runtime 0.450s ... 1.114s
--- tests/nvme/064.out 2025-06-02 20:38:46.278859422 +0900
+++ /home/shin/Blktests/blktests/results/nodev_tr_loop/nvme/064.out.bad 2025-06-05 15:23:54.194590517 +0900
@@ -6,16 +6,22 @@
dmrl : 0
dmrsl : 0
dmsl : 0
+kpiocap: 0
+wzdsl : 0
+aocs : 0
+ver : 0x0
...
(Run 'diff -u tests/nvme/064.out /home/shin/Blktests/blktests/results/nodev_tr_loop/nvme/064.out.bad' to see the entire diff)
It looks that the new fields that nvme-id-ctrl and nvme-idns commands report are causing the failure.
There was a problem hiding this comment.
To make this test a bit future proof, it really should check for specific fields, as we do in nvme/059:
nvme_awupf=$(nvme id-ctrl /dev/"${ctrl_dev}" | grep awupf | awk '{ print $3}')BTW, I still think we should start using the json output for nvme-cli together with jq, e.g:
nvme id-ctrl /dev/nvme0 --output json | jq .awupfANA states only apply to commands to individual namespaces, not to commands for the controller. So add a testcase to check if we can send admin commands over inaccessible paths. Linke: linux-blktests#178 Signed-off-by: Hannes Reinecke <[email protected]> [Shin'ichiro: renumbered test case and aligned file mode] [Shin'ichiro: modified to check only exit codes of nvme commands] Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
|
Today, I found a time slot to take a look in this PR. I renumbered the test case and ran it with the recent kernel and nvme-cli, I noticed that nvm-id-ctrl and nvm-id-ns commands just failed with inaccesible ANA , and printed the error messages below: So it does not look meaningful to check output of these commands. How about to redirect the command outputs to FULL file for logging, and just check the exit status of the nvme commands? Based on this idea, I modified the test script (link). |
|
In principle, yes. But the patch fixing that had been ... well, not directly ignored, but also not applied. On the grounds that there is no use-case. Maybe we can bring it up at LSF (at the blktest session?) to see how we can or should progress here. |
Okay, sounds like a plan. Let's revisit this after the talk. |
ANA states only apply to commands to individual namespaces, not to commands for the controller. So add a testcase to check if we can send admin commands over inaccessible paths.