From patchwork Thu Apr 11 11:12:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinichiro Kawasaki X-Patchwork-Id: 13625764 Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49973148312 for ; Thu, 11 Apr 2024 11:13:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.71.153.141 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712834027; cv=none; b=SzBOe7cyReYVtC8QkFL01/FWmPazn3YCpuW6pNM9uBYEbxcw7ZBIjfKzttgQtQN34Ow56WcBK41qCRMJh+aajJ7XJIvD88NekL5COWjjGhLZ5C437nRBPRwATz9fFetwvBlbMd+Blu7Q1BeeiZtW55f6W5oJ0hTRd6/irpWaNFQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712834027; c=relaxed/simple; bh=rzcMOsqH0Im5ddUaeNbwuyBxslay/s5Hc/qroNU+kX4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BuJWqYn/OxTVKXa73USR6ZNLF81V851mmxuj8y8DU8eGVW0Z96aq/pmBbKFKk48QgPHT+L4G1fGphnh6E6YtkzPs0HtXz228bdXc8QTtBDLV8rny8DWCVLUPvg0GhefZZ0mceggSF4+3+u6jbZ4lpZ1mrNMIzqSL0h9BzXSwMOU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wdc.com; spf=pass smtp.mailfrom=wdc.com; dkim=pass (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b=nLoNYZlg; arc=none smtp.client-ip=216.71.153.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wdc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wdc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="nLoNYZlg" DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1712834025; x=1744370025; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rzcMOsqH0Im5ddUaeNbwuyBxslay/s5Hc/qroNU+kX4=; b=nLoNYZlgJ3TaU8GOZWEtb6EcrWgpqJBsKM2n7mOa/qsxKxBLPWMy4Q7j UCubBtRcxUvvN9SdsieFkDqTfpMxi8hDB1Pi7zvPG916H/bEGt+HW1lYv xhJP8aTJ3VlNGrFXVymOKy9GbdruFGcizAbx5ll6TBYcGHZLKZUztN0M+ j8wAnxEydH9U+NDshzHdGJXNF7NmNlif2TDqrKjl8Z80sny7jT2g02lZs VEp0EskOAswOLfAWWSxxhdNYiVHsQOHM7lTeQKCpeRJGt5xTssOcvwlTw 4cP8Km2sfcO9ci9QiwlO8JAFEagwKq2rybR+F6RX1mzPF3PwCdvgSIhmU g==; X-CSE-ConnectionGUID: haL6C4d0RHGdZxJq5OzEoA== X-CSE-MsgGUID: SKsZGPQmTQ+tZbohNy0nCw== X-IronPort-AV: E=Sophos;i="6.07,193,1708358400"; d="scan'208";a="13579888" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 11 Apr 2024 19:12:40 +0800 IronPort-SDR: nwJtW3WXeQtOpPjpZqZXmhpHEEQvk+juyo3c0Kb+eX2VQBhAQlyd0eP5inrY7amgi0K2BJbhEL wWQE9USSbbpg== Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 11 Apr 2024 03:15:25 -0700 IronPort-SDR: w/zvdokllRG3IQ/t8GLr6ZxyQmQjxVix1TTXCZZRY/OOWLRo0n26YBRIBTb5zpsf+XUxhPwPF7 2GVy72YuDStw== WDCIronportException: Internal Received: from unknown (HELO shindev.ssa.fujisawa.hgst.com) ([10.149.66.30]) by uls-op-cesaip02.wdc.com with ESMTP; 11 Apr 2024 04:12:39 -0700 From: Shin'ichiro Kawasaki To: linux-block@vger.kernel.org Cc: linux-nvme@lists.infradead.org, Daniel Wagner , Chaitanya Kulkarni Subject: [PATCH blktests 11/11] nvme/{021,022,025,026,027,028}: do not hard code target blkdev type Date: Thu, 11 Apr 2024 20:12:28 +0900 Message-ID: <20240411111228.2290407-12-shinichiro.kawasaki@wdc.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240411111228.2290407-1-shinichiro.kawasaki@wdc.com> References: <20240411111228.2290407-1-shinichiro.kawasaki@wdc.com> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Daniel Wagner There is no need to hardcode the target blkdev type. This allows the user to select different blkdev types via the nvmet_blkdev_type environment variable. Also modify set_conditions() hooks to call _set_nvme_trtype_and_nvmet_blkdev_type() instead of _set_nvme_trtype(), so that the test cases are run for all blkdev types set in NVMET_BLKDEV_TYPES. Signed-off-by: Daniel Wagner [Shin'ichiro: modify set_conditions()] Signed-off-by: Shin'ichiro Kawasaki --- tests/nvme/021 | 8 ++++---- tests/nvme/022 | 8 ++++---- tests/nvme/025 | 8 ++++---- tests/nvme/026 | 8 ++++---- tests/nvme/027 | 8 ++++---- tests/nvme/028 | 8 ++++---- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/nvme/021 b/tests/nvme/021 index 270d90e..d7add6f 100755 --- a/tests/nvme/021 +++ b/tests/nvme/021 @@ -2,11 +2,11 @@ # SPDX-License-Identifier: GPL-2.0+ # Copyright (c) 2017-2018 Western Digital Corporation or its affiliates. # -# Test NVMe list command on NVMeOF with a file-backed ns. +# Test NVMe list command. . tests/nvme/rc -DESCRIPTION="test NVMe list command on NVMeOF file-backed ns" +DESCRIPTION="test NVMe list command" QUICK=1 requires() { @@ -16,7 +16,7 @@ requires() { } set_conditions() { - _set_nvme_trtype "$@" + _set_nvme_trtype_and_nvmet_blkdev_type "$@" } test() { @@ -26,7 +26,7 @@ test() { local ns - _nvmet_target_setup --blkdev file + _nvmet_target_setup _nvme_connect_subsys diff --git a/tests/nvme/022 b/tests/nvme/022 index adaa765..0f2868c 100755 --- a/tests/nvme/022 +++ b/tests/nvme/022 @@ -2,11 +2,11 @@ # SPDX-License-Identifier: GPL-2.0+ # Copyright (c) 2017-2018 Western Digital Corporation or its affiliates. # -# Test NVMe reset command on NVMeOF with a file-backed ns. +# Test NVMe reset command. . tests/nvme/rc -DESCRIPTION="test NVMe reset command on NVMeOF file-backed ns" +DESCRIPTION="test NVMe reset command" QUICK=1 requires() { @@ -16,7 +16,7 @@ requires() { } set_conditions() { - _set_nvme_trtype "$@" + _set_nvme_trtype_and_nvmet_blkdev_type "$@" } test() { @@ -26,7 +26,7 @@ test() { local nvmedev - _nvmet_target_setup --blkdev file + _nvmet_target_setup _nvme_connect_subsys diff --git a/tests/nvme/025 b/tests/nvme/025 index 224492b..a171099 100755 --- a/tests/nvme/025 +++ b/tests/nvme/025 @@ -2,11 +2,11 @@ # SPDX-License-Identifier: GPL-2.0+ # Copyright (c) 2017-2018 Western Digital Corporation or its affiliates. # -# Test NVMe effects-log command on NVMeOF with a file-backed ns. +# Test NVMe effects-log command. . tests/nvme/rc -DESCRIPTION="test NVMe effects-log command on NVMeOF file-backed ns" +DESCRIPTION="test NVMe effects-log" QUICK=1 requires() { @@ -16,7 +16,7 @@ requires() { } set_conditions() { - _set_nvme_trtype "$@" + _set_nvme_trtype_and_nvmet_blkdev_type "$@" } test() { @@ -26,7 +26,7 @@ test() { local ns - _nvmet_target_setup --blkdev file + _nvmet_target_setup _nvme_connect_subsys diff --git a/tests/nvme/026 b/tests/nvme/026 index 6ee6a51..7196c60 100755 --- a/tests/nvme/026 +++ b/tests/nvme/026 @@ -2,11 +2,11 @@ # SPDX-License-Identifier: GPL-2.0+ # Copyright (c) 2017-2018 Western Digital Corporation or its affiliates. # -# Test NVMe ns-descs command on NVMeOF with a file-backed ns. +# Test NVMe ns-descs command. . tests/nvme/rc -DESCRIPTION="test NVMe ns-descs command on NVMeOF file-backed ns" +DESCRIPTION="test NVMe ns-descs" QUICK=1 requires() { @@ -16,7 +16,7 @@ requires() { } set_conditions() { - _set_nvme_trtype "$@" + _set_nvme_trtype_and_nvmet_blkdev_type "$@" } test() { @@ -26,7 +26,7 @@ test() { local ns - _nvmet_target_setup --blkdev file + _nvmet_target_setup _nvme_connect_subsys diff --git a/tests/nvme/027 b/tests/nvme/027 index a63e42b..b117cc1 100755 --- a/tests/nvme/027 +++ b/tests/nvme/027 @@ -2,11 +2,11 @@ # SPDX-License-Identifier: GPL-2.0+ # Copyright (c) 2017-2018 Western Digital Corporation or its affiliates. # -# Test NVMe ns-rescan command on NVMeOF with a file-backed ns. +# Test NVMe ns-rescan command. . tests/nvme/rc -DESCRIPTION="test NVMe ns-rescan command on NVMeOF file-backed ns" +DESCRIPTION="test NVMe ns-rescan command" QUICK=1 requires() { @@ -16,7 +16,7 @@ requires() { } set_conditions() { - _set_nvme_trtype "$@" + _set_nvme_trtype_and_nvmet_blkdev_type "$@" } test() { @@ -26,7 +26,7 @@ test() { local nvmedev - _nvmet_target_setup --blkdev file + _nvmet_target_setup _nvme_connect_subsys diff --git a/tests/nvme/028 b/tests/nvme/028 index 65c52a9..d6ffdd6 100755 --- a/tests/nvme/028 +++ b/tests/nvme/028 @@ -2,11 +2,11 @@ # SPDX-License-Identifier: GPL-2.0+ # Copyright (c) 2017-2018 Western Digital Corporation or its affiliates. # -# Test NVMe list-subsys command on NVMeOF with a file-backed ns. +# Test NVMe list-subsys command. . tests/nvme/rc -DESCRIPTION="test NVMe list-subsys command on NVMeOF file-backed ns" +DESCRIPTION="test NVMe list-subsys" QUICK=1 requires() { @@ -16,7 +16,7 @@ requires() { } set_conditions() { - _set_nvme_trtype "$@" + _set_nvme_trtype_and_nvmet_blkdev_type "$@" } test() { @@ -24,7 +24,7 @@ test() { _setup_nvmet - _nvmet_target_setup --blkdev file + _nvmet_target_setup _nvme_connect_subsys