All of lore.kernel.org
 help / color / mirror / Atom feed
From: chaitanya.kulkarni@wdc.com (Chaitanya Kulkarni)
Subject: [PATCH V2 08/14] blktests: add NVMeOF data verification test for file-ns
Date: Mon, 11 Jun 2018 05:15:48 -0400	[thread overview]
Message-ID: <20180611091554.19639-9-chaitanya.kulkarni@wdc.com> (raw)
In-Reply-To: <20180611091554.19639-1-chaitanya.kulkarni@wdc.com>

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
---
 tests/nvme/011     | 71 ++++++++++++++++++++++++++++++++++++++++++++++
 tests/nvme/011.out |  5 ++++
 2 files changed, 76 insertions(+)
 create mode 100755 tests/nvme/011
 create mode 100644 tests/nvme/011.out

diff --git a/tests/nvme/011 b/tests/nvme/011
new file mode 100755
index 0000000..3038920
--- /dev/null
+++ b/tests/nvme/011
@@ -0,0 +1,71 @@
+#!/bin/bash
+# This is a data verification test for file backed ns.
+# Copyright (c) 2017-2018 Western Digital Corporation or its affiliates.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA  02110-1301, USA.
+#
+#   Author: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
+#
+
+DESCRIPTION="data verification test for file backed ns"
+
+requires() {
+	_have_program nvme && _have_fio && _have_configfs && \
+		_have_module nvme-loop && _have_module nvmet
+}
+
+test() {
+	echo "Running ${TEST_NAME}"
+
+	modprobe nvmet
+	modprobe nvme-loop
+
+	local port
+	local ret=0
+	local nvmedev
+	local file_path
+	local file_path="${TMPDIR}/img"
+	local subsys_name="blktests-subsystem-1"
+
+	truncate -s 1G "${file_path}"
+
+	_create_nvmet_subsystem "${subsys_name}" "${file_path}" \
+		"91fdba0d-f87b-4c25-b80f-db7be1418b9e"
+	port="$(_create_nvmet_port "loop")"
+	_add_nvmet_subsys_to_port "${port}" "${subsys_name}"
+
+	nvme connect -t loop -n "${subsys_name}"
+
+	nvmedev="$(_find_nvme_loop_dev)"
+	cat "/sys/block/${nvmedev}n1/uuid"
+	cat "/sys/block/${nvmedev}n1/wwid"
+
+	_run_fio_verify_io --size=950m --filename="/dev/${nvmedev}n1"
+
+	nvme disconnect -n "${subsys_name}"
+
+	_remove_nvmet_subsystem_from_port "${port}" "${subsys_name}"
+	_remove_nvmet_subsystem "${subsys_name}"
+	_remove_nvmet_port "${port}"
+
+	rm "${file_path}"
+	rm -f local-write-and-verify*state "${fio_out}"
+
+	modprobe -r nvme_loop
+	modprobe -r nvmet
+
+	echo "Test complete"
+}
diff --git a/tests/nvme/011.out b/tests/nvme/011.out
new file mode 100644
index 0000000..ab29fa2
--- /dev/null
+++ b/tests/nvme/011.out
@@ -0,0 +1,5 @@
+Running nvme/011
+91fdba0d-f87b-4c25-b80f-db7be1418b9e
+uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
+NQN:blktests-subsystem-1 disconnected 1 controller(s)
+Test complete
-- 
2.17.0

  parent reply	other threads:[~2018-06-11  9:15 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-11  9:15 [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns Chaitanya Kulkarni
2018-06-11  9:15 ` [PATCH V2 01/14] blktests: common/nvme export ns-mgmt interfaces Chaitanya Kulkarni
2018-06-11 11:10   ` Johannes Thumshirn
2018-06-11  9:15 ` [PATCH V2 02/14] blktests: add NVMeOF bdev-ns target creation test Chaitanya Kulkarni
2018-06-11  9:15 ` [PATCH V2 03/14] blktests: add NVMeOF file-ns " Chaitanya Kulkarni
2018-06-11 11:11   ` Johannes Thumshirn
2018-06-11  9:15 ` [PATCH V2 04/14] blktests: add NVMeOF bdev-ns host creation Chaitanya Kulkarni
2018-06-11 11:12   ` Johannes Thumshirn
2018-06-11  9:15 ` [PATCH V2 05/14] blktests: add NVMeOF file-ns " Chaitanya Kulkarni
2018-06-11 11:12   ` Johannes Thumshirn
2018-06-11  9:15 ` [PATCH V2 06/14] blktests: add fio data verification routine Chaitanya Kulkarni
2018-06-11 11:14   ` Johannes Thumshirn
2018-06-11 21:09   ` Omar Sandoval
2018-06-12  4:40     ` Chaitanya Kulkarni
2018-06-11  9:15 ` [PATCH V2 07/14] blktests: add NVMeoF data verification test for bdev-ns Chaitanya Kulkarni
2018-06-11 11:23   ` Johannes Thumshirn
2018-06-11  9:15 ` Chaitanya Kulkarni [this message]
2018-06-11 11:24   ` [PATCH V2 08/14] blktests: add NVMeOF data verification test for file-ns Johannes Thumshirn
2018-06-11  9:15 ` [PATCH V2 09/14] blktests: add NVMeOF mkfs test for bdev-ns Chaitanya Kulkarni
2018-06-11 11:29   ` Johannes Thumshirn
2018-06-11  9:15 ` [PATCH V2 10/14] blktests: add NVMeOF mkfs test for file-ns Chaitanya Kulkarni
2018-06-11 11:29   ` Johannes Thumshirn
2018-06-11  9:15 ` [PATCH V2 11/14] blktests: add NVMeOF flush test for bdev-ns Chaitanya Kulkarni
2018-06-11 11:31   ` Johannes Thumshirn
2018-06-11  9:15 ` [PATCH V2 12/14] blktests: add NVMeOF flush test for file-ns Chaitanya Kulkarni
2018-06-11 11:31   ` Johannes Thumshirn
2018-06-11  9:15 ` [PATCH V2 13/14] blktests: add NVMeOF many bdev-ns creation test Chaitanya Kulkarni
2018-06-11 11:38   ` Johannes Thumshirn
2018-06-11 17:25     ` Chaitanya Kulkarni
2018-06-11  9:15 ` [PATCH V2 14/14] blktests: add NVMeOF many file-ns " Chaitanya Kulkarni
2018-06-11 11:40 ` [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns Johannes Thumshirn
2018-06-11 22:14 ` Omar Sandoval
2018-06-11 23:14   ` Chaitanya Kulkarni
2018-06-13  0:00   ` Chaitanya Kulkarni
2018-06-13  7:21     ` Johannes Thumshirn
     [not found]       ` <BN6PR04MB120367ABC523F7DDEC83C35A867E0@BN6PR04MB1203.namprd04.prod.outlook.com>
2018-06-25 19:04         ` Omar Sandoval
2018-06-25 19:06           ` Omar Sandoval
2018-06-25 19:16             ` Chaitanya Kulkarni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180611091554.19639-9-chaitanya.kulkarni@wdc.com \
    --to=chaitanya.kulkarni@wdc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.