new file mode 100755
@@ -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="test deletion of NVMeOF passthru controllers immediately after setup"
+
+requires() {
+ _nvme_requires
+ _have_kernel_option NVME_TARGET_PASSTHRU
+}
+
+test_device() {
+ local subsys="blktests-subsystem-"
+ local iterations=10
+ local ctrldev
+ local port
+
+ echo "Running ${TEST_NAME}"
+
+ _setup_nvmet
+
+ for ((i = 0; i < iterations; i++)); do
+ port=$(_nvmet_passthru_target_setup "${subsys}${i}")
+ nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" \
+ "${subsys}${i}")
+
+ _nvme_disconnect_subsys "${subsys}${i}" >>"${FULL}" 2>&1
+ _nvmet_passthru_target_cleanup "${port}" "${subsys}${i}"
+ done
+
+ echo "Test complete"
+}
new file mode 100644
@@ -0,0 +1,2 @@
+Running nvme/037
+Test complete
Similar to test nvme/031 except for passthru controllers. Note: it's normal to get I/O errors in this test as when the controller disconnects it races with the partition table read. Signed-off-by: Logan Gunthorpe <logang@deltatee.com> --- tests/nvme/037 | 35 +++++++++++++++++++++++++++++++++++ tests/nvme/037.out | 2 ++ 2 files changed, 37 insertions(+) create mode 100755 tests/nvme/037 create mode 100644 tests/nvme/037.out