mbox series

[blktests,v3,0/3] Add support to run against real target

Message ID 20240627091016.12752-1-dwagner@suse.de (mailing list archive)
Headers show
Series Add support to run against real target | expand

Message

Daniel Wagner June 27, 2024, 9:10 a.m. UTC
I've added a new hook so that the default variables can be configured via the
script. This simple overwrite of the defaults allows to use external configured
setups (there is some trickery involved as it's not possible to do it only once
due to include orders). The upside of this approach is that we don't have to add
more environment variables.

I've run blktests against a PowerStore. That worked fairly okay but there were
some fallouts which is kind of expected at this stage:

# cat ~/.config/blktests/nvme_target_control.toml
[main]
skip_setup_cleanup=true
nvmetcli='/home/wagi/work/nvmetcli/nvmetcli'
remote='http://nvmet:5000'

[host]
blkdev_type='device'
trtype='tcp'
hostnqn='nqn.2014-08.org.nvmexpress:uuid:1a9e23dd-466e-45ca-9f43-a29aaf47cb21'
hostid='1a9e23dd-466e-45ca-9f43-a29aaf47cb21'
host_traddr='10.161.16.48'

[subsys_0]
traddr='10.162.198.45'
trsvid='4420'
subsysnqn='nqn.1988-11.com.dell:powerstore:00:f03028e73ef7D032D81E'
subsys_uuid='3a5c104c-ee41-38a1-8ccf-0968003d54e7'


# NVME_TARGET_CONTROL=/root/blktests/contrib/nvme_target_control.py ./check nvme

nvme/002 (tr=tcp) (create many subsystems and test discovery) [not run]
    nvme_trtype=tcp is not supported in this test
nvme/003 (tr=tcp) (test if we're sending keep-alives to a discovery controller)
nvme/003 (tr=tcp) (test if we're sending keep-alives to a discovery controller) [passed]
    runtime    ...  15.397s
nvme/004 (tr=tcp) (test nvme and nvmet UUID NS descriptors)  [failed]
    runtime    ...  42.584s
    --- tests/nvme/004.out      2024-06-27 09:45:35.496518067 +0200
    +++ /root/blktests/results/nodev_tr_tcp/nvme/004.out.bad    2024-06-27 10:38:59.424409636 +0200
    @@ -1,3 +1,4 @@
     Running nvme/004
    -disconnected 1 controller(s)
    +No namespaces found
    +disconnected 13 controller(s)
     Test complete
nvme/005 (tr=tcp) (reset local loopback target)              [passed]
    runtime    ...  11.160s
nvme/006 (tr=tcp bd=device) (create an NVMeOF target)        [passed]
    runtime    ...  1.350s
nvme/008 (tr=tcp bd=device) (create an NVMeOF host)          [failed]
    runtime    ...  8.748s
    --- tests/nvme/008.out      2024-06-27 09:45:35.496518067 +0200
    +++ /root/blktests/results/nodev_tr_tcp_bd_device/nvme/008.out.bad  2024-06-27 10:39:23.624408817 +0200
    @@ -1,3 +1,4 @@
     Running nvme/008
    +UUID 3a5c104c-ee41-38a1-8ccf-0968003d54e7 mismatch (wwid eui.3a5c104cee4138a18ccf0968003d54e7)
     disconnected 1 controller(s)
     Test complete
nvme/010 (tr=tcp bd=device) (run data verification fio job)  [passed]
    runtime    ...  29.798s
nnvme/012 (tr=tcp bd=device) (run mkfs and data verification fio) [failed]
    runtime    ...  162.299s
    --- tests/nvme/012.out      2024-06-27 09:45:35.500518066 +0200
    +++ /root/blktests/results/nodev_tr_tcp_bd_device/nvme/012.out.bad  2024-06-27 10:42:38.008402238 +0200
    @@ -1,3 +1,6 @@
     Running nvme/012
    +fio: io_u error on file /mnt/blktests//verify.0.0: No space left on device: write offset=44917682176, buflen=4096
    +fio exited with status 1
    +4;fio-3.23;verify;0;28;0;0;0;0;0;0;0.000000;0.000000;0;0;0.000000;0.000000;1.000000%=0;5.000000%=0;10.000000%=0;20.000000%=0;30.000000%=0;40.000000%=0;50.000000%=0;60.000000%=0;70.000000%=0;80.000000%=0;90.000000%=0;95.000000%=0;99.000000%=0;99.500000%=0;99.900000%=0;99.950000%=0;99.990000%=0;0%=0;0%=0;0%=0;0;0;0.000000;0.000000;0;0;0.000000%;0.000000;0.000000;3508332;24662;6165;142251;5;19501;35.466984;172.426891;127;60177;2556.665370;1420.047447;1.000000%=1056;5.000000%=1548;10.000000%=1646;20.000000%=1777;30.000000%=1908;40.000000%=2072;50.000000%=2277;60.000000%=2441;70.000000%=2637;80.000000%=2932;90.000000%=3653;95.000000%=4554;99.000000%=8224;99.500000%=10027;99.900000%=14745;99.950000%=17956;99.990000%=39583;0%=0;0%=0;0%=0;418;60193;2592.427453;1433.177059;18632;44736;100.000000%;24704.690141;4469.952445;0;0;0;0;0;0;0.000000;0.000000;0;0;0.000000;0.000000;1.000000%=0;5.000000%=0;10.000000%=0;20.000000%=0;30.000000%=0;40.000000%=0;50.000000%=0;60.000000%=0;70.000000%=0;80.000000%=0;90.000000%=0;95.000000%=0;99.000000%=0;99.500000%=0;99.900000%=0;99.950000%=0;99.990000%=0;0%=0;0%=0;0%=0;0;0;0.000000;0.000000;0;0;0.000000%;0.000000;0.000000;5.627417%;9.681547%;711749;0;22200;0.1%;0.1%;0.1%;0.1%;100.0%;0.0%;0.0%;0.00%;0.00%;0.00%;0.00%;0.00%;0.00%;0.01%;0.12%;0.29%;0.43%;35.65%;56.04%;6.95%;0.47%;0.03%;0.01%;0.00%;0.00%;0.00%;0.00%;0.00%;0.00%;nvme0n1;0;1739486;0;0;0;4596624;4596624;100.00%
     disconnected 1 controller(s)
     Test complete
nvme/014 (tr=tcp bd=device) (flush a command from host)
^C^C^C

The flush test hanged forever but this could just be an outdated host kernel.

changes:
v3:
  - added support for previous configured target
  - renamed nvme_nvme_target to	_require_kernel_nvme_target
  - use shorter redirect operator
  - https://lore.kernel.org/all/20240612110444.4507-1-dwagner@suse.de/
v2:
  - many of the preperation patches have been merged, drop them
  - added a python script which implements the blktests API
  - add some documentation how to use it
  - changed the casing of the environment variables to upper case

v1:
  - initial version
  - https://lore.kernel.org/linux-nvme/20240318093856.22307-1-dwagner@suse.de/

Daniel Wagner (3):
  nvme/rc: introduce remote target support
  nvme/030: only run against kernel soft target
  contrib: add remote target setup/cleanup script

 Documentation/running-tests.md |  33 ++++++
 check                          |   4 +
 contrib/nvme_target_control.py | 181 +++++++++++++++++++++++++++++++++
 contrib/nvmet-subsys.jinja2    |  71 +++++++++++++
 tests/nvme/030                 |   1 +
 tests/nvme/rc                  |  65 +++++++++++-
 6 files changed, 353 insertions(+), 2 deletions(-)
 create mode 100755 contrib/nvme_target_control.py
 create mode 100644 contrib/nvmet-subsys.jinja2

Comments

Hannes Reinecke June 27, 2024, 9:28 a.m. UTC | #1
On 6/27/24 11:10, Daniel Wagner wrote:
> I've added a new hook so that the default variables can be configured via the
> script. This simple overwrite of the defaults allows to use external configured
> setups (there is some trickery involved as it's not possible to do it only once
> due to include orders). The upside of this approach is that we don't have to add
> more environment variables.
> 
Round of applause ... Thanks for doing this!

> I've run blktests against a PowerStore. That worked fairly okay but there were
> some fallouts which is kind of expected at this stage:
> 
I guess we should blank out tests which don't make sense for a real target.

Cheers,

Hannes
Christoph Hellwig June 27, 2024, 12:03 p.m. UTC | #2
On Thu, Jun 27, 2024 at 11:10:13AM +0200, Daniel Wagner wrote:
> I've added a new hook so that the default variables can be configured via the

Please make your mails readable by following the normal 73 character
limit.

Also what is more "real" about these targets?  They mostly are
remote and more diverse.  Maybe say arbitrary?