From: Logan Gunthorpe Date: Thu, 8 Oct 2020 16:40:21 +0000 (-0600) Subject: nvme/035: Add test to verify passthru controller with a filesystem X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=008495f49410241c5a7f2106ecea543bb29c153b;p=users%2Fhch%2Fblktests.git nvme/035: Add test to verify passthru controller with a filesystem This is a similar test as nvme/012 and nvme/013, except with a passthru controller. Signed-off-by: Logan Gunthorpe --- diff --git a/tests/nvme/035 b/tests/nvme/035 new file mode 100755 index 0000000..ee78a75 --- /dev/null +++ b/tests/nvme/035 @@ -0,0 +1,37 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-3.0+ +# Copyright (C) 2019 Logan Gunthorpe +# Copyright (C) 2019 Eideticom Communications Inc. + +. tests/nvme/rc +. common/xfs + +DESCRIPTION="run mkfs and data verification fio job on an NVMeOF passthru controller" +TIMED=1 + +requires() { + _nvme_requires + _have_kernel_option NVME_TARGET_PASSTHRU + _have_xfs + _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}") + + _xfs_run_fio_verify_io "${nsdev}" + + _nvme_disconnect_subsys "${subsys}" + _nvmet_passthru_target_cleanup "${port}" "${subsys}" + + echo "Test complete" +} diff --git a/tests/nvme/035.out b/tests/nvme/035.out new file mode 100644 index 0000000..a602713 --- /dev/null +++ b/tests/nvme/035.out @@ -0,0 +1,3 @@ +Running nvme/035 +NQN:blktests-subsystem-1 disconnected 1 controller(s) +Test complete