[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200827194912.6135-8-logang@deltatee.com>
Date: Thu, 27 Aug 2020 13:49:08 -0600
From: Logan Gunthorpe <logang@...tatee.com>
To: linux-kernel@...r.kernel.org, linux-nvme@...ts.infradead.org,
linux-block@...r.kernel.org, Omar Sandoval <osandov@...ndov.com>
Cc: Sagi Grimberg <sagi@...mberg.me>,
Chaitanya Kulkarni <Chaitanya.Kulkarni@....com>,
Stephen Bates <sbates@...thlin.com>,
Logan Gunthorpe <logang@...tatee.com>
Subject: [PATCH blktests 07/11] nvme/034: Add test for passthru data verification
Similar to test nvme/010 and nvme/011 but for a passthru controller
Signed-off-by: Logan Gunthorpe <logang@...tatee.com>
---
tests/nvme/034 | 37 +++++++++++++++++++++++++++++++++++++
tests/nvme/034.out | 2 ++
2 files changed, 39 insertions(+)
create mode 100755 tests/nvme/034
create mode 100644 tests/nvme/034.out
diff --git a/tests/nvme/034 b/tests/nvme/034
new file mode 100755
index 000000000000..18a539319c12
--- /dev/null
+++ b/tests/nvme/034
@@ -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
+
+DESCRIPTION="run data verification fio job on an NVMeOF passthru controller"
+TIMED=1
+
+requires() {
+ _have_program nvme &&
+ _have_modules nvme-loop nvmet &&
+ _have_configfs &&
+ _have_kernel_option NVME_TARGET_PASSTHRU &&
+ _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 "$subsys")
+
+ _run_fio_verify_io --size=950m --filename="${nsdev}"
+
+ _nvmet_passthru_target_disconnect "$subsys"
+ _nvmet_passthru_target_cleanup "$port" "$subsys"
+
+ echo "Test complete"
+}
diff --git a/tests/nvme/034.out b/tests/nvme/034.out
new file mode 100644
index 000000000000..5c851b46779d
--- /dev/null
+++ b/tests/nvme/034.out
@@ -0,0 +1,2 @@
+Running nvme/034
+Test complete
--
2.20.1
Powered by blists - more mailing lists