new file mode 100755
@@ -0,0 +1,36 @@
+#!/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() {
+ _have_program nvme &&
+ _have_modules nvme-loop nvmet &&
+ _have_configfs &&
+ _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")
+ _nvmet_passthru_target_connect "${subsys}$i" > /dev/null
+
+ _nvmet_passthru_target_disconnect "${subsys}$i"
+ _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 | 36 ++++++++++++++++++++++++++++++++++++ tests/nvme/037.out | 2 ++ 2 files changed, 38 insertions(+) create mode 100755 tests/nvme/037 create mode 100644 tests/nvme/037.out