@@ -2,11 +2,11 @@
# SPDX-License-Identifier: GPL-2.0+
# Copyright (c) 2017-2018 Western Digital Corporation or its affiliates.
#
-# Test NVMeOF target creation with a block device backed ns.
+# Test NVMeOF target creation.
. tests/nvme/rc
-DESCRIPTION="create an NVMeOF target with a block device-backed ns"
+DESCRIPTION="create an NVMeOF target"
QUICK=1
requires() {
@@ -20,7 +20,6 @@ test() {
_setup_nvmet
-
_nvmet_target_setup
_nvmet_target_cleanup
deleted file mode 100755
@@ -1,28 +0,0 @@
-#!/bin/bash
-# SPDX-License-Identifier: GPL-2.0+
-# Copyright (c) 2017-2018 Western Digital Corporation or its affiliates.
-#
-# Test NVMeOF target creation with a file backed ns.
-
-. tests/nvme/rc
-
-DESCRIPTION="create an NVMeOF target with a file-backed ns"
-QUICK=1
-
-requires() {
- _nvme_requires
- _require_nvme_trtype_is_fabrics
-}
-
-test() {
- echo "Running ${TEST_NAME}"
-
- _setup_nvmet
-
-
- _nvmet_target_setup --blkdev file
-
- _nvmet_target_cleanup
-
- echo "Test complete"
-}
deleted file mode 100644
@@ -1,2 +0,0 @@
-Running nvme/007
-Test complete
@@ -2,11 +2,11 @@
# SPDX-License-Identifier: GPL-2.0+
# Copyright (c) 2017-2018 Western Digital Corporation or its affiliates.
#
-# Test NVMeOF host creation with a block device backed ns.
+# Test NVMeOF host creation.
. tests/nvme/rc
-DESCRIPTION="create an NVMeOF host with a block device-backed ns"
+DESCRIPTION="create an NVMeOF host"
QUICK=1
requires() {
deleted file mode 100755
@@ -1,36 +0,0 @@
-#!/bin/bash
-# SPDX-License-Identifier: GPL-2.0+
-# Copyright (c) 2017-2018 Western Digital Corporation or its affiliates.
-#
-# Test NVMeOF host creation with a file backed ns.
-
-. tests/nvme/rc
-
-DESCRIPTION="create an NVMeOF host with a file-backed ns"
-QUICK=1
-
-requires() {
- _nvme_requires
- _require_nvme_trtype_is_fabrics
-}
-
-test() {
- echo "Running ${TEST_NAME}"
-
- _setup_nvmet
-
- local nvmedev
-
- _nvmet_target_setup --blkdev file
-
- _nvme_connect_subsys
-
- nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
- _check_uuid "${nvmedev}"
-
- _nvme_disconnect_subsys
-
- _nvmet_target_cleanup
-
- echo "Test complete"
-}
deleted file mode 100644
@@ -1,3 +0,0 @@
-Running nvme/009
-disconnected 1 controller(s)
-Test complete
@@ -2,11 +2,11 @@
# SPDX-License-Identifier: GPL-2.0+
# Copyright (c) 2017-2018 Western Digital Corporation or its affiliates.
#
-# This is a data verification test for block device backed ns.
+# This is a data verification test.
. tests/nvme/rc
-DESCRIPTION="run data verification fio job on NVMeOF block device-backed ns"
+DESCRIPTION="run data verification fio job"
TIMED=1
requires() {
deleted file mode 100755
@@ -1,39 +0,0 @@
-#!/bin/bash
-# SPDX-License-Identifier: GPL-2.0+
-# Copyright (c) 2017-2018 Western Digital Corporation or its affiliates.
-#
-# This is a data verification test for file backed ns.
-
-. tests/nvme/rc
-
-DESCRIPTION="run data verification fio job on NVMeOF file-backed ns"
-TIMED=1
-
-requires() {
- _nvme_requires
- _have_fio
- _require_nvme_trtype_is_fabrics
-}
-
-test() {
- echo "Running ${TEST_NAME}"
-
- _setup_nvmet
-
- local ns
-
- _nvmet_target_setup --blkdev file
-
- _nvme_connect_subsys
-
- ns=$(_find_nvme_ns "${def_subsys_uuid}")
-
- _run_fio_verify_io --size="${nvme_img_size}" \
- --filename="$/dev/{ns}"
-
- _nvme_disconnect_subsys
-
- _nvmet_target_cleanup
-
- echo "Test complete"
-}
deleted file mode 100644
@@ -1,3 +0,0 @@
-Running nvme/011
-disconnected 1 controller(s)
-Test complete
@@ -2,12 +2,12 @@
# SPDX-License-Identifier: GPL-2.0+
# Copyright (c) 2017-2018 Western Digital Corporation or its affiliates.
#
-# Test mkfs with data verification for block device backed ns.
+# Test mkfs with data verification.
. tests/nvme/rc
. common/xfs
-DESCRIPTION="run mkfs and data verification fio job on NVMeOF block device-backed ns"
+DESCRIPTION="run mkfs and data verification fio"
TIMED=1
requires() {
deleted file mode 100755
@@ -1,43 +0,0 @@
-#!/bin/bash
-# SPDX-License-Identifier: GPL-2.0+
-# Copyright (c) 2017-2018 Western Digital Corporation or its affiliates.
-#
-# Test mkfs with data verification for file backed ns.
-
-. tests/nvme/rc
-. common/xfs
-
-DESCRIPTION="run mkfs and data verification fio job on NVMeOF file-backed ns"
-TIMED=1
-
-requires() {
- _nvme_requires
- _have_xfs
- _have_fio
- _require_nvme_trtype_is_fabrics
- _require_nvme_test_img_size 350m
-}
-
-test() {
- echo "Running ${TEST_NAME}"
-
- _setup_nvmet
-
- local ns
-
- _nvmet_target_setup --blkdev file
-
- _nvme_connect_subsys
-
- ns=$(_find_nvme_ns "${def_subsys_uuid}")
-
- if ! _xfs_run_fio_verify_io "$/dev/{ns}"; then
- echo "FAIL: fio verify failed"
- fi
-
- _nvme_disconnect_subsys
-
- _nvmet_target_cleanup
-
- echo "Test complete"
-}
deleted file mode 100644
@@ -1,3 +0,0 @@
-Running nvme/013
-disconnected 1 controller(s)
-Test complete
@@ -2,11 +2,11 @@
# SPDX-License-Identifier: GPL-2.0+
# Copyright (c) 2017-2018 Western Digital Corporation or its affiliates.
#
-# Test NVMeOF flush command from host with a block device backed ns.
+# Test NVMeOF flush command from host.
. tests/nvme/rc
-DESCRIPTION="flush a NVMeOF block device-backed ns"
+DESCRIPTION="flush a command from host"
QUICK=1
requires() {
deleted file mode 100755
@@ -1,48 +0,0 @@
-#!/bin/bash
-# SPDX-License-Identifier: GPL-2.0+
-# Copyright (c) 2017-2018 Western Digital Corporation or its affiliates.
-#
-# Test NVMeOF flush command from host with a file backed ns.
-
-. tests/nvme/rc
-
-DESCRIPTION="unit test for NVMe flush for file backed ns"
-QUICK=1
-
-requires() {
- _nvme_requires
- _have_loop
- _require_nvme_trtype_is_fabrics
-}
-
-test() {
- echo "Running ${TEST_NAME}"
-
- _setup_nvmet
-
- local ns
- local size
- local bs
- local count
-
- _nvmet_target_setup --blkdev file
-
- _nvme_connect_subsys
-
- ns=$(_find_nvme_ns "${def_subsys_uuid}")
-
- size="$(blockdev --getsize64 "/dev/${ns}")"
- bs="$(blockdev --getbsz "/dev/${ns}")"
- count=$((size / bs))
-
- dd if=/dev/urandom of="/dev/${ns}" \
- count="${count}" bs="${bs}" status=none
-
- nvme flush "/dev/${ns}"
-
- _nvme_disconnect_subsys
-
- _nvmet_target_cleanup
-
- echo "Test complete"
-}
deleted file mode 100644
@@ -1,4 +0,0 @@
-Running nvme/015
-NVMe Flush: success
-disconnected 1 controller(s)
-Test complete
@@ -2,11 +2,11 @@
# SPDX-License-Identifier: GPL-2.0+
# Copyright (c) 2017-2018 Western Digital Corporation or its affiliates.
#
-# Test NVMe DSM Discard command on NVMeOF with a block-device ns.
+# Test NVMe DSM Discard command.
. tests/nvme/rc
-DESCRIPTION="test NVMe DSM Discard command on NVMeOF block-device ns"
+DESCRIPTION="test NVMe DSM Discard command"
QUICK=1
requires() {
deleted file mode 100755
@@ -1,40 +0,0 @@
-#!/bin/bash
-# SPDX-License-Identifier: GPL-2.0+
-# Copyright (c) 2017-2018 Western Digital Corporation or its affiliates.
-#
-# Test NVMe DSM Discard command on NVMeOF with a file-backed ns.
-
-. tests/nvme/rc
-
-DESCRIPTION="test NVMe DSM Discard command on NVMeOF file-backed ns"
-QUICK=1
-
-requires() {
- _nvme_requires
- _require_nvme_trtype_is_fabrics
-}
-
-test() {
- echo "Running ${TEST_NAME}"
-
- _setup_nvmet
-
- local ns
- local nblk_range="10,10,10,10,10,10,10,10,10,10"
- local sblk_range="100,200,300,400,500,600,700,800,900,1000"
-
- _nvmet_target_setup --blkdev file
-
- _nvme_connect_subsys
-
- ns=$(_find_nvme_ns "${def_subsys_uuid}")
-
- nvme dsm "/dev/${ns}" --ad \
- --slbs "${sblk_range}" --blocks "${nblk_range}"
-
- _nvme_disconnect_subsys
-
- _nvmet_target_cleanup
-
- echo "Test complete"
-}
deleted file mode 100644
@@ -1,4 +0,0 @@
-Running nvme/020
-NVMe DSM: success
-disconnected 1 controller(s)
-Test complete
@@ -2,11 +2,11 @@
# SPDX-License-Identifier: GPL-2.0+
# Copyright (c) 2017-2018 Western Digital Corporation or its affiliates.
#
-# Test NVMe smart-log command on NVMeOF with a block-device ns.
+# Test NVMe smart-log command.
. tests/nvme/rc
-DESCRIPTION="test NVMe smart-log command on NVMeOF block-device ns"
+DESCRIPTION="test NVMe smart-log command"
QUICK=1
requires() {
deleted file mode 100755
@@ -1,40 +0,0 @@
-#!/bin/bash
-# SPDX-License-Identifier: GPL-2.0+
-# Copyright (c) 2017-2018 Western Digital Corporation or its affiliates.
-#
-# Test NVMe smart-log command on NVMeOF with a file-backed ns.
-
-. tests/nvme/rc
-
-DESCRIPTION="test NVMe smart-log command on NVMeOF file-backed ns"
-QUICK=1
-
-requires() {
- _nvme_requires
- _have_loop
- _require_nvme_trtype_is_fabrics
-}
-
-test() {
- echo "Running ${TEST_NAME}"
-
- _setup_nvmet
-
- local ns
-
- _nvmet_target_setup --blkdev file
-
- _nvme_connect_subsys
-
- ns=$(_find_nvme_ns ${def_subsys_uuid})
-
- if ! nvme smart-log "/dev/${ns}" >> "$FULL" 2>&1; then
- echo "ERROR: smart-log file-ns failed"
- fi
-
- _nvme_disconnect_subsys >> "$FULL" 2>&1
-
- _nvmet_target_cleanup
-
- echo "Test complete"
-}
deleted file mode 100644
@@ -1,2 +0,0 @@
-Running nvme/024
-Test complete
There are various tests which only differ on the blkdev type of the target. With the newly added feature which allows to control the target blkdev type via the environment, these duplicate tests are not necessary anymore and reduces the maintenance overhead. Signed-off-by: Daniel Wagner <dwagner@suse.de> --- tests/nvme/006 | 5 ++--- tests/nvme/007 | 28 --------------------------- tests/nvme/007.out | 2 -- tests/nvme/008 | 4 ++-- tests/nvme/009 | 36 ---------------------------------- tests/nvme/009.out | 3 --- tests/nvme/010 | 4 ++-- tests/nvme/011 | 39 ------------------------------------- tests/nvme/011.out | 3 --- tests/nvme/012 | 4 ++-- tests/nvme/013 | 43 ----------------------------------------- tests/nvme/013.out | 3 --- tests/nvme/014 | 4 ++-- tests/nvme/015 | 48 ---------------------------------------------- tests/nvme/015.out | 4 ---- tests/nvme/019 | 4 ++-- tests/nvme/020 | 40 -------------------------------------- tests/nvme/020.out | 4 ---- tests/nvme/023 | 4 ++-- tests/nvme/024 | 40 -------------------------------------- tests/nvme/024.out | 2 -- 21 files changed, 14 insertions(+), 310 deletions(-) delete mode 100755 tests/nvme/007 delete mode 100644 tests/nvme/007.out delete mode 100755 tests/nvme/009 delete mode 100644 tests/nvme/009.out delete mode 100755 tests/nvme/011 delete mode 100644 tests/nvme/011.out delete mode 100755 tests/nvme/013 delete mode 100644 tests/nvme/013.out delete mode 100755 tests/nvme/015 delete mode 100644 tests/nvme/015.out delete mode 100755 tests/nvme/020 delete mode 100644 tests/nvme/020.out delete mode 100755 tests/nvme/024 delete mode 100644 tests/nvme/024.out