All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns
@ 2018-06-11  9:15 Chaitanya Kulkarni
  2018-06-11  9:15 ` [PATCH V2 01/14] blktests: common/nvme export ns-mgmt interfaces Chaitanya Kulkarni
                   ` (15 more replies)
  0 siblings, 16 replies; 38+ messages in thread
From: Chaitanya Kulkarni @ 2018-06-11  9:15 UTC (permalink / raw)


Hi,

This patch series restructures the target side namespace creation code and 
adds new testcases for NVMeOF loop target (nvme_loop). Also, we add one 
fio helper for basic data verification, new testcases like basic
creation/deletion of the host/target, fio based data verification testcases
for both block device and file backed target namespace and file system
formatting and data verification from the host side.

-Regards,
Chaitanya

Changes Since V1:-

1. Add fio data verification helper.
2. Add a new test for many namespaces creation for file-backed ns.
3. Minor fixes and cleanups.

Chaitanya Kulkarni (14):
  blktests: common/nvme export ns-mgmt interfaces
  blktests: add NVMeOF bdev-ns target creation test
  blktests: add NVMeOF file-ns target creation test
  blktests: add NVMeOF bdev-ns host creation
  blktests: add NVMeOF file-ns host creation
  blktests: add fio data verification routine
  blktests: add NVMeoF data verification test for bdev-ns
  blktests: add NVMeOF data verification test for file-ns
  blktests: add NVMeOF mkfs test for bdev-ns
  blktests: add NVMeOF mkfs test for file-ns
  blktests: add NVMeOF flush test for bdev-ns
  blktests: add NVMeOF flush test for file-ns
  blktests: add NVMeOF many bdev-ns creation test
  blktests: add NVMeOF many file-ns creation test

 common/fio         | 12 +++++++
 common/nvme        | 46 +++++++++++++++++-------
 tests/nvme/006     | 62 ++++++++++++++++++++++++++++++++
 tests/nvme/006.out |  2 ++
 tests/nvme/007     | 60 +++++++++++++++++++++++++++++++
 tests/nvme/007.out |  2 ++
 tests/nvme/008     | 72 +++++++++++++++++++++++++++++++++++++
 tests/nvme/008.out |  5 +++
 tests/nvme/009     | 66 ++++++++++++++++++++++++++++++++++
 tests/nvme/009.out |  5 +++
 tests/nvme/010     | 76 +++++++++++++++++++++++++++++++++++++++
 tests/nvme/010.out |  5 +++
 tests/nvme/011     | 71 +++++++++++++++++++++++++++++++++++++
 tests/nvme/011.out |  5 +++
 tests/nvme/012     | 88 ++++++++++++++++++++++++++++++++++++++++++++++
 tests/nvme/012.out |  5 +++
 tests/nvme/013     | 84 +++++++++++++++++++++++++++++++++++++++++++
 tests/nvme/013.out |  5 +++
 tests/nvme/014     | 76 +++++++++++++++++++++++++++++++++++++++
 tests/nvme/014.out |  6 ++++
 tests/nvme/015     | 68 +++++++++++++++++++++++++++++++++++
 tests/nvme/015.out |  6 ++++
 tests/nvme/016     | 64 +++++++++++++++++++++++++++++++++
 tests/nvme/016.out | 13 +++++++
 tests/nvme/017     | 70 ++++++++++++++++++++++++++++++++++++
 tests/nvme/017.out | 13 +++++++
 26 files changed, 974 insertions(+), 13 deletions(-)
 create mode 100755 tests/nvme/006
 create mode 100644 tests/nvme/006.out
 create mode 100755 tests/nvme/007
 create mode 100644 tests/nvme/007.out
 create mode 100755 tests/nvme/008
 create mode 100644 tests/nvme/008.out
 create mode 100755 tests/nvme/009
 create mode 100644 tests/nvme/009.out
 create mode 100755 tests/nvme/010
 create mode 100644 tests/nvme/010.out
 create mode 100755 tests/nvme/011
 create mode 100644 tests/nvme/011.out
 create mode 100755 tests/nvme/012
 create mode 100644 tests/nvme/012.out
 create mode 100755 tests/nvme/013
 create mode 100644 tests/nvme/013.out
 create mode 100755 tests/nvme/014
 create mode 100755 tests/nvme/014.out
 create mode 100755 tests/nvme/015
 create mode 100755 tests/nvme/015.out
 create mode 100755 tests/nvme/016
 create mode 100644 tests/nvme/016.out
 create mode 100755 tests/nvme/017
 create mode 100644 tests/nvme/017.out

-- 
2.17.0

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 01/14] blktests: common/nvme export ns-mgmt interfaces
  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 ` 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
                   ` (14 subsequent siblings)
  15 siblings, 1 reply; 38+ messages in thread
From: Chaitanya Kulkarni @ 2018-06-11  9:15 UTC (permalink / raw)


This patch modifies and exports the interfaces to create and delete ns
which can be consumed by future testcases like creation/deletion of ns.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
---
 common/nvme | 46 +++++++++++++++++++++++++++++++++-------------
 1 file changed, 33 insertions(+), 13 deletions(-)

diff --git a/common/nvme b/common/nvme
index 5d7d89c..044d7fe 100644
--- a/common/nvme
+++ b/common/nvme
@@ -48,31 +48,51 @@ _remove_nvmet_port() {
 	rmdir "${NVMET_CFS}/ports/${port}"
 }
 
-_create_nvmet_subsystem() {
+_create_nvmet_ns() {
 	local nvmet_subsystem="$1"
-	local blkdev="$2"
+	local nsid="$2"
+	local blkdev="$3"
 	local uuid="00000000-0000-0000-0000-000000000000"
-	local cfs_path="${NVMET_CFS}/subsystems/${nvmet_subsystem}"
+	local subsys_path="${NVMET_CFS}/subsystems/${nvmet_subsystem}"
+	local ns_path="${subsys_path}/namespaces/${nsid}"
 
-	if [[ $# -eq 3 ]]; then
-		uuid="$3"
+	if [[ $# -eq 4 ]]; then
+		uuid="$4"
 	fi
 
+	mkdir "${ns_path}"
+	printf "%s" "${blkdev}" > "${ns_path}/device_path"
+	printf "%s" "${uuid}" > "${ns_path}/device_uuid"
+	printf 1 > "${ns_path}/enable"
+}
+
+_create_nvmet_subsystem() {
+	local nvmet_subsystem="$1"
+	local blkdev="$2"
+	local uuid=$3
+	local cfs_path="${NVMET_CFS}/subsystems/${nvmet_subsystem}"
+
 	mkdir -p "${cfs_path}"
 	echo 1 > "${cfs_path}/attr_allow_any_host"
-	mkdir "${cfs_path}/namespaces/1"
-	printf "%s" "$blkdev" > "${cfs_path}/namespaces/1/device_path"
-	printf "%s" "$uuid" > "${cfs_path}/namespaces/1/device_uuid"
-	printf 1 > "${cfs_path}/namespaces/1/enable"
+	_create_nvmet_ns "${nvmet_subsystem}" "1" "${blkdev}" "${uuid}"
+}
+
+_remove_nvmet_ns() {
+	local nvmet_subsystem="$1"
+	local nsid=$2
+	local subsys_path="${NVMET_CFS}/subsystems/${nvmet_subsystem}"
+	local nvmet_ns_path="${subsys_path}/namespaces/${nsid}"
+
+	echo 0 > "${nvmet_ns_path}/enable"
+	rmdir "${nvmet_ns_path}"
 }
 
 _remove_nvmet_subsystem() {
 	local nvmet_subsystem="$1"
-	local cfs_path="${NVMET_CFS}/subsystems/${nvmet_subsystem}"
+	local subsys_path="${NVMET_CFS}/subsystems/${nvmet_subsystem}"
 
-	echo 0 > "${cfs_path}/namespaces/1/enable"
-	rmdir "${cfs_path}/namespaces/1/"
-	rmdir "${cfs_path}"
+	_remove_nvmet_ns "${nvmet_subsystem}" "1"
+	rmdir "${subsys_path}"
 }
 
 _add_nvmet_subsys_to_port() {
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH V2 02/14] blktests: add NVMeOF bdev-ns target creation test
  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  9:15 ` Chaitanya Kulkarni
  2018-06-11  9:15 ` [PATCH V2 03/14] blktests: add NVMeOF file-ns " Chaitanya Kulkarni
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 38+ messages in thread
From: Chaitanya Kulkarni @ 2018-06-11  9:15 UTC (permalink / raw)


This adds a new unit test to create NVMeOF target with block-device
backed namespace.

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

diff --git a/tests/nvme/006 b/tests/nvme/006
new file mode 100755
index 0000000..57cd2b9
--- /dev/null
+++ b/tests/nvme/006
@@ -0,0 +1,62 @@
+#!/bin/bash
+# Test NVMeOF target creation with a block device 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="unit tests for creating target with a block device ns"
+QUICK=1
+
+requires() {
+	_have_program nvme && _have_module nvme-loop && _have_module loop && \
+		_have_module nvmet && _have_configfs
+}
+
+test() {
+	echo "Running ${TEST_NAME}"
+
+	local port
+	local loop_dev
+	local subsys_name="blktests-subsystem-1"
+
+	modprobe nvmet
+	modprobe nvme-loop
+
+	truncate -s 1G "$TMPDIR/img"
+
+	loop_dev="$(losetup -f --show "$TMPDIR/img")"
+
+	_create_nvmet_subsystem "${subsys_name}" "${loop_dev}" \
+		"91fdba0d-f87b-4c25-b80f-db7be1418b9e"
+	port="$(_create_nvmet_port "loop")"
+	_add_nvmet_subsys_to_port "${port}" "${subsys_name}"
+
+	_remove_nvmet_subsystem_from_port "${port}" "${subsys_name}"
+	_remove_nvmet_subsystem "${subsys_name}"
+	_remove_nvmet_port "${port}"
+
+	losetup -d "$loop_dev"
+
+	rm "$TMPDIR/img"
+
+	modprobe -r nvme-loop
+	modprobe -r nvmet
+
+	echo "Test complete"
+}
diff --git a/tests/nvme/006.out b/tests/nvme/006.out
new file mode 100644
index 0000000..b66cd5a
--- /dev/null
+++ b/tests/nvme/006.out
@@ -0,0 +1,2 @@
+Running nvme/006
+Test complete
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH V2 03/14] blktests: add NVMeOF file-ns target creation test
  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  9:15 ` [PATCH V2 02/14] blktests: add NVMeOF bdev-ns target creation test Chaitanya Kulkarni
@ 2018-06-11  9:15 ` 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
                   ` (12 subsequent siblings)
  15 siblings, 1 reply; 38+ messages in thread
From: Chaitanya Kulkarni @ 2018-06-11  9:15 UTC (permalink / raw)


This adds a new unit test to create NVMeOF target with file
backed namespace.

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

diff --git a/tests/nvme/007 b/tests/nvme/007
new file mode 100755
index 0000000..74eed0d
--- /dev/null
+++ b/tests/nvme/007
@@ -0,0 +1,60 @@
+#!/bin/bash
+# Test NVMeOF target creation with a 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="unit tests for creating target with a file backed ns"
+QUICK=1
+
+requires() {
+	_have_program nvme && _have_module nvme-loop && _have_module nvmet && \
+		_have_configfs
+}
+
+test() {
+	echo "Running ${TEST_NAME}"
+
+	local port
+	local file_path
+	local subsys_name="blktests-subsystem-1"
+
+	modprobe nvmet
+	modprobe nvme-loop
+
+	file_path="${TMPDIR}/img"
+
+	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}"
+
+	_remove_nvmet_subsystem_from_port "${port}" "${subsys_name}"
+	_remove_nvmet_subsystem "${subsys_name}"
+	_remove_nvmet_port "${port}"
+
+	rm "${file_path}"
+
+	modprobe -r nvme-loop
+	modprobe -r nvmet
+
+	echo "Test complete"
+}
diff --git a/tests/nvme/007.out b/tests/nvme/007.out
new file mode 100644
index 0000000..fdb3472
--- /dev/null
+++ b/tests/nvme/007.out
@@ -0,0 +1,2 @@
+Running nvme/007
+Test complete
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH V2 04/14] blktests: add NVMeOF bdev-ns host creation
  2018-06-11  9:15 [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns Chaitanya Kulkarni
                   ` (2 preceding siblings ...)
  2018-06-11  9:15 ` [PATCH V2 03/14] blktests: add NVMeOF file-ns " Chaitanya Kulkarni
@ 2018-06-11  9:15 ` 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
                   ` (11 subsequent siblings)
  15 siblings, 1 reply; 38+ messages in thread
From: Chaitanya Kulkarni @ 2018-06-11  9:15 UTC (permalink / raw)


This adds a new unit test to create NVMeOF target and host.
In the test we create one block device backed namespace on target.

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

diff --git a/tests/nvme/008 b/tests/nvme/008
new file mode 100755
index 0000000..28079cb
--- /dev/null
+++ b/tests/nvme/008
@@ -0,0 +1,72 @@
+#!/bin/bash
+# Test NVMeOF host creation with a block device 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="unit test for creating a host with one block device backed ns"
+QUICK=1
+
+requires() {
+	_have_program nvme && _have_module nvme-loop && _have_module loop && \
+		_have_module nvmet && _have_configfs
+}
+
+test() {
+	echo "Running ${TEST_NAME}"
+
+	modprobe nvmet
+	modprobe nvme-loop
+
+	local port
+	local nvmedev
+	local loop_dev
+	local file_path="$TMPDIR/img"
+	local subsys_name="blktests-subsystem-1"
+
+	truncate -s 1G "${file_path}"
+
+	loop_dev="$(losetup -f --show "${file_path}")"
+
+	_create_nvmet_subsystem "${subsys_name}" "${loop_dev}" \
+		"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"
+
+	nvme disconnect -n "${subsys_name}"
+
+	_remove_nvmet_subsystem_from_port "${port}" "${subsys_name}"
+	_remove_nvmet_subsystem "${subsys_name}"
+	_remove_nvmet_port "${port}"
+
+	losetup -d "${loop_dev}"
+
+	rm "${file_path}"
+
+	modprobe -r nvme-loop
+	modprobe -r nvmet
+
+	echo "Test complete"
+}
diff --git a/tests/nvme/008.out b/tests/nvme/008.out
new file mode 100644
index 0000000..b05b46d
--- /dev/null
+++ b/tests/nvme/008.out
@@ -0,0 +1,5 @@
+Running nvme/008
+91fdba0d-f87b-4c25-b80f-db7be1418b9e
+uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
+NQN:blktests-subsystem-1 disconnected 1 controller(s)
+Test complete
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH V2 05/14] blktests: add NVMeOF file-ns host creation
  2018-06-11  9:15 [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns Chaitanya Kulkarni
                   ` (3 preceding siblings ...)
  2018-06-11  9:15 ` [PATCH V2 04/14] blktests: add NVMeOF bdev-ns host creation Chaitanya Kulkarni
@ 2018-06-11  9:15 ` 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
                   ` (10 subsequent siblings)
  15 siblings, 1 reply; 38+ messages in thread
From: Chaitanya Kulkarni @ 2018-06-11  9:15 UTC (permalink / raw)


This adds a new unit test to create NVMeOF target and host.
In the test we create one file backed namespace on target.

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

diff --git a/tests/nvme/009 b/tests/nvme/009
new file mode 100755
index 0000000..80484fd
--- /dev/null
+++ b/tests/nvme/009
@@ -0,0 +1,66 @@
+#!/bin/bash
+# Test NVMeOF host creation with a 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="unit test for creating a host with one file backed ns"
+QUICK=1
+
+requires() {
+	_have_program nvme && _have_module nvme-loop && _have_configfs \
+		_have_module nvmet
+}
+
+test() {
+	echo "Running ${TEST_NAME}"
+
+	modprobe nvmet
+	modprobe nvme-loop
+
+	local port
+	local nvmedev
+	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"
+
+	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}"
+
+	modprobe -r nvme-loop
+	modprobe -r nvmet
+	echo "Test complete"
+}
diff --git a/tests/nvme/009.out b/tests/nvme/009.out
new file mode 100644
index 0000000..7fd27ff
--- /dev/null
+++ b/tests/nvme/009.out
@@ -0,0 +1,5 @@
+Running nvme/009
+91fdba0d-f87b-4c25-b80f-db7be1418b9e
+uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
+NQN:blktests-subsystem-1 disconnected 1 controller(s)
+Test complete
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH V2 06/14] blktests: add fio data verification routine
  2018-06-11  9:15 [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns Chaitanya Kulkarni
                   ` (4 preceding siblings ...)
  2018-06-11  9:15 ` [PATCH V2 05/14] blktests: add NVMeOF file-ns " Chaitanya Kulkarni
@ 2018-06-11  9:15 ` Chaitanya Kulkarni
  2018-06-11 11:14   ` Johannes Thumshirn
  2018-06-11 21:09   ` Omar Sandoval
  2018-06-11  9:15 ` [PATCH V2 07/14] blktests: add NVMeoF data verification test for bdev-ns Chaitanya Kulkarni
                   ` (9 subsequent siblings)
  15 siblings, 2 replies; 38+ messages in thread
From: Chaitanya Kulkarni @ 2018-06-11  9:15 UTC (permalink / raw)


Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
---
 common/fio | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/common/fio b/common/fio
index e83258d..abe5ee2 100644
--- a/common/fio
+++ b/common/fio
@@ -162,10 +162,17 @@ _fio_perf() {
 # tests that should run for a specific amount of time.
 _run_fio() {
 	local args=("--output=$TMPDIR/fio_perf" "--output-format=terse" "--terse-version=4" "--group_reporting=1")
+
 	if [[ -v TIMEOUT ]]; then
 		args+=("--runtime=$TIMEOUT")
 	fi
+
 	fio "${args[@]}" "$@"
+
+	if [ $? -ne 0 ]; then
+		echo "error fio failed"
+		cat "$TMPDIR"/fio_perf
+	fi
 }
 
 # Wrapper around _run_fio used if you need some I/O but don't really care much
@@ -175,6 +182,11 @@ _run_fio_rand_io() {
 		--name=reads --direct=1 "$@"
 }
 
+_run_fio_verify_io() {
+	_run_fio --name=verify --rw=randwrite --direct=1 --ioengine=libaio --bs=4k \
+		      --norandommap --iodepth=16 --verify=crc32c "$@"
+}
+
 _fio_perf_report() {
 	# If there is more than one group, we don't know what to report.
 	if [[ $(wc -l < "$TMPDIR/fio_perf") -gt 1 ]]; then
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH V2 07/14] blktests: add NVMeoF data verification test for bdev-ns
  2018-06-11  9:15 [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns Chaitanya Kulkarni
                   ` (5 preceding siblings ...)
  2018-06-11  9:15 ` [PATCH V2 06/14] blktests: add fio data verification routine Chaitanya Kulkarni
@ 2018-06-11  9:15 ` Chaitanya Kulkarni
  2018-06-11 11:23   ` Johannes Thumshirn
  2018-06-11  9:15 ` [PATCH V2 08/14] blktests: add NVMeOF data verification test for file-ns Chaitanya Kulkarni
                   ` (8 subsequent siblings)
  15 siblings, 1 reply; 38+ messages in thread
From: Chaitanya Kulkarni @ 2018-06-11  9:15 UTC (permalink / raw)


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

diff --git a/tests/nvme/010 b/tests/nvme/010
new file mode 100755
index 0000000..4224ea6
--- /dev/null
+++ b/tests/nvme/010
@@ -0,0 +1,76 @@
+#!/bin/bash
+# This is a data verification test for block device 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 block device backed ns"
+
+requires() {
+	_have_program nvme && _have_fio && _have_module loop && \
+		_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 loop_dev
+	local file_path="${TMPDIR}/img"
+	local subsys_name="blktests-subsystem-1"
+
+	truncate -s 1G "${file_path}"
+
+	loop_dev="$(losetup -f --show "${file_path}")"
+
+	_create_nvmet_subsystem "${subsys_name}" "${loop_dev}" \
+		"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}"
+
+	losetup -d "${loop_dev}"
+
+	rm "${file_path}"
+	rm -f local*verify*state "${fio_out}"
+
+	modprobe -r nvme_loop
+	modprobe -r nvmet
+
+	echo "Test complete"
+}
diff --git a/tests/nvme/010.out b/tests/nvme/010.out
new file mode 100644
index 0000000..788ea96
--- /dev/null
+++ b/tests/nvme/010.out
@@ -0,0 +1,5 @@
+Running nvme/010
+91fdba0d-f87b-4c25-b80f-db7be1418b9e
+uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
+NQN:blktests-subsystem-1 disconnected 1 controller(s)
+Test complete
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH V2 08/14] blktests: add NVMeOF data verification test for file-ns
  2018-06-11  9:15 [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns Chaitanya Kulkarni
                   ` (6 preceding siblings ...)
  2018-06-11  9:15 ` [PATCH V2 07/14] blktests: add NVMeoF data verification test for bdev-ns Chaitanya Kulkarni
@ 2018-06-11  9:15 ` Chaitanya Kulkarni
  2018-06-11 11:24   ` Johannes Thumshirn
  2018-06-11  9:15 ` [PATCH V2 09/14] blktests: add NVMeOF mkfs test for bdev-ns Chaitanya Kulkarni
                   ` (7 subsequent siblings)
  15 siblings, 1 reply; 38+ messages in thread
From: Chaitanya Kulkarni @ 2018-06-11  9:15 UTC (permalink / raw)


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

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH V2 09/14] blktests: add NVMeOF mkfs test for bdev-ns
  2018-06-11  9:15 [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns Chaitanya Kulkarni
                   ` (7 preceding siblings ...)
  2018-06-11  9:15 ` [PATCH V2 08/14] blktests: add NVMeOF data verification test for file-ns Chaitanya Kulkarni
@ 2018-06-11  9:15 ` 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
                   ` (6 subsequent siblings)
  15 siblings, 1 reply; 38+ messages in thread
From: Chaitanya Kulkarni @ 2018-06-11  9:15 UTC (permalink / raw)


This adds a new test which formats the ns with file system on the host side
and runs fio data verification workload.

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

diff --git a/tests/nvme/012 b/tests/nvme/012
new file mode 100755
index 0000000..191cec8
--- /dev/null
+++ b/tests/nvme/012
@@ -0,0 +1,88 @@
+#!/bin/bash
+# Test mkfs with data verification for block device 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="test mkfs with data verification for block device backed ns"
+
+requires() {
+	_have_program nvme && _have_program mkfs.xfs && _have_program fio && \
+		_have_module loop && _have_module nvmet && \
+		_have_module nvme-loop && _have_configfs
+}
+
+test() {
+	echo "Running ${TEST_NAME}"
+
+	modprobe nvmet
+	modprobe nvme-loop
+
+	local port
+	local ret=0
+	local nvmedev
+	local loop_dev
+	local mount_dir="/mnt/blktests"
+	local file_path="${TMPDIR}/img"
+	local subsys_name="blktests-subsystem-1"
+
+	mkdir -p "${mount_dir}" > /dev/null 2>&1
+
+	truncate -s 1G "${file_path}"
+
+	loop_dev="$(losetup -f --show "${file_path}")"
+
+	_create_nvmet_subsystem "${subsys_name}" "${loop_dev}" \
+		"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"
+
+	umount ${mount_dir} > /dev/null 2>&1
+
+	mkfs.xfs -f /dev/"${nvmedev}n1" > /dev/null 2>&1
+
+	mount /dev/"${nvmedev}n1" "${mount_dir}"
+
+	_run_fio_verify_io --size=950m --directory="${mount_dir}/"
+
+	umount "${mount_dir}" > /dev/null 2>&1
+
+	nvme disconnect -n "${subsys_name}"
+
+	_remove_nvmet_subsystem_from_port "${port}" "${subsys_name}"
+	_remove_nvmet_subsystem "${subsys_name}"
+	_remove_nvmet_port "${port}"
+
+	losetup -d "${loop_dev}"
+
+	rm -f local*verify*state
+	rm "${file_path}"
+	rm -fr "${mount_dir}"
+
+	modprobe -r nvme_loop
+	modprobe -r nvmet
+
+	echo "Test complete"
+}
diff --git a/tests/nvme/012.out b/tests/nvme/012.out
new file mode 100644
index 0000000..581e686
--- /dev/null
+++ b/tests/nvme/012.out
@@ -0,0 +1,5 @@
+Running nvme/012
+91fdba0d-f87b-4c25-b80f-db7be1418b9e
+uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
+NQN:blktests-subsystem-1 disconnected 1 controller(s)
+Test complete
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH V2 10/14] blktests: add NVMeOF mkfs test for file-ns
  2018-06-11  9:15 [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns Chaitanya Kulkarni
                   ` (8 preceding siblings ...)
  2018-06-11  9:15 ` [PATCH V2 09/14] blktests: add NVMeOF mkfs test for bdev-ns Chaitanya Kulkarni
@ 2018-06-11  9:15 ` 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
                   ` (5 subsequent siblings)
  15 siblings, 1 reply; 38+ messages in thread
From: Chaitanya Kulkarni @ 2018-06-11  9:15 UTC (permalink / raw)


This adds a new test which formats the ns with file system on the host side
and runs fio data verification workload.

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

diff --git a/tests/nvme/013 b/tests/nvme/013
new file mode 100755
index 0000000..164a15e
--- /dev/null
+++ b/tests/nvme/013
@@ -0,0 +1,84 @@
+#!/bin/bash
+# Test mkfs with data verification 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="test mkfs with data verification for file backed ns"
+
+requires() {
+	_have_program nvme && _have_program mkfs.xfs && _have_fio && \
+		_have_module nvmet && _have_module nvme-loop && \
+		_have_configfs
+}
+
+test() {
+	echo "Running ${TEST_NAME}"
+
+	modprobe nvmet
+	modprobe nvme-loop
+
+	local port
+	local ret=0
+	local nvmedev
+	local mount_dir="/mnt/blktests/"
+	local file_path="${TMPDIR}/img"
+
+	local subsys_name="blktests-subsystem-1"
+
+	mkdir -p "${mount_dir}" > /dev/null 2>&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"
+
+	umount ${mount_dir} > /dev/null 2>&1
+
+	mkfs.xfs -f /dev/"${nvmedev}n1" > /dev/null 2>&1
+
+	mount /dev/"${nvmedev}n1" "${mount_dir}"
+
+	_run_fio_verify_io --size=800m --directory="${mount_dir}/"
+
+	umount "${mount_dir}" > /dev/null 2>&1
+
+	nvme disconnect -n "${subsys_name}"
+
+	_remove_nvmet_subsystem_from_port "${port}" "${subsys_name}"
+	_remove_nvmet_subsystem "${subsys_name}"
+	_remove_nvmet_port "${port}"
+
+	rm -f local*verify*state
+	rm "${file_path}"
+	rm -fr "${mount_dir}"
+
+	modprobe -r nvme_loop
+	modprobe -r nvmet
+
+	echo "Test complete"
+}
diff --git a/tests/nvme/013.out b/tests/nvme/013.out
new file mode 100644
index 0000000..f7285a9
--- /dev/null
+++ b/tests/nvme/013.out
@@ -0,0 +1,5 @@
+Running nvme/013
+91fdba0d-f87b-4c25-b80f-db7be1418b9e
+uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
+NQN:blktests-subsystem-1 disconnected 1 controller(s)
+Test complete
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH V2 11/14] blktests: add NVMeOF flush test for bdev-ns
  2018-06-11  9:15 [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns Chaitanya Kulkarni
                   ` (9 preceding siblings ...)
  2018-06-11  9:15 ` [PATCH V2 10/14] blktests: add NVMeOF mkfs test for file-ns Chaitanya Kulkarni
@ 2018-06-11  9:15 ` 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
                   ` (4 subsequent siblings)
  15 siblings, 1 reply; 38+ messages in thread
From: Chaitanya Kulkarni @ 2018-06-11  9:15 UTC (permalink / raw)


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

diff --git a/tests/nvme/014 b/tests/nvme/014
new file mode 100755
index 0000000..b2490c8
--- /dev/null
+++ b/tests/nvme/014
@@ -0,0 +1,76 @@
+#!/bin/bash
+# Test NVMeOF flush command from host with a block device 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="unit test for NVMe flush for block device backed ns"
+QUICK=1
+
+requires() {
+	_have_program nvme && _have_module nvme-loop && _have_module loop && \
+		 _have_module nvmet && _have_configfs
+}
+
+test() {
+	echo "Running ${TEST_NAME}"
+
+	modprobe nvmet
+	modprobe nvme-loop
+
+	local port
+	local nvmedev
+	local loop_dev
+	local file_path="$TMPDIR/img"
+	local subsys_name="blktests-subsystem-1"
+
+	truncate -s 1G "${file_path}"
+
+	loop_dev="$(losetup -f --show "${file_path}")"
+
+	_create_nvmet_subsystem "${subsys_name}" "${loop_dev}" \
+		 "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"
+
+	dd=/dev/urandom of="/dev/${nvmedev}n1" count=128000 bs=4k
+
+	nvme flush /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}"
+
+	losetup -d "${loop_dev}"
+
+	rm "${file_path}"
+
+	modprobe -r nvme-loop
+	modprobe -r nvmet
+
+	echo "Test complete"
+}
diff --git a/tests/nvme/014.out b/tests/nvme/014.out
new file mode 100755
index 0000000..0285826
--- /dev/null
+++ b/tests/nvme/014.out
@@ -0,0 +1,6 @@
+Running nvme/014
+91fdba0d-f87b-4c25-b80f-db7be1418b9e
+uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
+NVMe Flush: success
+NQN:blktests-subsystem-1 disconnected 1 controller(s)
+Test complete
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH V2 12/14] blktests: add NVMeOF flush test for file-ns
  2018-06-11  9:15 [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns Chaitanya Kulkarni
                   ` (10 preceding siblings ...)
  2018-06-11  9:15 ` [PATCH V2 11/14] blktests: add NVMeOF flush test for bdev-ns Chaitanya Kulkarni
@ 2018-06-11  9:15 ` 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
                   ` (3 subsequent siblings)
  15 siblings, 1 reply; 38+ messages in thread
From: Chaitanya Kulkarni @ 2018-06-11  9:15 UTC (permalink / raw)


Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
---
 tests/nvme/015     | 68 ++++++++++++++++++++++++++++++++++++++++++++++
 tests/nvme/015.out |  6 ++++
 2 files changed, 74 insertions(+)
 create mode 100755 tests/nvme/015
 create mode 100755 tests/nvme/015.out

diff --git a/tests/nvme/015 b/tests/nvme/015
new file mode 100755
index 0000000..5f86d45
--- /dev/null
+++ b/tests/nvme/015
@@ -0,0 +1,68 @@
+#!/bin/bash
+# Test NVMeOF flush command from host with a 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="unit test for NVMe flush for file backed ns"
+QUICK=1
+
+requires() {
+	_have_program nvme && _have_module nvme-loop && _have_module loop && \
+		 _have_configfs
+}
+
+test() {
+	echo "Running ${TEST_NAME}"
+
+	modprobe nvmet
+	modprobe nvme-loop
+
+	local port
+	local nvmedev
+	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"
+
+	dd=/dev/urandom of="/dev/${nvmedev}n1" count=128000 bs=4k
+
+	nvme flush /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}"
+
+	echo "Test complete"
+}
diff --git a/tests/nvme/015.out b/tests/nvme/015.out
new file mode 100755
index 0000000..23763f1
--- /dev/null
+++ b/tests/nvme/015.out
@@ -0,0 +1,6 @@
+Running nvme/015
+91fdba0d-f87b-4c25-b80f-db7be1418b9e
+uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
+NVMe Flush: success
+NQN:blktests-subsystem-1 disconnected 1 controller(s)
+Test complete
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH V2 13/14] blktests: add NVMeOF many bdev-ns creation test
  2018-06-11  9:15 [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns Chaitanya Kulkarni
                   ` (11 preceding siblings ...)
  2018-06-11  9:15 ` [PATCH V2 12/14] blktests: add NVMeOF flush test for file-ns Chaitanya Kulkarni
@ 2018-06-11  9:15 ` Chaitanya Kulkarni
  2018-06-11 11:38   ` Johannes Thumshirn
  2018-06-11  9:15 ` [PATCH V2 14/14] blktests: add NVMeOF many file-ns " Chaitanya Kulkarni
                   ` (2 subsequent siblings)
  15 siblings, 1 reply; 38+ messages in thread
From: Chaitanya Kulkarni @ 2018-06-11  9:15 UTC (permalink / raw)


This patch adds a new testcase to exercise a large number of ns
creation and deletion along with discovery command.

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

diff --git a/tests/nvme/016 b/tests/nvme/016
new file mode 100755
index 0000000..affcfb8
--- /dev/null
+++ b/tests/nvme/016
@@ -0,0 +1,64 @@
+#!/bin/bash
+#
+# Test many target bdev-ns creation/deletion under one subsystem.
+# 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="create/delete many bdev-ns and test discovery"
+
+requires() {
+	_have_program nvme && _have_module nvme-loop && _have_module nvmet \
+		_have_configfs
+}
+
+test() {
+	echo "Running ${TEST_NAME}"
+
+	local port
+	local iterations=1000
+	local loop_dev="$(losetup -f)"
+	local subsys_nqn="blktests-subsystem-1"
+	local subsys_nqn_path="${NVMET_CFS}/subsystems/${subsys_nqn}"
+
+	modprobe nvmet
+	modprobe nvme-loop
+
+	_create_nvmet_subsystem "${subsys_nqn}" "${loop_dev}"
+
+	for ((i = 2; i <= iterations; i++)); do
+		_create_nvmet_ns "${subsys_nqn}" "${i}" "${loop_dev}"
+	done
+
+	port="$(_create_nvmet_port "loop")"
+	_add_nvmet_subsys_to_port "$port" "${subsys_nqn}"
+
+	nvme discover -t loop | sed -r -e "s/portid:  [0-9]+/portid:  X/"
+	_remove_nvmet_subsystem_from_port "${port}" "${subsys_nqn}"
+	_remove_nvmet_port "${port}"
+
+	for ((i = iterations; i > 1; i--)); do
+		_remove_nvmet_ns "${subsys_nqn}" $i
+	done
+
+	_remove_nvmet_subsystem "${subsys_nqn}"
+
+	modprobe -r nvme-loop nvmet
+	echo "Test complete"
+}
diff --git a/tests/nvme/016.out b/tests/nvme/016.out
new file mode 100644
index 0000000..59bd293
--- /dev/null
+++ b/tests/nvme/016.out
@@ -0,0 +1,13 @@
+Running nvme/016
+
+Discovery Log Number of Records 1, Generation counter 1
+=====Discovery Log Entry 0======
+trtype:  loop
+adrfam:  pci
+subtype: nvme subsystem
+treq:    not specified
+portid:  X
+trsvcid: 
+subnqn:  blktests-subsystem-1
+traddr:  
+Test complete
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH V2 14/14] blktests: add NVMeOF many file-ns creation test
  2018-06-11  9:15 [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns Chaitanya Kulkarni
                   ` (12 preceding siblings ...)
  2018-06-11  9:15 ` [PATCH V2 13/14] blktests: add NVMeOF many bdev-ns creation test Chaitanya Kulkarni
@ 2018-06-11  9:15 ` 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
  15 siblings, 0 replies; 38+ messages in thread
From: Chaitanya Kulkarni @ 2018-06-11  9:15 UTC (permalink / raw)


This patch adds a new testcase to exercise a large number of ns
creation and deletion along with discovery command.

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

diff --git a/tests/nvme/017 b/tests/nvme/017
new file mode 100755
index 0000000..ce63aa0
--- /dev/null
+++ b/tests/nvme/017
@@ -0,0 +1,70 @@
+#!/bin/bash
+# Test many target file-ns creation/deletion under one subsystem.
+# 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="create/delete many file-ns and test discovery"
+
+requires() {
+	_have_program nvme && _have_module nvme-loop && _have_module nvmet && \
+		_have_configfs
+}
+
+test() {
+	echo "Running ${TEST_NAME}"
+
+	local port
+	local file_path
+	local subsys_name="blktests-subsystem-1"
+
+	modprobe nvmet
+	modprobe nvme-loop
+
+	file_path="${TMPDIR}/img"
+
+	truncate -s 1G "${file_path}"
+
+	_create_nvmet_subsystem "${subsys_name}" "${file_path}" \
+		"91fdba0d-f87b-4c25-b80f-db7be1418b9e"
+
+	for ((i = 2; i <= iterations; i++)); do
+		_create_nvmet_ns "${subsys_name}" "${i}" "${loop_dev}"
+	done
+
+	port="$(_create_nvmet_port "loop")"
+	_add_nvmet_subsys_to_port "${port}" "${subsys_name}"
+
+	nvme discover -t loop | sed -r -e "s/portid:  [0-9]+/portid:  X/"
+	_remove_nvmet_subsystem_from_port "${port}" "${subsys_name}"
+	_remove_nvmet_port "${port}"
+
+	for ((i = iterations; i > 1; i--)); do
+		_remove_nvmet_ns "${subsys_name}" $i
+	done
+
+	_remove_nvmet_subsystem "${subsys_name}"
+
+	rm "${file_path}"
+
+	modprobe -r nvme-loop
+	modprobe -r nvmet
+
+	echo "Test complete"
+}
diff --git a/tests/nvme/017.out b/tests/nvme/017.out
new file mode 100644
index 0000000..4b0877a
--- /dev/null
+++ b/tests/nvme/017.out
@@ -0,0 +1,13 @@
+Running nvme/017
+
+Discovery Log Number of Records 1, Generation counter 1
+=====Discovery Log Entry 0======
+trtype:  loop
+adrfam:  pci
+subtype: nvme subsystem
+treq:    not specified
+portid:  X
+trsvcid: 
+subnqn:  blktests-subsystem-1
+traddr:  
+Test complete
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH V2 01/14] blktests: common/nvme export ns-mgmt interfaces
  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
  0 siblings, 0 replies; 38+ messages in thread
From: Johannes Thumshirn @ 2018-06-11 11:10 UTC (permalink / raw)


Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 03/14] blktests: add NVMeOF file-ns target creation test
  2018-06-11  9:15 ` [PATCH V2 03/14] blktests: add NVMeOF file-ns " Chaitanya Kulkarni
@ 2018-06-11 11:11   ` Johannes Thumshirn
  0 siblings, 0 replies; 38+ messages in thread
From: Johannes Thumshirn @ 2018-06-11 11:11 UTC (permalink / raw)


Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 04/14] blktests: add NVMeOF bdev-ns host creation
  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
  0 siblings, 0 replies; 38+ messages in thread
From: Johannes Thumshirn @ 2018-06-11 11:12 UTC (permalink / raw)


Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 05/14] blktests: add NVMeOF file-ns host creation
  2018-06-11  9:15 ` [PATCH V2 05/14] blktests: add NVMeOF file-ns " Chaitanya Kulkarni
@ 2018-06-11 11:12   ` Johannes Thumshirn
  0 siblings, 0 replies; 38+ messages in thread
From: Johannes Thumshirn @ 2018-06-11 11:12 UTC (permalink / raw)


Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 06/14] blktests: add fio data verification routine
  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
  1 sibling, 0 replies; 38+ messages in thread
From: Johannes Thumshirn @ 2018-06-11 11:14 UTC (permalink / raw)


Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 07/14] blktests: add NVMeoF data verification test for bdev-ns
  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
  0 siblings, 0 replies; 38+ messages in thread
From: Johannes Thumshirn @ 2018-06-11 11:23 UTC (permalink / raw)


Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 08/14] blktests: add NVMeOF data verification test for file-ns
  2018-06-11  9:15 ` [PATCH V2 08/14] blktests: add NVMeOF data verification test for file-ns Chaitanya Kulkarni
@ 2018-06-11 11:24   ` Johannes Thumshirn
  0 siblings, 0 replies; 38+ messages in thread
From: Johannes Thumshirn @ 2018-06-11 11:24 UTC (permalink / raw)


Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 09/14] blktests: add NVMeOF mkfs test for bdev-ns
  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
  0 siblings, 0 replies; 38+ messages in thread
From: Johannes Thumshirn @ 2018-06-11 11:29 UTC (permalink / raw)


Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 10/14] blktests: add NVMeOF mkfs test for file-ns
  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
  0 siblings, 0 replies; 38+ messages in thread
From: Johannes Thumshirn @ 2018-06-11 11:29 UTC (permalink / raw)


Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 11/14] blktests: add NVMeOF flush test for bdev-ns
  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
  0 siblings, 0 replies; 38+ messages in thread
From: Johannes Thumshirn @ 2018-06-11 11:31 UTC (permalink / raw)


Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 12/14] blktests: add NVMeOF flush test for file-ns
  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
  0 siblings, 0 replies; 38+ messages in thread
From: Johannes Thumshirn @ 2018-06-11 11:31 UTC (permalink / raw)


Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 13/14] blktests: add NVMeOF many bdev-ns creation test
  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
  0 siblings, 1 reply; 38+ messages in thread
From: Johannes Thumshirn @ 2018-06-11 11:38 UTC (permalink / raw)


On Mon, Jun 11, 2018@05:15:53AM -0400, Chaitanya Kulkarni wrote:
> This patch adds a new testcase to exercise a large number of ns
> creation and deletion along with discovery command.

How would we actually detect an error with this test?
All we do is issuing a discovery, this doesn't give us a list of
namespaces.

Maybe add something like 'ls /dev/${nvmedev}n* | wc -l' to verify we
really have $iterations namespaces created?

[...]

> +	_create_nvmet_subsystem "${subsys_nqn}" "${loop_dev}"
> +
> +	for ((i = 2; i <= iterations; i++)); do

Ahm I don't understand why  you start with i = 2 here.

Thanks,
	Johannes
-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns
  2018-06-11  9:15 [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns Chaitanya Kulkarni
                   ` (13 preceding siblings ...)
  2018-06-11  9:15 ` [PATCH V2 14/14] blktests: add NVMeOF many file-ns " Chaitanya Kulkarni
@ 2018-06-11 11:40 ` Johannes Thumshirn
  2018-06-11 22:14 ` Omar Sandoval
  15 siblings, 0 replies; 38+ messages in thread
From: Johannes Thumshirn @ 2018-06-11 11:40 UTC (permalink / raw)


On Mon, Jun 11, 2018@05:15:40AM -0400, Chaitanya Kulkarni wrote:
> Hi,
> 
> This patch series restructures the target side namespace creation code and 
> adds new testcases for NVMeOF loop target (nvme_loop). Also, we add one 
> fio helper for basic data verification, new testcases like basic
> creation/deletion of the host/target, fio based data verification testcases
> for both block device and file backed target namespace and file system
> formatting and data verification from the host side.
> 
> -Regards,
> Chaitanya
> 
> Changes Since V1:-
> 
> 1. Add fio data verification helper.
> 2. Add a new test for many namespaces creation for file-backed ns.
> 3. Minor fixes and cleanups.

Can you please add the already issued Reviewed-by's next time you do a
re-submission?

Thanks,
	Johannes

-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 13/14] blktests: add NVMeOF many bdev-ns creation test
  2018-06-11 11:38   ` Johannes Thumshirn
@ 2018-06-11 17:25     ` Chaitanya Kulkarni
  0 siblings, 0 replies; 38+ messages in thread
From: Chaitanya Kulkarni @ 2018-06-11 17:25 UTC (permalink / raw)








From: Johannes Thumshirn <jthumshirn@suse.de>
Sent: Monday, June 11, 2018 4:38 AM
To: Chaitanya Kulkarni
Cc: linux-nvme at lists.infradead.org; osandov at osandov.com
Subject: Re: [PATCH V2 13/14] blktests: add NVMeOF many bdev-ns creation test
? 
 
On Mon, Jun 11, 2018@05:15:53AM -0400, Chaitanya Kulkarni wrote:
> This patch adds a new testcase to exercise a large number of ns
> creation and deletion along with discovery command.

How would we actually detect an error with this test?
All we do is issuing a discovery, this doesn't give us a list of
namespaces.

[CK] we need to check the changed_ns_list_log/nvme ns-list, I've already posted the nvme-cli implementation of changed ns list,
once that is accepted I can add this here.

Maybe add something like 'ls /dev/${nvmedev}n* | wc -l' to verify we
really have $iterations namespaces created?

[CK] I'd read the log page through NVMe-Cli.

[...]

> +???? _create_nvmet_subsystem "${subsys_nqn}" "${loop_dev}"
> +
> +???? for ((i = 2; i <= iterations; i++)); do

Ahm I don't understand why? you start with i = 2 here.

[CK] This retains the default behavior of creating one ns at the time of subsystem creation which is present in tests/nvme/001-005.

Thanks,
??????? Johannes
-- 
Johannes Thumshirn????????????????????????????????????????? Storage
jthumshirn at suse.de??????????????????????????????? +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
    

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 06/14] blktests: add fio data verification routine
  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
  1 sibling, 1 reply; 38+ messages in thread
From: Omar Sandoval @ 2018-06-11 21:09 UTC (permalink / raw)


On Mon, Jun 11, 2018@05:15:46AM -0400, Chaitanya Kulkarni wrote:
> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
> ---
>  common/fio | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/common/fio b/common/fio
> index e83258d..abe5ee2 100644
> --- a/common/fio
> +++ b/common/fio
> @@ -162,10 +162,17 @@ _fio_perf() {
>  # tests that should run for a specific amount of time.
>  _run_fio() {
>  	local args=("--output=$TMPDIR/fio_perf" "--output-format=terse" "--terse-version=4" "--group_reporting=1")
> +
>  	if [[ -v TIMEOUT ]]; then
>  		args+=("--runtime=$TIMEOUT")
>  	fi
> +
>  	fio "${args[@]}" "$@"
> +
> +	if [ $? -ne 0 ]; then
> +		echo "error fio failed"
> +		cat "$TMPDIR"/fio_perf
> +	fi

I simplified this to

if ! fio "${args[@]}" "$@"; then
	...
fi

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns
  2018-06-11  9:15 [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns Chaitanya Kulkarni
                   ` (14 preceding siblings ...)
  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
  15 siblings, 2 replies; 38+ messages in thread
From: Omar Sandoval @ 2018-06-11 22:14 UTC (permalink / raw)


On Mon, Jun 11, 2018@05:15:40AM -0400, Chaitanya Kulkarni wrote:
> Hi,
> 
> This patch series restructures the target side namespace creation code and 
> adds new testcases for NVMeOF loop target (nvme_loop). Also, we add one 
> fio helper for basic data verification, new testcases like basic
> creation/deletion of the host/target, fio based data verification testcases
> for both block device and file backed target namespace and file system
> formatting and data verification from the host side.
> 
> -Regards,
> Chaitanya
> 
> Changes Since V1:-
> 
> 1. Add fio data verification helper.
> 2. Add a new test for many namespaces creation for file-backed ns.
> 3. Minor fixes and cleanups.

Hey, Chaitanya,

I had to change TMPDIR to use the blktests repository instead of /tmp to
get the file-backed ones to pass. I also changed the descriptions to
read as "this test will..." for consistency with the other tests, and
added TIMED=1 to the data verification tests.

The flush tests fail for me, and Johannes still has some comments on the
last two, so I applied patches 1-10. The flush tests fail like this:

nvme/014 (flush a NVMeOF block device-backed ns)             [failed]
runtime  0.788s  ...  0.803s
    --- tests/nvme/014.out      2018-06-11 15:01:41.449896278 -0700
    +++ results/nodev/nvme/014.out.bad  2018-06-11 15:07:31.425480955 -0700
    @@ -1,6 +1,6 @@
     Running nvme/014
     91fdba0d-f87b-4c25-b80f-db7be1418b9e
     uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
    -NVMe Flush: success
    +NVME IO command error:INVALID_NS(400b)
     NQN:blktests-subsystem-1 disconnected 1 controller(s)
     Test complete

Any idea what that is?

Thanks for the tests!

> Chaitanya Kulkarni (14):
>   blktests: common/nvme export ns-mgmt interfaces
>   blktests: add NVMeOF bdev-ns target creation test
>   blktests: add NVMeOF file-ns target creation test
>   blktests: add NVMeOF bdev-ns host creation
>   blktests: add NVMeOF file-ns host creation
>   blktests: add fio data verification routine
>   blktests: add NVMeoF data verification test for bdev-ns
>   blktests: add NVMeOF data verification test for file-ns
>   blktests: add NVMeOF mkfs test for bdev-ns
>   blktests: add NVMeOF mkfs test for file-ns
>   blktests: add NVMeOF flush test for bdev-ns
>   blktests: add NVMeOF flush test for file-ns
>   blktests: add NVMeOF many bdev-ns creation test
>   blktests: add NVMeOF many file-ns creation test

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns
  2018-06-11 22:14 ` Omar Sandoval
@ 2018-06-11 23:14   ` Chaitanya Kulkarni
  2018-06-13  0:00   ` Chaitanya Kulkarni
  1 sibling, 0 replies; 38+ messages in thread
From: Chaitanya Kulkarni @ 2018-06-11 23:14 UTC (permalink / raw)


Hi Omar,

From: Omar Sandoval <osandov@osandov.com>
Sent: Monday, June 11, 2018 3:14 PM
To: Chaitanya Kulkarni
Cc: linux-nvme at lists.infradead.org; jthumshirn at suse.de
Subject: Re: [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns
? 
 
On Mon, Jun 11, 2018@05:15:40AM -0400, Chaitanya Kulkarni wrote:
> Hi,
> 
> This patch series restructures the target side namespace creation code and 
> adds new testcases for NVMeOF loop target (nvme_loop). Also, we add one 
> fio helper for basic data verification, new testcases like basic
> creation/deletion of the host/target, fio based data verification testcases
> for both block device and file backed target namespace and file system
> formatting and data verification from the host side.
> 
> -Regards,
> Chaitanya
> 
> Changes Since V1:-
> 
> 1. Add fio data verification helper.
> 2. Add a new test for many namespaces creation for file-backed ns.
> 3. Minor fixes and cleanups.

Hey, Chaitanya,

I had to change TMPDIR to use the blktests repository instead of /tmp to
get the file-backed ones to pass. I also changed the descriptions to
read as "this test will..." for consistency with the other tests, and
added TIMED=1 to the data verification tests.

[CK] Sounds good and thanks.

The flush tests fail for me, and Johannes still has some comments on the
last two, so I applied patches 1-10. The flush tests fail like this:

nvme/014 (flush a NVMeOF block device-backed ns)???????????? [failed]
runtime? 0.788s? ...? 0.803s
??? --- tests/nvme/014.out????? 2018-06-11 15:01:41.449896278 -0700
??? +++ results/nodev/nvme/014.out.bad? 2018-06-11 15:07:31.425480955 -0700
??? @@ -1,6 +1,6 @@
???? Running nvme/014
???? 91fdba0d-f87b-4c25-b80f-db7be1418b9e
???? uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
??? -NVMe Flush: success
??? +NVME IO command error:INVALID_NS(400b)
???? NQN:blktests-subsystem-1 disconnected 1 controller(s)
???? Test complete

Any idea what that is?

[CK] I ran the all the tests didn't see that error:-

# for i in 006 007 008 009 010 011 012 013 014 015 016 017; do ./check tests/nvme/$i; done 
nvme/006 (unit tests for creating target with a block device ns) [passed]
    runtime  0.363s  ...  0.289s
nvme/007 (unit tests for creating target with a file backed ns) [passed]
    runtime  0.298s  ...  0.226s
nvme/008 (unit test for creating a host with one block device backed ns) [passed]
    runtime  0.667s  ...  0.552s
nvme/009 (unit test for creating a host with one file backed ns) [passed]
    runtime  0.605s  ...  0.510s
nvme/010 (data verification test for block device backed ns) [passed]
    runtime  42.825s  ...  41.327s
nvme/011 (data verification test for file backed ns)         [passed]
    runtime  274.323s  ...  201.583s
nvme/012 (test mkfs with data verification for block device backed ns) [passed]
    runtime  277.448s  ...  279.184s
nvme/013 (test mkfs with data verification for file backed ns) [passed]
    runtime  226.276s  ...  239.203s
nvme/014 (unit test for NVMe flush for block device backed ns) [passed]
    runtime  0.736s  ...  0.566s
nvme/015 (unit test for NVMe flush for file backed ns)       [passed]
    runtime  0.501s  ...  0.507s
nvme/016 (create/delete many bdev-ns and test discovery)     [passed]
    runtime  28.271s  ...  27.361s
nvme/017 (create/delete many file-ns and test discovery)     [passed]
    runtime  0.285s  ...  0.302s

I suspect it may be backend file creation issue when configuring the target side namespace, but not entirely sure.


Thanks for the tests!

> Chaitanya Kulkarni (14):
>?? blktests: common/nvme export ns-mgmt interfaces
>?? blktests: add NVMeOF bdev-ns target creation test
>?? blktests: add NVMeOF file-ns target creation test
>?? blktests: add NVMeOF bdev-ns host creation
>?? blktests: add NVMeOF file-ns host creation
>?? blktests: add fio data verification routine
>?? blktests: add NVMeoF data verification test for bdev-ns
>?? blktests: add NVMeOF data verification test for file-ns
>?? blktests: add NVMeOF mkfs test for bdev-ns
>?? blktests: add NVMeOF mkfs test for file-ns
>?? blktests: add NVMeOF flush test for bdev-ns
>?? blktests: add NVMeOF flush test for file-ns
>?? blktests: add NVMeOF many bdev-ns creation test
>?? blktests: add NVMeOF many file-ns creation test
    

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 06/14] blktests: add fio data verification routine
  2018-06-11 21:09   ` Omar Sandoval
@ 2018-06-12  4:40     ` Chaitanya Kulkarni
  0 siblings, 0 replies; 38+ messages in thread
From: Chaitanya Kulkarni @ 2018-06-12  4:40 UTC (permalink / raw)




[CK] Fine with me.


From: Omar Sandoval <osandov@osandov.com>
Sent: Monday, June 11, 2018 2:09 PM
To: Chaitanya Kulkarni
Cc: linux-nvme at lists.infradead.org; jthumshirn at suse.de
Subject: Re: [PATCH V2 06/14] blktests: add fio data verification routine
? 
 
On Mon, Jun 11, 2018@05:15:46AM -0400, Chaitanya Kulkarni wrote:
> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
> ---
>? common/fio | 12 ++++++++++++
>? 1 file changed, 12 insertions(+)
> 
> diff --git a/common/fio b/common/fio
> index e83258d..abe5ee2 100644
> --- a/common/fio
> +++ b/common/fio
> @@ -162,10 +162,17 @@ _fio_perf() {
>? # tests that should run for a specific amount of time.
>? _run_fio() {
>??????? local args=("--output=$TMPDIR/fio_perf" "--output-format=terse" "--terse-version=4" "--group_reporting=1")
> +
>??????? if [[ -v TIMEOUT ]]; then
>??????????????? args+=("--runtime=$TIMEOUT")
>??????? fi
> +
>??????? fio "${args[@]}" "$@"
> +
> +???? if [ $? -ne 0 ]; then
> +???????????? echo "error fio failed"
> +???????????? cat "$TMPDIR"/fio_perf
> +???? fi

I simplified this to

if ! fio "${args[@]}" "$@"; then
??????? ...
fi
    

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns
  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
  1 sibling, 1 reply; 38+ messages in thread
From: Chaitanya Kulkarni @ 2018-06-13  0:00 UTC (permalink / raw)








From: Omar Sandoval <osandov@osandov.com>
Sent: Monday, June 11, 2018 3:14 PM
To: Chaitanya Kulkarni
Cc: linux-nvme at lists.infradead.org; jthumshirn at suse.de
Subject: Re: [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns
? 
 
On Mon, Jun 11, 2018@05:15:40AM -0400, Chaitanya Kulkarni wrote:
> Hi,
> 
> This patch series restructures the target side namespace creation code and 
> adds new testcases for NVMeOF loop target (nvme_loop). Also, we add one 
> fio helper for basic data verification, new testcases like basic
> creation/deletion of the host/target, fio based data verification testcases
> for both block device and file backed target namespace and file system
> formatting and data verification from the host side.
> 
> -Regards,
> Chaitanya
> 
> Changes Since V1:-
> 
> 1. Add fio data verification helper.
> 2. Add a new test for many namespaces creation for file-backed ns.
> 3. Minor fixes and cleanups.

Hey, Chaitanya,

I had to change TMPDIR to use the blktests repository instead of /tmp to
get the file-backed ones to pass. I also changed the descriptions to
read as "this test will..." for consistency with the other tests, and
added TIMED=1 to the data verification tests.

The flush tests fail for me, and Johannes still has some comments on the
last two, so I applied patches 1-10. The flush tests fail like this:

[CK] Johannes, can we get the remaining testcases in?

nvme/014 (flush a NVMeOF block device-backed ns)???????????? [failed]
runtime? 0.788s? ...? 0.803s
??? --- tests/nvme/014.out????? 2018-06-11 15:01:41.449896278 -0700
??? +++ results/nodev/nvme/014.out.bad? 2018-06-11 15:07:31.425480955 -0700
??? @@ -1,6 +1,6 @@
???? Running nvme/014
???? 91fdba0d-f87b-4c25-b80f-db7be1418b9e
???? uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
??? -NVMe Flush: success
??? +NVME IO command error:INVALID_NS(400b)
???? NQN:blktests-subsystem-1 disconnected 1 controller(s)
???? Test complete

Any idea what that is?

Thanks for the tests!

> Chaitanya Kulkarni (14):
>?? blktests: common/nvme export ns-mgmt interfaces
>?? blktests: add NVMeOF bdev-ns target creation test
>?? blktests: add NVMeOF file-ns target creation test
>?? blktests: add NVMeOF bdev-ns host creation
>?? blktests: add NVMeOF file-ns host creation
>?? blktests: add fio data verification routine
>?? blktests: add NVMeoF data verification test for bdev-ns
>?? blktests: add NVMeOF data verification test for file-ns
>?? blktests: add NVMeOF mkfs test for bdev-ns
>?? blktests: add NVMeOF mkfs test for file-ns
>?? blktests: add NVMeOF flush test for bdev-ns
>?? blktests: add NVMeOF flush test for file-ns
>?? blktests: add NVMeOF many bdev-ns creation test
>?? blktests: add NVMeOF many file-ns creation test
    

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns
  2018-06-13  0:00   ` Chaitanya Kulkarni
@ 2018-06-13  7:21     ` Johannes Thumshirn
       [not found]       ` <BN6PR04MB120367ABC523F7DDEC83C35A867E0@BN6PR04MB1203.namprd04.prod.outlook.com>
  0 siblings, 1 reply; 38+ messages in thread
From: Johannes Thumshirn @ 2018-06-13  7:21 UTC (permalink / raw)


On Wed, Jun 13, 2018@12:00:17AM +0000, Chaitanya Kulkarni wrote:
> The flush tests fail for me, and Johannes still has some comments on the
> last two, so I applied patches 1-10. The flush tests fail like this:
> 
> [CK] Johannes, can we get the remaining testcases in?

Well I guess we can fix it later.

     Johannes
-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns
       [not found]       ` <BN6PR04MB120367ABC523F7DDEC83C35A867E0@BN6PR04MB1203.namprd04.prod.outlook.com>
@ 2018-06-25 19:04         ` Omar Sandoval
  2018-06-25 19:06           ` Omar Sandoval
  0 siblings, 1 reply; 38+ messages in thread
From: Omar Sandoval @ 2018-06-25 19:04 UTC (permalink / raw)


On Wed, Jun 13, 2018@08:18:03AM +0000, Chaitanya Kulkarni wrote:
> Thanks, Johannes for the review comments.
> 
> 
> Omar, let me know if you find any issues, otherwise, we can merge this series.

I was able to fix the flush tests by replacing

nvme flush /dev/"${nvmedev}n1"

With

nvme flush /dev/"${nvmedev}" -n 1

(Going off of https://github.com/linux-nvme/nvme-cli/issues/174). Does
that seem sane?

The last two tests sometimes fail like this:

nvme/016 (create/delete many NVMeOF block device-backed ns and test discovery) [failed]
runtime     ...  44.535s
    --- tests/nvme/016.out      2018-06-25 11:56:39.176313626 -0700
    +++ results/nodev/nvme/016.out.bad  2018-06-25 11:59:30.153990955 -0700
    @@ -1,6 +1,6 @@
     Running nvme/016

    -Discovery Log Number of Records 1, Generation counter 1
    +Discovery Log Number of Records 1, Generation counter 3
     =====Discovery Log Entry 0======
     trtype:  loop
     adrfam:  pci

I don't know enough about NVMe to know how important this is, but it
looks like this needs some sort of filter :)

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns
  2018-06-25 19:04         ` Omar Sandoval
@ 2018-06-25 19:06           ` Omar Sandoval
  2018-06-25 19:16             ` Chaitanya Kulkarni
  0 siblings, 1 reply; 38+ messages in thread
From: Omar Sandoval @ 2018-06-25 19:06 UTC (permalink / raw)


On Mon, Jun 25, 2018@12:04:29PM -0700, Omar Sandoval wrote:
> On Wed, Jun 13, 2018@08:18:03AM +0000, Chaitanya Kulkarni wrote:
> > Thanks, Johannes for the review comments.
> > 
> > 
> > Omar, let me know if you find any issues, otherwise, we can merge this series.
> 
> I was able to fix the flush tests by replacing
> 
> nvme flush /dev/"${nvmedev}n1"
> 
> With
> 
> nvme flush /dev/"${nvmedev}" -n 1
> 
> (Going off of https://github.com/linux-nvme/nvme-cli/issues/174). Does
> that seem sane?
> 
> The last two tests sometimes fail like this:
> 
> nvme/016 (create/delete many NVMeOF block device-backed ns and test discovery) [failed]
> runtime     ...  44.535s
>     --- tests/nvme/016.out      2018-06-25 11:56:39.176313626 -0700
>     +++ results/nodev/nvme/016.out.bad  2018-06-25 11:59:30.153990955 -0700
>     @@ -1,6 +1,6 @@
>      Running nvme/016
> 
>     -Discovery Log Number of Records 1, Generation counter 1
>     +Discovery Log Number of Records 1, Generation counter 3
>      =====Discovery Log Entry 0======
>      trtype:  loop
>      adrfam:  pci
> 
> I don't know enough about NVMe to know how important this is, but it
> looks like this needs some sort of filter :)

Actually, the last test is just broken. It uses loop_dev which isn't
defined. Please fix that, too :)

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns
  2018-06-25 19:06           ` Omar Sandoval
@ 2018-06-25 19:16             ` Chaitanya Kulkarni
  0 siblings, 0 replies; 38+ messages in thread
From: Chaitanya Kulkarni @ 2018-06-25 19:16 UTC (permalink / raw)








From: Omar Sandoval <osandov@osandov.com>
Sent: Monday, June 25, 2018 12:06 PM
To: Chaitanya Kulkarni
Cc: Johannes Thumshirn; linux-nvme at lists.infradead.org
Subject: Re: [PATCH V2 00/14] blktests: NVMeOF new testcases for file and bdev ns
? 
 
On Mon, Jun 25, 2018@12:04:29PM -0700, Omar Sandoval wrote:
> On Wed, Jun 13, 2018@08:18:03AM +0000, Chaitanya Kulkarni wrote:
> > Thanks, Johannes for the review comments.
> > 
> > 
> > Omar, let me know if you find any issues, otherwise, we can merge this series.
> 
> I was able to fix the flush tests by replacing
> 
> nvme flush /dev/"${nvmedev}n1"
> 
> With
> 
> nvme flush /dev/"${nvmedev}" -n 1
> 
> (Going off of https://github.com/linux-nvme/nvme-cli/issues/174). Does
> that seem sane?
> 
> The last two tests sometimes fail like this:
> 
> nvme/016 (create/delete many NVMeOF block device-backed ns and test discovery) [failed]
> runtime???? ...? 44.535s
>???? --- tests/nvme/016.out????? 2018-06-25 11:56:39.176313626 -0700
>???? +++ results/nodev/nvme/016.out.bad? 2018-06-25 11:59:30.153990955 -0700
>???? @@ -1,6 +1,6 @@
>????? Running nvme/016
> 
>???? -Discovery Log Number of Records 1, Generation counter 1
>???? +Discovery Log Number of Records 1, Generation counter 3
>????? =====Discovery Log Entry 0======
>????? trtype:? loop
>????? adrfam:? pci
> 
> I don't know enough about NVMe to know how important this is, but it
> looks like this needs some sort of filter :)

[CK] Generation counter needs to be 1, when I ran the tests I did not see any issue,
let me see if you I can reproduce it and fix the problem.

Actually, the last test is just broken. It uses loop_dev which isn't
defined. Please fix that, too :)

[CK] Thanks for reporting, I'll just send 017 with the fix and if I find generation counter issue,
will resend both 016 and 017. 
    

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2018-06-25 19:16 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH V2 08/14] blktests: add NVMeOF data verification test for file-ns Chaitanya Kulkarni
2018-06-11 11:24   ` 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

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.