Skip to content

Conversation

@hreinecke
Copy link
Contributor

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.

@hreinecke hreinecke force-pushed the admin-cmds branch 2 times, most recently from 8c6224a to 05fbdf9 Compare May 30, 2025 12:28
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 <hare@kernel.org>
ns=$(_find_nvme_ns "${def_subsys_uuid}")
[ -z "${ns}" ] && return 1
nvme nvm-id-ctrl "/dev/${ns}"
nvme nvm-id-ns "/dev/${ns}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .awupf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants