2020-10-08 19:56:19

by Logan Gunthorpe

[permalink] [raw]
Subject: [PATCH blktests v3 00/11] NVMe Target Passthru Block Tests

Hi,

This series adds blktests for the nvmet passthru feature that was merged
for 5.9. It's been reconciled with Sagi's blktest series that Omar
recently merged.

This series is based off of the current blktests master and a git repo is
available for this here:

https://github.com/Eideticom/blktests nvmet_passthru_v3

Thanks,

Logan

--

Changes in v3:
- Fixed a nit with variable initialization in patch 5 (per Chaitanya)
- Replaced use of printf with echo (per Chaitanya)

Changes in v2:

- Rebased on latest blktests master and changed to use the common
helpers Sagi introduced in his series
- Collected Chaitanya's reviewed-by tag

--


Logan Gunthorpe (11):
common/fio: Remove state file in common helper
common/xfs: Create common helper to check for XFS support
common/xfs: Create common helper to verify block device with xfs
nvme: Search for specific subsysnqn in _find_nvme_loop_dev
nvme: Add common helpers for passthru tests
nvme/033: Simple test to create and connect to a passthru target
nvme/034: Add test for passthru data verification
nvme/035: Add test to verify passthru controller with a filesystem
nvme/036: Add test for testing reset command on nvme-passthru
nvme/037: Add test which loops passthru connect and disconnect
nvme/038: Test removal of un-enabled subsystem and ports

common/fio | 1 +
common/rc | 8 +++++
common/xfs | 33 +++++++++++++++++++
tests/nvme/004 | 2 +-
tests/nvme/005 | 2 +-
tests/nvme/008 | 2 +-
tests/nvme/009 | 2 +-
tests/nvme/010 | 3 +-
tests/nvme/011 | 3 +-
tests/nvme/012 | 23 ++++---------
tests/nvme/013 | 21 +++---------
tests/nvme/014 | 2 +-
tests/nvme/015 | 2 +-
tests/nvme/018 | 2 +-
tests/nvme/019 | 2 +-
tests/nvme/020 | 2 +-
tests/nvme/021 | 2 +-
tests/nvme/022 | 2 +-
tests/nvme/023 | 2 +-
tests/nvme/024 | 2 +-
tests/nvme/025 | 2 +-
tests/nvme/026 | 2 +-
tests/nvme/027 | 2 +-
tests/nvme/028 | 2 +-
tests/nvme/029 | 2 +-
tests/nvme/033 | 67 +++++++++++++++++++++++++++++++++++++
tests/nvme/033.out | 7 ++++
tests/nvme/034 | 35 ++++++++++++++++++++
tests/nvme/034.out | 3 ++
tests/nvme/035 | 37 +++++++++++++++++++++
tests/nvme/035.out | 3 ++
tests/nvme/036 | 37 +++++++++++++++++++++
tests/nvme/036.out | 3 ++
tests/nvme/037 | 35 ++++++++++++++++++++
tests/nvme/037.out | 2 ++
tests/nvme/038 | 36 ++++++++++++++++++++
tests/nvme/038.out | 2 ++
tests/nvme/rc | 82 ++++++++++++++++++++++++++++++++++++++++++++--
38 files changed, 419 insertions(+), 58 deletions(-)
create mode 100644 common/xfs
create mode 100755 tests/nvme/033
create mode 100644 tests/nvme/033.out
create mode 100755 tests/nvme/034
create mode 100644 tests/nvme/034.out
create mode 100755 tests/nvme/035
create mode 100644 tests/nvme/035.out
create mode 100755 tests/nvme/036
create mode 100644 tests/nvme/036.out
create mode 100755 tests/nvme/037
create mode 100644 tests/nvme/037.out
create mode 100755 tests/nvme/038
create mode 100644 tests/nvme/038.out


base-commit: 20445c5eb6456addca9131ec6917d2a2d7414e04
--
2.20.1


2020-10-08 19:57:08

by Logan Gunthorpe

[permalink] [raw]
Subject: [PATCH blktests v3 07/11] nvme/034: Add test for passthru data verification

Similar to test nvme/010 and nvme/011 but for a passthru controller

Signed-off-by: Logan Gunthorpe <[email protected]>
---
tests/nvme/034 | 35 +++++++++++++++++++++++++++++++++++
tests/nvme/034.out | 3 +++
2 files changed, 38 insertions(+)
create mode 100755 tests/nvme/034
create mode 100644 tests/nvme/034.out

diff --git a/tests/nvme/034 b/tests/nvme/034
new file mode 100755
index 000000000000..f92e5e20865b
--- /dev/null
+++ b/tests/nvme/034
@@ -0,0 +1,35 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-3.0+
+# Copyright (C) 2019 Logan Gunthorpe
+# Copyright (C) 2019 Eideticom Communications Inc.
+
+. tests/nvme/rc
+
+DESCRIPTION="run data verification fio job on an NVMeOF passthru controller"
+TIMED=1
+
+requires() {
+ _nvme_requires
+ _have_kernel_option NVME_TARGET_PASSTHRU
+ _have_fio
+}
+
+test_device() {
+ local subsys="blktests-subsystem-1"
+ local ctrldev
+ local nsdev
+ local port
+
+ echo "Running ${TEST_NAME}"
+
+ _setup_nvmet
+ port=$(_nvmet_passthru_target_setup "${subsys}")
+ nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" "${subsys}")
+
+ _run_fio_verify_io --size=950m --filename="${nsdev}"
+
+ _nvme_disconnect_subsys "${subsys}"
+ _nvmet_passthru_target_cleanup "${port}" "${subsys}"
+
+ echo "Test complete"
+}
diff --git a/tests/nvme/034.out b/tests/nvme/034.out
new file mode 100644
index 000000000000..0a7bd2f90dae
--- /dev/null
+++ b/tests/nvme/034.out
@@ -0,0 +1,3 @@
+Running nvme/034
+NQN:blktests-subsystem-1 disconnected 1 controller(s)
+Test complete
--
2.20.1

2020-10-22 18:52:32

by Logan Gunthorpe

[permalink] [raw]
Subject: Re: [PATCH blktests v3 00/11] NVMe Target Passthru Block Tests


On 2020-10-08 10:40 a.m., Logan Gunthorpe wrote:
> Hi,
>
> This series adds blktests for the nvmet passthru feature that was merged
> for 5.9. It's been reconciled with Sagi's blktest series that Omar
> recently merged.

Bump. This has been around for a while now. Omar, can you please
consider picking this up?

Thanks,

Logan

2020-10-23 06:29:36

by Logan Gunthorpe

[permalink] [raw]
Subject: Re: [PATCH blktests v3 00/11] NVMe Target Passthru Block Tests



On 2020-10-22 4:04 p.m., Omar Sandoval wrote:
> On Thu, Oct 22, 2020 at 12:45:25PM -0600, Logan Gunthorpe wrote:
>>
>> On 2020-10-08 10:40 a.m., Logan Gunthorpe wrote:
>>> Hi,
>>>
>>> This series adds blktests for the nvmet passthru feature that was merged
>>> for 5.9. It's been reconciled with Sagi's blktest series that Omar
>>> recently merged.
>>
>> Bump. This has been around for a while now. Omar, can you please
>> consider picking this up?
>
> There were a couple of shellcheck errors:
>
> tests/nvme/rc:77:8: warning: Declare and assign separately to avoid masking return values. [SC2155]
> tests/nvme/rc:278:7: note: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'. [SC2005]
>
> I fixed those up and applied, thanks.

Oh, oops. I must have introduced those very recently.

Thanks for fixing it up and merging!

Logan

2020-10-23 13:01:26

by Omar Sandoval

[permalink] [raw]
Subject: Re: [PATCH blktests v3 00/11] NVMe Target Passthru Block Tests

On Thu, Oct 22, 2020 at 12:45:25PM -0600, Logan Gunthorpe wrote:
>
> On 2020-10-08 10:40 a.m., Logan Gunthorpe wrote:
> > Hi,
> >
> > This series adds blktests for the nvmet passthru feature that was merged
> > for 5.9. It's been reconciled with Sagi's blktest series that Omar
> > recently merged.
>
> Bump. This has been around for a while now. Omar, can you please
> consider picking this up?

There were a couple of shellcheck errors:

tests/nvme/rc:77:8: warning: Declare and assign separately to avoid masking return values. [SC2155]
tests/nvme/rc:278:7: note: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'. [SC2005]

I fixed those up and applied, thanks.