@@ -122,13 +122,25 @@ _require_nvme_test_img_size() {
return 0
}
-_require_nvme_trtype() {
+_is_nvme_trtype() {
local trtype
+
for trtype in "$@"; do
if [[ "${nvme_trtype}" == "$trtype" ]]; then
return 0
fi
done
+
+ return 1
+}
+
+_require_nvme_trtype() {
+ local trtype
+
+ if _is_nvme_trtype "$@"; then
+ return 0
+ fi
+
SKIP_REASONS+=("nvme_trtype=${nvme_trtype} is not supported in this test")
return 1
}
@@ -513,7 +525,8 @@ _nvme_connect_subsys() {
if [[ -n "${keep_alive_tmo}" ]]; then
ARGS+=(--keep-alive-tmo="${keep_alive_tmo}")
fi
- if [[ -n "${reconnect_delay}" ]]; then
+ if ! _is_nvme_trtype loop &&
+ [[ -n "${reconnect_delay}" ]]; then
ARGS+=(--reconnect-delay="${reconnect_delay}")
fi
if [[ -n "${ctrl_loss_tmo}" ]]; then
The loop transport is also considered a fabric transport. But not connect options are supported, in particular the reconnect-delay option. nvme-cli can't figure this out as the kernel reports the option support for all transports (union). Thus, we have to filter out this option for this loop transport in blktests. Signed-off-by: Daniel Wagner <dwagner@suse.de> --- tests/nvme/rc | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-)