]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
nvme/{007,009,011,013,015,020,024}: drop duplicate nvmet blkdev type tests
authorDaniel Wagner <dwagner@suse.de>
Sat, 4 May 2024 08:14:44 +0000 (17:14 +0900)
committerShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Thu, 9 May 2024 07:37:06 +0000 (16:37 +0900)
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.

The removed tests are covered by the other test cases nvme/006 ,008,
010, 012, 014, 019 and 023 using 'file' blkdev type.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Acked-by: Nitesh Shetty <nj.shetty@samsung.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
21 files changed:
tests/nvme/006
tests/nvme/007 [deleted file]
tests/nvme/007.out [deleted file]
tests/nvme/008
tests/nvme/009 [deleted file]
tests/nvme/009.out [deleted file]
tests/nvme/010
tests/nvme/011 [deleted file]
tests/nvme/011.out [deleted file]
tests/nvme/012
tests/nvme/013 [deleted file]
tests/nvme/013.out [deleted file]
tests/nvme/014
tests/nvme/015 [deleted file]
tests/nvme/015.out [deleted file]
tests/nvme/019
tests/nvme/020 [deleted file]
tests/nvme/020.out [deleted file]
tests/nvme/023
tests/nvme/024 [deleted file]
tests/nvme/024.out [deleted file]

index 3f9d209deeca2386915ed25d86e4869452257635..2b5b2e6063b6f880ddee8d99b575af5aa94878c0 100755 (executable)
@@ -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() {
diff --git a/tests/nvme/007 b/tests/nvme/007
deleted file mode 100755 (executable)
index cb2637e..0000000
+++ /dev/null
@@ -1,31 +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
-}
-
-set_conditions() {
-       _set_nvme_trtype "$@"
-}
-
-test() {
-       echo "Running ${TEST_NAME}"
-
-       _setup_nvmet
-
-       _nvmet_target_setup --blkdev file
-
-       _nvmet_target_cleanup
-
-       echo "Test complete"
-}
diff --git a/tests/nvme/007.out b/tests/nvme/007.out
deleted file mode 100644 (file)
index fdb3472..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Running nvme/007
-Test complete
index 247850c2609e44ef1b64c48e014d74d5ebb99d8e..702c57672bd59d14d08c621c2b28f6dae5d15edd 100755 (executable)
@@ -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() {
diff --git a/tests/nvme/009 b/tests/nvme/009
deleted file mode 100755 (executable)
index d7b1307..0000000
+++ /dev/null
@@ -1,40 +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
-}
-
-set_conditions() {
-       _set_nvme_trtype "$@"
-}
-
-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"
-}
diff --git a/tests/nvme/009.out b/tests/nvme/009.out
deleted file mode 100644 (file)
index 4d53a8e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Running nvme/009
-disconnected 1 controller(s)
-Test complete
index c16587fc121d08eb4bed51edae3b1d8326a30c72..524203dcab77bd9c92922167345f393c9ad42e36 100755 (executable)
@@ -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() {
diff --git a/tests/nvme/011 b/tests/nvme/011
deleted file mode 100755 (executable)
index bd29129..0000000
+++ /dev/null
@@ -1,43 +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
-}
-
-set_conditions() {
-       _set_nvme_trtype "$@"
-}
-
-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"
-}
diff --git a/tests/nvme/011.out b/tests/nvme/011.out
deleted file mode 100644 (file)
index ebbb4f7..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Running nvme/011
-disconnected 1 controller(s)
-Test complete
index e6674e26bd8871aa8ee1c937696d26319a9c30c5..f9bbdca911c04bd5ed8685a0c24cf88a520be7c9 100755 (executable)
@@ -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() {
diff --git a/tests/nvme/013 b/tests/nvme/013
deleted file mode 100755 (executable)
index 91da498..0000000
+++ /dev/null
@@ -1,47 +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
-}
-
-set_conditions() {
-       _set_nvme_trtype "$@"
-}
-
-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"
-}
diff --git a/tests/nvme/013.out b/tests/nvme/013.out
deleted file mode 100644 (file)
index a727170..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Running nvme/013
-disconnected 1 controller(s)
-Test complete
index 571c6f47b29385342f979e629660e659a887168d..48d7408c7f7bdcd8f5cfa20e985dc63ab132311f 100755 (executable)
@@ -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() {
diff --git a/tests/nvme/015 b/tests/nvme/015
deleted file mode 100755 (executable)
index b5ec10c..0000000
+++ /dev/null
@@ -1,52 +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
-}
-
-set_conditions() {
-       _set_nvme_trtype "$@"
-}
-
-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"
-}
diff --git a/tests/nvme/015.out b/tests/nvme/015.out
deleted file mode 100644 (file)
index f854f0b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-Running nvme/015
-NVMe Flush: success
-disconnected 1 controller(s)
-Test complete
index 501256c21f45c0b0c536d911ef1a95d677b79edf..9eff03d227ec41847f39bac5e35c64c99b9e2034 100755 (executable)
@@ -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() {
diff --git a/tests/nvme/020 b/tests/nvme/020
deleted file mode 100755 (executable)
index 4993e36..0000000
+++ /dev/null
@@ -1,44 +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
-}
-
-set_conditions() {
-       _set_nvme_trtype "$@"
-}
-
-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"
-}
diff --git a/tests/nvme/020.out b/tests/nvme/020.out
deleted file mode 100644 (file)
index 61be280..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-Running nvme/020
-NVMe DSM: success
-disconnected 1 controller(s)
-Test complete
index 3c43c55e7e6d59af0d2f27b581aef32417ca20a4..a232246179823eed5b595c43db1d0a42673146eb 100755 (executable)
@@ -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() {
diff --git a/tests/nvme/024 b/tests/nvme/024
deleted file mode 100755 (executable)
index cab1818..0000000
+++ /dev/null
@@ -1,44 +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
-}
-
-set_conditions() {
-       _set_nvme_trtype "$@"
-}
-
-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"
-}
diff --git a/tests/nvme/024.out b/tests/nvme/024.out
deleted file mode 100644 (file)
index 76c3e29..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Running nvme/024
-Test complete