Skip to content

Incomplete FPIN-LI tests #246

Draft
johnmeneghini wants to merge 6 commits into
linux-blktests:masterfrom
johnmeneghini:fpin_tests3
Draft

Incomplete FPIN-LI tests #246
johnmeneghini wants to merge 6 commits into
linux-blktests:masterfrom
johnmeneghini:fpin_tests3

Conversation

@johnmeneghini

Copy link
Copy Markdown

This branch contains the beginnings of an FPIN-LI blktest. tests/nvme/069 is a copy of tests/nvme/057 which is the basic ANA test.

Test Setup

See the blktests README.md for more information.

This test should be run against an upstream kernel with the appropriate patches applied to the fc_loop driver. In addition the following kernel config options should be enabled.

CONFIG_NVME_CORE=m
CONFIG_BLK_DEV_NVME=m
CONFIG_NVME_MULTIPATH=y
CONFIG_NVME_VERBOSE_ERRORS=y
CONFIG_NVME_HWMON=y
CONFIG_NVME_FABRICS=m
CONFIG_NVME_FC=m
CONFIG_NVME_TARGET=m
CONFIG_NVME_TARGET_DEBUGFS=y
# CONFIG_NVME_TARGET_PASSTHRU is not set
CONFIG_NVME_TARGET_LOOP=m
CONFIG_NVME_TARGET_FC=m
CONFIG_NVME_TARGET_FCLOOP=m

Running Tests

Tests must be run from root account.

Example:

root@target-vm:/home/jmeneghi/repos/tests/blktests# NVMET_TRTYPES=fc ./check --cmd-trace tests/nvme/057
nvme/057 (tr=fc) (test nvme fabrics controller ANA failover during I/O) [passed]
    runtime  25.397s  ...  25.372s
root@target-vm:/home/jmeneghi/repos/tests/blktests# grep -e _set_attr results/nodev_tr_fc/nvme/057.cmdtrace 
+ _set_attr 0 /sys/kernel/config/nvmet/subsystems/blktests-subsystem-1/attr_allow_any_host
+ _set_attr /dev/loop0 /sys/kernel/config/nvmet/subsystems/blktests-subsystem-1/namespaces/1/device_path
+ _set_attr 91fdba0d-f87b-4c25-b80f-db7be1418b9e /sys/kernel/config/nvmet/subsystems/blktests-subsystem-1/namespaces/1/device_uuid
+ _set_attr 1 /sys/kernel/config/nvmet/subsystems/blktests-subsystem-1/namespaces/1/enable
++ _set_attr fc /sys/kernel/config/nvmet/ports/0/addr_trtype
++ _set_attr nn-0x10001100ab000001:pn-0x20001100ab000001 /sys/kernel/config/nvmet/ports/0/addr_traddr
++ _set_attr fc /sys/kernel/config/nvmet/ports/0/addr_adrfam
++ _set_attr fc /sys/kernel/config/nvmet/ports/1/addr_trtype
++ _set_attr nn-0x10001100ab000002:pn-0x20001100ab000002 /sys/kernel/config/nvmet/ports/1/addr_traddr
++ _set_attr fc /sys/kernel/config/nvmet/ports/1/addr_adrfam
++ _set_attr fc /sys/kernel/config/nvmet/ports/2/addr_trtype
++ _set_attr nn-0x10001100ab000003:pn-0x20001100ab000003 /sys/kernel/config/nvmet/ports/2/addr_traddr
++ _set_attr fc /sys/kernel/config/nvmet/ports/2/addr_adrfam
++ _set_attr fc /sys/kernel/config/nvmet/ports/3/addr_trtype
++ _set_attr nn-0x10001100ab000004:pn-0x20001100ab000004 /sys/kernel/config/nvmet/ports/3/addr_traddr
++ _set_attr fc /sys/kernel/config/nvmet/ports/3/addr_adrfam
+ _set_attr optimized /sys/kernel/config/nvmet/ports/0/ana_groups/1/ana_state
+ _set_attr non-optimized /sys/kernel/config/nvmet/ports/1/ana_groups/1/ana_state
+ _set_attr inaccessible /sys/kernel/config/nvmet/ports/2/ana_groups/1/ana_state
+ _set_attr inaccessible /sys/kernel/config/nvmet/ports/3/ana_groups/1/ana_state
+ _set_attr inaccessible /sys/kernel/config/nvmet/ports/0/ana_groups/1/ana_state
+ _set_attr inaccessible /sys/kernel/config/nvmet/ports/1/ana_groups/1/ana_state
+ _set_attr optimized /sys/kernel/config/nvmet/ports/2/ana_groups/1/ana_state
+ _set_attr non-optimized /sys/kernel/config/nvmet/ports/3/ana_groups/1/ana_state
+ _set_attr optimized /sys/kernel/config/nvmet/ports/0/ana_groups/1/ana_state
+ _set_attr non-optimized /sys/kernel/config/nvmet/ports/1/ana_groups/1/ana_state
+ _set_attr inaccessible /sys/kernel/config/nvmet/ports/2/ana_groups/1/ana_state
+ _set_attr inaccessible /sys/kernel/config/nvmet/ports/3/ana_groups/1/ana_state
+ _set_attr 0 /sys/kernel/config/nvmet/subsystems/blktests-subsystem-1/namespaces/1/enable

Test status.

tests/nvme/069 - the nvme-fc marginal path handling test is currently incomplete and does not run because of dependencies on the fc_loop driver.

Example:

root@target-vm:/home/jmeneghi/repos/tests/blktests# NVMET_TRTYPES=fc ./check --cmd-trace tests/nvme/069
nvme/069 (tr=fc) (test nvme-fc marginal path handling)       [failed]
    runtime    ...  0.165s
    --- tests/nvme/069.out      2026-07-02 11:55:45.287557831 -0400
    +++ /home/jmeneghi/repos/tests/blktests/results/nodev_tr_fc/nvme/069.out.bad        2026-07-02 12:07:10.663938695 -0400
    @@ -1,20 +1,6 @@
    -Test Complete
    -=======
    -Connected to NVMe device: nvme0
    -Using namespace: nvme0n1
    -Target WWPN: 0x20001100ab000000
    -Found FC remote port: rport-*
    -Initial FC rport state: Online
    ...
    (Run 'diff -u tests/nvme/069.out /home/jmeneghi/repos/tests/blktests/results/nodev_tr_fc/nvme/069.out.bad' to see the entire diff)

See the files: NVMe_FC_ANA_Multipath_Setup.md and NVMe_MARGINAL_Test_Summary.md for more information.

Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Do not merge

Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Signed-off-by: John Meneghini <jmeneghi@redhat.com>
This is just an experiment to write a stand alone script.

Do not merge

Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Do not merge

Signed-off-by: John Meneghini <jmeneghi@redhat.com>
If cscope and ctags are installed create the databases needed
to brouse these shell scripts with cscope/ctags.

Signed-off-by: John Meneghini <jmeneghi@redhat.com>
@johnmeneghini johnmeneghini marked this pull request as draft July 2, 2026 16:31
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.

1 participant