fc transport cleanups
Subsystems (2)
cover fc transport cleanups
After the nvmet-fc fixes have been merged into kernel, it's time to get the tests work smoothly with the fc transport. These fixes here are not necessary IF the auto connect udev rule is disabled.
If the auto connect is enabled, discovery controllers are created and destroyed which are not under control of blktests. This only a problem when we iterate over the sysfs resources to find the device. As these operations are not atomic, we have to make the lookups a bit less noisy.
Also the cleanup path needs the same treatment. With a small fix for libnvme which turns an error message into a debug message[1][2], we get (Linux v6.8-rc3)
nvme/002 (create many subsystems and test discovery) [not run]
nvme_trtype=fc is not supported in this test
nvme/003 (test if we're sending keep-alives to a discovery controller)
runtime 11.460s ...
nvme/003 (test if we're sending keep-alives to a discovery controller) [passed]
runtime 11.460s ... 11.439s
nvme/004 (test nvme and nvmet UUID NS descriptors)
runtime 0.580s ...
nvme/004 (test nvme and nvmet UUID NS descriptors) [passed]
runtime 0.580s ... 0.577s
nvme/005 (reset local loopback target) [passed]
runtime 0.691s ... 0.663s
nvme/006 (create an NVMeOF target with a block device-backed ns) [passed]
runtime ... 0.177s
nvme/007 (create an NVMeOF target with a file-backed ns) [passed]
runtime 0.161s ... 0.133s
nvme/008 (create an NVMeOF host with a block device-backed ns) [passed]
runtime 0.590s ... 0.547s
nvme/009 (create an NVMeOF host with a file-backed ns) [passed]
runtime 0.516s ... 0.515s
nvme/010 (run data verification fio job on NVMeOF block device-backed ns) [passed]
runtime 9.348s ... 8.376s
nvme/011 (run data verification fio job on NVMeOF file-backed ns) [passed]
runtime 26.887s ... 25.305s
nvme/012 (run mkfs and data verification fio job on NVMeOF block device-backed ns) [passed]
runtime 16.937s ... 15.540s
nvme/013 (run mkfs and data verification fio job on NVMeOF file-backed ns) [passed]
runtime 28.198s ... 26.436s
nvme/014 (flush a NVMeOF block device-backed ns) [passed]
runtime 3.013s ... 3.036s
nvme/015 (unit test for NVMe flush for file backed ns) [passed]
runtime 2.855s ... 2.721s
nvme/016 (create/delete many NVMeOF block device-backed ns and test discovery) [not run]
nvme_trtype=fc is not supported in this test
nvme/017 (create/delete many file-ns and test discovery) [not run]
nvme_trtype=fc is not supported in this test
nvme/018 (unit test NVMe-oF out of range access on a file backend) [passed]
runtime 0.535s ... 0.556s
nvme/019 (test NVMe DSM Discard command on NVMeOF block-device ns) [passed]
runtime 0.540s ... 0.584s
nvme/020 (test NVMe DSM Discard command on NVMeOF file-backed ns) [passed]
runtime 0.619s ... 0.557s
nvme/021 (test NVMe list command on NVMeOF file-backed ns) [passed]
runtime 0.543s ... 0.576s
nvme/022 (test NVMe reset command on NVMeOF file-backed ns) [passed]
runtime 0.639s ... 0.699s
nvme/023 (test NVMe smart-log command on NVMeOF block-device ns) [passed]
runtime 0.638s ... 0.511s
nvme/024 (test NVMe smart-log command on NVMeOF file-backed ns) [passed]
runtime 0.539s ... 0.602s
nvme/025 (test NVMe effects-log command on NVMeOF file-backed ns) [passed]
runtime 0.527s ... 0.521s
nvme/026 (test NVMe ns-descs command on NVMeOF file-backed ns) [passed]
runtime 0.566s ... 0.569s
nvme/027 (test NVMe ns-rescan command on NVMeOF file-backed ns) [passed]
runtime 0.580s ... 0.607s
nvme/028 (test NVMe list-subsys command on NVMeOF file-backed ns) [passed]
runtime 0.541s ... 0.521s
nvme/029 (test userspace IO via nvme-cli read/write interface) [passed]
runtime 0.809s ... 0.768s
nvme/030 (ensure the discovery generation counter is updated appropriately) [passed]
runtime 0.514s ... 0.521s
nvme/031 (test deletion of NVMeOF controllers immediately after setup) [passed]
runtime 3.434s ... 3.318s
nvme/038 (test deletion of NVMeOF subsystem without enabling) [passed]
runtime 0.047s ... 0.048s
nvme/040 (test nvme fabrics controller reset/disconnect operation during I/O) [passed]
runtime 6.698s ... 6.639s
nvme/041 (Create authenticated connections) [failed]
runtime 2.553s ... 2.543s
--- tests/nvme/041.out 2023-11-28 12:59:52.708172235 +0100
+++ /home/wagi/work/blktests/results/nodev/nvme/041.out.bad 2024-02-06 13:40:30.159988590 +0100
@@ -2,5 +2,5 @@
Test unauthenticated connection (should fail)
disconnected 0 controller(s)
Test authenticated connection
-disconnected 1 controller(s)
+disconnected 0 controller(s)
Test complete
nvme/042 (Test dhchap key types for authenticated connections) [passed]
runtime 2.629s ... 2.710s
nvme/043 (Test hash and DH group variations for authenticated connections) [passed]
runtime 4.014s ... 3.912s
nvme/044 (Test bi-directional authentication) [failed]
runtime 4.019s ... 4.029s
--- tests/nvme/044.out 2023-11-28 12:59:52.711505550 +0100
+++ /home/wagi/work/blktests/results/nodev/nvme/044.out.bad 2024-02-06 13:40:43.653233959 +0100
@@ -4,7 +4,7 @@
Test invalid ctrl authentication (should fail)
disconnected 0 controller(s)
Test valid ctrl authentication
-disconnected 1 controller(s)
+disconnected 0 controller(s)
Test invalid ctrl key (should fail)
disconnected 0 controller(s)
...
(Run 'diff -u tests/nvme/044.out /home/wagi/work/blktests/results/nodev/nvme/044.out.bad' to see the entire diff)
nvme/045 (Test re-authentication) [passed]
runtime 1.534s ... 1.531s
nvme/047 (test different queue types for fabric transports) [not run]
nvme_trtype=fc is not supported in this test
nvme/048 (Test queue count changes on reconnect) [failed]
runtime 0.484s ... 0.506s
--- tests/nvme/048.out 2023-11-28 12:59:52.711505550 +0100
+++ /home/wagi/work/blktests/results/nodev/nvme/048.out.bad 2024-02-06 13:40:48.339870090 +0100
@@ -1,3 +1,7 @@
Running nvme/048
+expected queue count 2 not set
+FAIL
+expected queue count 3 not set
+FAIL
disconnected 1 controller(s)
Test completeThe auth tests and queue count tests fail and I think from a quick look these failures are real. I did run these tests in a loop and didn't see any sporadic failures anymore. So I am confident that we finally have some progress in this area.
[1] https://lore.kernel.org/linux-nvme/i4bmvgd3u7shgizqgtdtssdz5v3wc76l6bcce6fcbvoft32gzk@rztzeut4azvj/
[2] https://github.com/linux-nvme/libnvme/pull/778
Daniel Wagner (5):
nvme/029: fix local variable declarations
nvme/rc: filter out errors from cat when reading files nvme/rc: do not issue warnings on cleanup when using fc transport nvme/rc: do not issue errors when disconnecting when using fc
transport
nvme/rc: revert nvme-cli context tracking
tests/nvme/029 | 2 +- tests/nvme/rc | 73 +++++--------------------------------------------- 2 files changed, 8 insertions(+), 67 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/5 nvme/029: fix local variable declarations
The syntax for local variables declarations uses whitespace as separator and not commas:
tests/nvme/029: line 24: local: bs,': not a valid identifier tests/nvme/029: line 24: local: size,': not a valid identifier tests/nvme/029: line 24: local: `img,': not a valid identifier
--- tests/nvme/029 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/nvme/029 +1 -1
@@ -21,7 +21,7 @@ test_user_io() local disk="$1" local start=$2 local cnt=$3 - local bs, size, img, img1 + local bs size img img1 bs="$(blockdev --getss "$disk")" size=$((cnt * bs))
Signature · 1 line
2.43.0
PATCH 2/5 nvme/rc: filter out errors from cat when reading files
In reply to Daniel WagnerWhen running the tests with FC as transport and the udev auto connect enabled, discovery controllers are created and destroys while the tests are running. This races with the cleanup code and also the _find_nvme_dev() which iterates over all device entries and tries to read the connect of transport and subsysnqn sysfs attributes. Since these steps are not locked in anyway, the resources can go away in between.
Thus filter out 'cat' reporting non existing subsysnqn or transport attributes. The tests will still fail if they can't fine the device etc. But without filtering these errors out the tests fail randomly.
--- tests/nvme/rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tests/nvme/rc +2 -2
@@ -350,7 +350,7 @@ _cleanup_nvmet() { for dev in /sys/class/nvme/nvme*; do dev="$(basename "$dev")" - transport="$(cat "/sys/class/nvme/${dev}/transport")" + transport="$(cat "/sys/class/nvme/${dev}/transport" 2>/dev/null)" if [[ "$transport" == "${nvme_trtype}" ]]; then echo "WARNING: Test did not clean up ${nvme_trtype} device: ${dev}" _nvme_disconnect_ctrl "${dev}"
@@ -840,7 +840,7 @@ _find_nvme_dev() { for dev in /sys/class/nvme/nvme*; do [ -e "$dev" ] || continue dev="$(basename "$dev")" - subsysnqn="$(cat "/sys/class/nvme/${dev}/subsysnqn")" + subsysnqn="$(cat "/sys/class/nvme/${dev}/subsysnqn" 2>/dev/null)" if [[ "$subsysnqn" == "$subsys" ]]; then echo "$dev" fi
Signature · 1 line
2.43.0
PATCH 3/5 nvme/rc: do not issue warnings on cleanup when using fc transport
In reply to Daniel WagnerWhen running the tests with FC as transport and the udev auto connect enabled, discovery controllers are created and destroys while the tests are running.
The cleanup code expects that all devices are under blktetsts control, but this isn't the case. So just disable the warning as it is reporting a lot of false positives.
--- tests/nvme/rc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
tests/nvme/rc +4 -1
@@ -352,7 +352,10 @@ _cleanup_nvmet() { dev="$(basename "$dev")" transport="$(cat "/sys/class/nvme/${dev}/transport" 2>/dev/null)" if [[ "$transport" == "${nvme_trtype}" ]]; then - echo "WARNING: Test did not clean up ${nvme_trtype} device: ${dev}" + # if udev auto connect is enabled for FC we get false positives + if [[ "$transport" != "fc" ]]; then + echo "WARNING: Test did not clean up ${nvme_trtype} device: ${dev}" + fi _nvme_disconnect_ctrl "${dev}" fi done
Signature · 1 line
2.43.0
PATCH 4/5 nvme/rc: do not issue errors when disconnecting when using fc transport
In reply to Daniel WagnerWhen running the tests with FC as transport and the udev auto connect enabled, discovery controllers are created and destroys while the tests are running.
The cleanup code expects that all devices are under blktetsts control, but this isn't the case. Thus filter out disconnect failures as well.
--- tests/nvme/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/nvme/rc +1 -1
@@ -356,7 +356,7 @@ _cleanup_nvmet() { if [[ "$transport" != "fc" ]]; then echo "WARNING: Test did not clean up ${nvme_trtype} device: ${dev}" fi - _nvme_disconnect_ctrl "${dev}" + _nvme_disconnect_ctrl "${dev}" 2>/dev/null fi done
Signature · 1 line
2.43.0
PATCH 5/5 nvme/rc: revert nvme-cli context tracking
In reply to Daniel WagnerThis feature is not needed anymore, after fixing nvmet-fc. The nvmet target code is able to handle parallel operations and doesn't crash anymore. Furthermore, it can't prevent from discovery controller created by the udev rules, so let's rip it out.
--- tests/nvme/rc | 62 --------------------------------------------------- 1 file changed, 62 deletions(-)
tests/nvme/rc +0 -62
@@ -189,57 +189,6 @@ _nvme_calc_rand_io_size() { echo "${io_size_kb}k" } -_have_nvme_cli_context() { - # ignore all non-fc transports for now - if [[ "${nvme_trtype}" != "fc" ]] || - ! nvme connect --help 2>&1 | grep -q -- '--context=<STR>' > /dev/null; then - return 1 - fi - return 0 -} - -_setup_nvme_cli() { - local local_wwnn="${1}" - local local_wwpn="${2}" - local remote_wwnn="${3}" - local remote_wwpn="${4}" - - if ! _have_nvme_cli_context; then - return - fi - - mkdir -p /run/nvme - cat >> /run/nvme/blktests.json <<-EOF - [ - { - "hostnqn": "${def_hostnqn}", - "hostid": "${def_hostid}", - "subsystems": [ - { - "application": "blktests", - "nqn": "blktests-subsystem-1", - "ports": [ - { - "transport": "fc", - "traddr": "nn-${remote_wwnn}:pn-${remote_wwpn}", - "host_traddr": "nn-${local_wwnn}:pn-${local_wwpn}" - } - ] - } - ] - } - ] - EOF -} - -_cleanup_nvme_cli() { - if ! _have_nvme_cli_context; then - return - fi - - rm -f /run/nvme/blktests.json -} - _nvme_fcloop_add_rport() { local local_wwnn="$1" local local_wwpn="$2"
@@ -272,9 +221,6 @@ _setup_fcloop() { local remote_wwnn="${3:-$def_remote_wwnn}" local remote_wwpn="${4:-$def_remote_wwpn}" - _setup_nvme_cli "${local_wwnn}" "${local_wwpn}" \ - "${remote_wwnn}" "${remote_wwpn}" - _nvme_fcloop_add_tport "${remote_wwnn}" "${remote_wwpn}" _nvme_fcloop_add_lport "${local_wwnn}" "${local_wwpn}" _nvme_fcloop_add_rport "${local_wwnn}" "${local_wwpn}" \
@@ -317,8 +263,6 @@ _cleanup_fcloop() { _nvme_fcloop_del_lport "${local_wwnn}" "${local_wwpn}" _nvme_fcloop_del_rport "${local_wwnn}" "${local_wwpn}" \ "${remote_wwnn}" "${remote_wwpn}" - - _cleanup_nvme_cli } _cleanup_blkdev() {
@@ -544,9 +488,6 @@ _nvme_connect_subsys() { subsysnqn="$2" ARGS=(-t "${trtype}" -n "${subsysnqn}") - if _have_nvme_cli_context; then - ARGS+=(--context="blktests") - fi if [[ "${trtype}" == "fc" ]] ; then ARGS+=(-a "${traddr}" -w "${host_traddr}") elif [[ "${trtype}" != "loop" ]]; then
@@ -618,9 +559,6 @@ _nvme_discover() { ARGS=(-t "${trtype}") ARGS+=(--hostnqn="${def_hostnqn}") ARGS+=(--hostid="${def_hostid}") - if _have_nvme_cli_context; then - ARGS+=(--context="blktests") - fi if [[ "${trtype}" = "fc" ]]; then ARGS+=(-a "${traddr}" -w "${host_traddr}") elif [[ "${trtype}" != "loop" ]]; then
Signature · 1 line
2.43.0
Re: [PATCH blktests v1 1/5] nvme/029: fix local variable declarations
In reply to Daniel WagnerQuoted 8 lines · Daniel Wagner
The syntax for local variables declarations uses whitespace as separator and not commas:
tests/nvme/029: line 24: local:
bs,': not a valid identifier tests/nvme/029: line 24: local:size,': not a valid identifier tests/nvme/029: line 24: local: `img,': not a valid identifierSigned-off-by Daniel Wagner <[email protected]>
Looks good.
-ck
Re: [PATCH blktests v1 2/5] nvme/rc: filter out errors from cat when reading files
In reply to Daniel WagnerQuoted 22 lines · Daniel Wagner
When running the tests with FC as transport and the udev auto connect enabled, discovery controllers are created and destroys while the tests are running. This races with the cleanup code and also the
_find_nvme_dev()which iterates over all device entries and tries to read the connect of transport and subsysnqn sysfs attributes. Since these steps are not locked in anyway, the resources can go away in between.Thus filter out 'cat' reporting non existing subsysnqn or transport attributes. The tests will still fail if they can't fine the device etc. But without filtering these errors out the tests fail randomly.
Signed-off-by Daniel Wagner <[email protected]>--- tests/nvme/rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tests/nvme/rc +0
-0
tests/nvme/rc _cleanup_nvmet() { · line 353
Quoted 5 lines
tests/nvme/rc +1
-1@@ -350,7 +350,7 @@ _cleanup_nvmet() { for dev in /sys/class/nvme/nvme*; do dev="$(basename "$dev")" - transport="$(cat "/sys/class/nvme/${dev}/transport")" + transport="$(cat "/sys/class/nvme/${dev}/transport" 2>/dev/null)"
do we have to do anything if there is in error ?
tests/nvme/rc _find_nvme_dev() { · line 843
Quoted 9 lines
tests/nvme/rc +1
-1if [[ "$transport" == "${nvme_trtype}" ]]; then echo "WARNING: Test did not clean up ${nvme_trtype} device: ${dev}" _nvme_disconnect_ctrl "${dev}"@@ -840,7 +840,7 @@ _find_nvme_dev() { for dev in /sys/class/nvme/nvme*; do [ -e "$dev" ] || continue dev="$(basename "$dev")" - subsysnqn="$(cat "/sys/class/nvme/${dev}/subsysnqn")" + subsysnqn="$(cat "/sys/class/nvme/${dev}/subsysnqn" 2>/dev/null)"
same here ..
tests/nvme/rc _find_nvme_dev() { · line 846
Quoted 3 lines
tests/nvme/rc +0
-0if [[ "$subsysnqn" == "$subsys" ]]; then echo "$dev" fi
-ck
Re: [PATCH blktests v1 4/5] nvme/rc: do not issue errors when disconnecting when using fc transport
In reply to Daniel WagnerQuoted 17 lines · Daniel Wagner
When running the tests with FC as transport and the udev auto connect enabled, discovery controllers are created and destroys while the tests are running.
The cleanup code expects that all devices are under blktetsts control, but this isn't the case. Thus filter out disconnect failures as well.
Signed-off-by Daniel Wagner <[email protected]>--- tests/nvme/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/nvme/rc +0
-0
tests/nvme/rc _cleanup_nvmet() { · line 359
Quoted 5 lines
tests/nvme/rc +1
-1@@ -356,7 +356,7 @@ _cleanup_nvmet() { if [[ "$transport" != "fc" ]]; then echo "WARNING: Test did not clean up ${nvme_trtype} device: ${dev}" fi - _nvme_disconnect_ctrl "${dev}" + _nvme_disconnect_ctrl "${dev}" 2>/dev/null
will this only happen for discovery controller or non-discovery controllers also ?
-ck
Re: [PATCH blktests v1 5/5] nvme/rc: revert nvme-cli context tracking
In reply to Daniel WagnerQuoted 6 lines · Daniel Wagner
This feature is not needed anymore, after fixing nvmet-fc. The nvmet target code is able to handle parallel operations and doesn't crash anymore. Furthermore, it can't prevent from discovery controller created by the udev rules, so let's rip it out.
Signed-off-by Daniel Wagner <[email protected]>
-ck
Re: [PATCH blktests v1 2/5] nvme/rc: filter out errors from cat when reading files
In reply to Chaitanya KulkarniQuoted 6 lines · Chaitanya Kulkarni
tests/nvme/rc _cleanup_nvmet() { · line 353
Quoted 4 lines
for dev in /sys/class/nvme/nvme*; do dev="$(basename "$dev")"tests/nvme/rc +1
-1- transport="$(cat "/sys/class/nvme/${dev}/transport")" + transport="$(cat "/sys/class/nvme/${dev}/transport" 2>/dev/null)"do we have to do anything if there is in error ?
In this case transport will be '' and not match with '${nvme_trtype}'. So we already handle this properly.
Quoted 9 lines
Quoted 9 lines
if [[ "$transport" == "${nvme_trtype}" ]]; then echo "WARNING: Test did not clean up ${nvme_trtype} device: ${dev}" _nvme_disconnect_ctrl "${dev}"tests/nvme/rc +1
-1@@ -840,7 +840,7 @@ _find_nvme_dev() { for dev in /sys/class/nvme/nvme*; do [ -e "$dev" ] || continue dev="$(basename "$dev")" - subsysnqn="$(cat "/sys/class/nvme/${dev}/subsysnqn")" + subsysnqn="$(cat "/sys/class/nvme/${dev}/subsysnqn" 2>/dev/null)"
Re: [PATCH blktests v1 4/5] nvme/rc: do not issue errors when disconnecting when using fc transport
In reply to Chaitanya KulkarniQuoted 5 lines · Chaitanya Kulkarni
tests/nvme/rc _cleanup_nvmet() { · line 359
Quoted 2 lines
tests/nvme/rc +1
-1- _nvme_disconnect_ctrl "${dev}" + _nvme_disconnect_ctrl "${dev}" 2>/dev/nullwill this only happen for discovery controller or non-discovery controllers also ?
The global cleanup code disconnects all controllers. Another option would be that we ditch the global cleanup code because every test is already removing all resources it creates. This would also make blktests play a bit nicer. But this is how it is currently done for all transport.
Re: [PATCH blktests v1 2/5] nvme/rc: filter out errors from cat when reading files
In reply to Daniel WagnerQuoted 2 lines · Daniel Wagner
When running the tests with FC as transport and the udev auto connect enabled, discovery controllers are created and destroys while the tests
Nit: maybe you meant "destroyed" or "destroy" instead of "destroys".
Quoted 8 lines
are running. This races with the cleanup code and also the
_find_nvme_dev()which iterates over all device entries and tries to read the connect of transport and subsysnqn sysfs attributes. Since these steps are not locked in anyway, the resources can go away in between.Thus filter out 'cat' reporting non existing subsysnqn or transport attributes. The tests will still fail if they can't fine the device etc.
Nit: s/fine/find/
Quoted 32 lines
But without filtering these errors out the tests fail randomly.
Signed-off-by Daniel Wagner <[email protected]>--- tests/nvme/rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tests/nvme/rc +2
-2@@ -350,7 +350,7 @@ _cleanup_nvmet() { for dev in /sys/class/nvme/nvme*; do dev="$(basename "$dev")" - transport="$(cat "/sys/class/nvme/${dev}/transport")" + transport="$(cat "/sys/class/nvme/${dev}/transport" 2>/dev/null)" if [[ "$transport" == "${nvme_trtype}" ]]; then echo "WARNING: Test did not clean up ${nvme_trtype} device: ${dev}" _nvme_disconnect_ctrl "${dev}"@@ -840,7 +840,7 @@ _find_nvme_dev() { for dev in /sys/class/nvme/nvme*; do [ -e "$dev" ] || continue dev="$(basename "$dev")" - subsysnqn="$(cat "/sys/class/nvme/${dev}/subsysnqn")" + subsysnqn="$(cat "/sys/class/nvme/${dev}/subsysnqn" 2>/dev/null)" if [[ "$subsysnqn" == "$subsys" ]]; then echo "$dev" fiSignature · 1 line
2.43.0
Re: [PATCH blktests v1 3/5] nvme/rc: do not issue warnings on cleanup when using fc transport
In reply to Daniel WagnerQuoted 2 lines · Daniel Wagner
When running the tests with FC as transport and the udev auto connect enabled, discovery controllers are created and destroys while the tests
Same comment as the previous patch: s/destroys/destroyed/
Quoted 3 lines
are running.
The cleanup code expects that all devices are under blktetsts control,
s/blktetsts/blktests/
Quoted 27 lines
but this isn't the case. So just disable the warning as it is reporting a lot of false positives.
Signed-off-by Daniel Wagner <[email protected]>--- tests/nvme/rc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)tests/nvme/rc +4
-1@@ -352,7 +352,10 @@ _cleanup_nvmet() { dev="$(basename "$dev")" transport="$(cat "/sys/class/nvme/${dev}/transport" 2>/dev/null)" if [[ "$transport" == "${nvme_trtype}" ]]; then - echo "WARNING: Test did not clean up ${nvme_trtype} device: ${dev}" + # if udev auto connect is enabled for FC we get false positives + if [[ "$transport" != "fc" ]]; then + echo "WARNING: Test did not clean up ${nvme_trtype} device: ${dev}" + fi _nvme_disconnect_ctrl "${dev}" fi doneSignature · 1 line
2.43.0
Re: [PATCH blktests v1 4/5] nvme/rc: do not issue errors when disconnecting when using fc transport
In reply to Daniel WagnerQuoted 2 lines · Daniel Wagner
When running the tests with FC as transport and the udev auto connect enabled, discovery controllers are created and destroys while the tests
Same nit comment for "destroys".
Quoted 3 lines
are running.
The cleanup code expects that all devices are under blktetsts control,
Same spell comment on "blktetsts".
Quoted 23 lines
but this isn't the case. Thus filter out disconnect failures as well.
Signed-off-by Daniel Wagner <[email protected]>--- tests/nvme/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/nvme/rc +1
-1@@ -356,7 +356,7 @@ _cleanup_nvmet() { if [[ "$transport" != "fc" ]]; then echo "WARNING: Test did not clean up ${nvme_trtype} device: ${dev}" fi - _nvme_disconnect_ctrl "${dev}" + _nvme_disconnect_ctrl "${dev}" 2>/dev/null fi doneSignature · 1 line
2.43.0
Quoted 3 lines · Daniel Wagner
After the nvmet-fc fixes have been merged into kernel, it's time to get the tests work smoothly with the fc transport. These fixes here are not necessary IF the auto connect udev rule is disabled.
...
Quoted 4 lines
The auth tests and queue count tests fail and I think from a quick look these failures are real. I did run these tests in a loop and didn't see any sporadic failures anymore. So I am confident that we finally have some progress in this area.
Hi Daniel, this is great progress!
And thanks for the patches. I ran blktests with them, and got same result as yours. Nice :)
I made nit spelling comments in some of the commit messages. From code point of view, the patches look good to me. Will wait some more days for more reviews and discussions.