From patchwork Mon Apr 17 12:47:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shin'ichiro Kawasaki X-Patchwork-Id: 13213816 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55201C77B78 for ; Mon, 17 Apr 2023 12:48:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230123AbjDQMsS (ORCPT ); Mon, 17 Apr 2023 08:48:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbjDQMsQ (ORCPT ); Mon, 17 Apr 2023 08:48:16 -0400 Received: from wnew3-smtp.messagingengine.com (wnew3-smtp.messagingengine.com [64.147.123.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A27D765B2; Mon, 17 Apr 2023 05:47:53 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.west.internal (Postfix) with ESMTP id ED8442B0679B; Mon, 17 Apr 2023 08:47:52 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 17 Apr 2023 08:47:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1681735672; x= 1681736272; bh=OOw1AAJkLQjLU0GAGlJCBYEb4ecro8RwuRFm5lMByG8=; b=g TY7FMyipiJ6yPibgy86TIbkcp5p1cPtoymiYIXMptI1jVVGhIdiuL0fSu6Lgponl kpmdB8V6rMSxmo3BG3QLOST0PUWNO/GvwwM0R5OuZeK03NRVtVq0FGRePdhOjIOV mfJAgJ2/1oWgr+dovgmU7lJmVCi1c7VklWAeugmuNc0kcL5rA8AM7oq1X68/S2SK qasEXPxS2q+su6fUTYchpATk2VQh8yA3aFTjxX1ewZjTEcoAHYzueNVEqDcQzR+5 RxT68rZgb27Wit4kAmiBqUxaS6IbRsOlUplQp/I9nXEICCB9oOjZX8EzO/uSH20h 7W7WYl/QwfamuyfGSVNXQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=ie1e949a3.fm3; t= 1681735672; x=1681736272; bh=OOw1AAJkLQjLU0GAGlJCBYEb4ecro8RwuRF m5lMByG8=; b=HtWMwnCHWRwP3skZfJW9c1eUfKecH/8XF8MMPos+eL22b+CF/fM w2J8ABrX6z5fOXxGFlAeAgbmexk7PNKcnKOASZlY2WQN8wOkyg+bspeI+75DutDd S9YkQcoLKuYe1nPo6fHM7ft0COMvZdj/G7lmhwjLkl+kPskSNIYD4tkdrRfjCZ41 8hQZYyqQ/JRvuQxbTPl/9+rLmhDNPW6XvX/0Y/CSvrdMoexO+GldIqV50a04lVdz TWCRe03plfJuSN1Vy58BA3eGmqaudVtMfLkOPyYChN/+uDe2gBeeIVxSNcDaCBcC Q2jidOnju/ik6PY17wtxvZgGpahiipB/ofg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeliedgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefuhhhinhdkihgthhhirhhoucfmrgifrghsrghkihcuoehs hhhinhhitghhihhrohesfhgrshhtmhgrihhlrdgtohhmqeenucggtffrrghtthgvrhhnpe fggfegffejgeefueetgeeukedvhfeludfhhefftdeitdfhteelieefiefhueekgeenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehshhhinhhitg hhihhrohesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: ie1e949a3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Apr 2023 08:47:50 -0400 (EDT) From: Shin'ichiro Kawasaki To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org Cc: Shin'ichiro Kawasaki , Shin'ichiro Kawasaki Subject: [PATCH blktests 1/9] common/rc: skip module file check if modules path does not exist Date: Mon, 17 Apr 2023 21:47:20 +0900 Message-Id: <20230417124728.458630-2-shinichiro@fastmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230417124728.458630-1-shinichiro@fastmail.com> References: <20230417124728.458630-1-shinichiro@fastmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Shin'ichiro Kawasaki When all of the kernel modules are built-in, /lib/modules/*/kernel path may not exist. In this case, check for the path results in failure. Skip the check when the path does not exist. Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Chaitanya Kulkarni --- common/rc | 1 + 1 file changed, 1 insertion(+) diff --git a/common/rc b/common/rc index af4c0b1..f67b434 100644 --- a/common/rc +++ b/common/rc @@ -36,6 +36,7 @@ _module_file_exists() local -i count libpath="/lib/modules/$(uname -r)/kernel" + [[ ! -d $libpath ]] && return 1 count=$(find "$libpath" -name "$ko_underscore*" -o \ -name "$ko_hyphen*" | wc -l) ((count)) && return 0 From patchwork Mon Apr 17 12:47:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shin'ichiro Kawasaki X-Patchwork-Id: 13213817 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF0DBC77B70 for ; Mon, 17 Apr 2023 12:48:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231266AbjDQMsZ (ORCPT ); Mon, 17 Apr 2023 08:48:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229649AbjDQMsS (ORCPT ); Mon, 17 Apr 2023 08:48:18 -0400 Received: from wnew3-smtp.messagingengine.com (wnew3-smtp.messagingengine.com [64.147.123.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AAAF5584; Mon, 17 Apr 2023 05:47:56 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id 9F3692B0679E; Mon, 17 Apr 2023 08:47:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 17 Apr 2023 08:47:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1681735675; x= 1681736275; bh=1+MEVx9jxvmBHXnL2/G+/Ky5rwzrLXN6gGxqfB5sM+I=; b=F 6SyJBVFWrOWvQ+G2T/yGTkoX9MdJjzQUksooElKaWQPnYl704njTdE96ML8mP27b nJu84bxCYnbv2bLa/rFPf4c+umDFn3hl1WeIzIunLZRk0BnIVE6Ywiq7o76Tu4y0 PDasgJUy8wIIHDlkNXPOdgP+E8Bk7hP6BxZgCsTFvXvpfR3btZUGXu35uAbEIqrz tr3dp3rX/KPo/HYyFF6METcDVS0NeaWaLNJfqRIHTOZCRGAA6k8b8oUq6j+2/Uk1 1qk3la2R9lA+WrHTf4tquKsNzE+F4V+d6uuvdiuA3kH17ziUszIuH8CPJWFFA97J C/VHZ4rJUKf3d4Fu188gg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=ie1e949a3.fm3; t= 1681735675; x=1681736275; bh=1+MEVx9jxvmBHXnL2/G+/Ky5rwzrLXN6gGx qfB5sM+I=; b=GZXaMT+JPhv+8bT3OeMQCpQ/0V2R52VqHKE7Rs827RUWe0IMUXh NPdx6pTI/YytCXbGii8lHiQK8nNFGLSgL3B3OkNZ8/SziU9cOBK8VNLm6bcZmA0c /AdA7T1HmWVs3xxpqw/isjoZ5l1j1l7gTYItToFAYxJPWQh+AVu6lMJEVbwoKI8I kYJyLHo4CYYed4QNC8/JZatfpZiPzoS3ISVJCY+05NthcRMRyyhQHsdCXRj11+MP +YcmM4GxNI4dtec9Y6pTL01VzWZgYIuyZPWv7VB3yGYuNQD0iV07bcH0uaN3O9oC LbNv96R4yGXK6CtKzhZ9ZNF3WHrv++Zj37g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeliedgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefuhhhinhdkihgthhhirhhoucfmrgifrghsrghkihcuoehs hhhinhhitghhihhrohesfhgrshhtmhgrihhlrdgtohhmqeenucggtffrrghtthgvrhhnpe fggfegffejgeefueetgeeukedvhfeludfhhefftdeitdfhteelieefiefhueekgeenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehshhhinhhitg hhihhrohesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: ie1e949a3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Apr 2023 08:47:53 -0400 (EDT) From: Shin'ichiro Kawasaki To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org Cc: Shin'ichiro Kawasaki , Shin'ichiro Kawasaki Subject: [PATCH blktests 2/9] common/scsi_debug, tests/*: re-define _have_scsi_debug Date: Mon, 17 Apr 2023 21:47:21 +0900 Message-Id: <20230417124728.458630-3-shinichiro@fastmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230417124728.458630-1-shinichiro@fastmail.com> References: <20230417124728.458630-1-shinichiro@fastmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Shin'ichiro Kawasaki As a preparation to adapt test cases to built-in scsi_debug module, re- define the _have_scsi_debug function. It checks that the scsi_debug module is built as a loadable module. Modify it to check that the scsi_debug module is available as built-in module or loadable module. Also replace all _have_scsi_debug calls in test cases with "_have_module scsi_debug" so that the change of _have_scsi_debug do not affect the test cases. Following commits will modify them to call _have_scsi_debug, only for test cases ready to run with built-in scsi_debug. Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Chaitanya Kulkarni --- common/scsi_debug | 2 +- tests/block/001 | 2 +- tests/block/002 | 3 ++- tests/block/009 | 3 ++- tests/block/025 | 2 +- tests/block/027 | 4 +++- tests/block/028 | 2 +- tests/block/032 | 3 ++- tests/loop/004 | 5 ++++- tests/scsi/004 | 2 +- tests/scsi/005 | 3 ++- tests/scsi/007 | 2 +- tests/zbd/008 | 5 +++-- tests/zbd/009 | 2 +- tests/zbd/010 | 2 +- 15 files changed, 26 insertions(+), 16 deletions(-) diff --git a/common/scsi_debug b/common/scsi_debug index ae13bb6..5f73354 100644 --- a/common/scsi_debug +++ b/common/scsi_debug @@ -5,7 +5,7 @@ # scsi_debug helper functions. _have_scsi_debug() { - _have_module scsi_debug + _have_driver scsi_debug } _init_scsi_debug() { diff --git a/tests/block/001 b/tests/block/001 index fb93932..2ea3754 100755 --- a/tests/block/001 +++ b/tests/block/001 @@ -13,7 +13,7 @@ DESCRIPTION="stress device hotplugging" TIMED=1 requires() { - _have_scsi_debug + _have_module scsi_debug _have_driver sd_mod _have_driver sr_mod } diff --git a/tests/block/002 b/tests/block/002 index 05d00d2..a5f3ee5 100755 --- a/tests/block/002 +++ b/tests/block/002 @@ -12,7 +12,8 @@ DESCRIPTION="remove a device while running blktrace" QUICK=1 requires() { - _have_blktrace && _have_scsi_debug + _have_blktrace + _have_module scsi_debug } test() { diff --git a/tests/block/009 b/tests/block/009 index df36edb..d3ea42a 100755 --- a/tests/block/009 +++ b/tests/block/009 @@ -12,7 +12,8 @@ DESCRIPTION="check page-cache coherency after BLKDISCARD" requires() { - _have_scsi_debug && _have_program xfs_io + _have_module scsi_debug + _have_program xfs_io } test() { diff --git a/tests/block/025 b/tests/block/025 index f746c1c..4c48e9f 100755 --- a/tests/block/025 +++ b/tests/block/025 @@ -12,7 +12,7 @@ DESCRIPTION="do a huge discard with 4k sector size" requires() { - _have_scsi_debug + _have_module scsi_debug } test() { diff --git a/tests/block/027 b/tests/block/027 index b60f62c..ab6369b 100755 --- a/tests/block/027 +++ b/tests/block/027 @@ -19,7 +19,9 @@ QUICK=1 CAN_BE_ZONED=1 requires() { - _have_cgroup2_controller io && _have_scsi_debug && _have_fio + _have_cgroup2_controller io + _have_module scsi_debug + _have_fio } scsi_debug_stress_remove() { diff --git a/tests/block/028 b/tests/block/028 index 5140d94..13b3278 100755 --- a/tests/block/028 +++ b/tests/block/028 @@ -12,7 +12,7 @@ DESCRIPTION="do I/O on scsi_debug with DIF/DIX enabled" DMESG_FILTER="sed -r 's/(guard tag error at sector|ref tag error at location)/blktests failure: \\1/'" requires() { - _have_scsi_debug + _have_module scsi_debug } test_pi() { diff --git a/tests/block/032 b/tests/block/032 index b07b7ab..8975879 100755 --- a/tests/block/032 +++ b/tests/block/032 @@ -13,7 +13,8 @@ DESCRIPTION="remove one mounted device" QUICK=1 requires() { - _have_xfs && _have_scsi_debug + _have_xfs + _have_module scsi_debug } test() { diff --git a/tests/loop/004 b/tests/loop/004 index fab34e8..ca52d80 100755 --- a/tests/loop/004 +++ b/tests/loop/004 @@ -11,7 +11,10 @@ DESCRIPTION="combine loop direct I/O mode and a custom block size" QUICK=1 requires() { - _have_program xfs_io && _have_scsi_debug && _have_src_program loblksize && _have_loop_set_block_size + _have_program xfs_io + _have_module scsi_debug + _have_src_program loblksize + _have_loop_set_block_size } test() { diff --git a/tests/scsi/004 b/tests/scsi/004 index b5ef2dd..f0845c1 100755 --- a/tests/scsi/004 +++ b/tests/scsi/004 @@ -18,7 +18,7 @@ DESCRIPTION="ensure repeated TASK SET FULL results in EIO on timing out command" CAN_BE_ZONED=1 requires() { - _have_scsi_debug + _have_module scsi_debug } test() { diff --git a/tests/scsi/005 b/tests/scsi/005 index 22fb495..efd3d82 100755 --- a/tests/scsi/005 +++ b/tests/scsi/005 @@ -11,7 +11,8 @@ DESCRIPTION="test SCSI device blacklisting" QUICK=1 requires() { - _have_scsi_debug && _have_module_param scsi_debug inq_vendor + _have_module scsi_debug + _have_module_param scsi_debug inq_vendor } test() { diff --git a/tests/scsi/007 b/tests/scsi/007 index e7088a1..547a735 100755 --- a/tests/scsi/007 +++ b/tests/scsi/007 @@ -12,7 +12,7 @@ DESCRIPTION="Trigger the SCSI error handler" QUICK=1 requires() { - _have_scsi_debug + _have_module scsi_debug } config_hz() { diff --git a/tests/zbd/008 b/tests/zbd/008 index c625bad..55b5b6c 100755 --- a/tests/zbd/008 +++ b/tests/zbd/008 @@ -13,8 +13,9 @@ DESCRIPTION="check no stale page cache after BLKZONERESET and data read race" TIMED=1 requires() { - _have_scsi_debug && _have_module_param scsi_debug zbc && - _have_program xfs_io + _have_module scsi_debug + _have_module_param scsi_debug zbc + _have_program xfs_io } test() { diff --git a/tests/zbd/009 b/tests/zbd/009 index 483cbf6..c0ce1f2 100755 --- a/tests/zbd/009 +++ b/tests/zbd/009 @@ -36,7 +36,7 @@ requires() { _have_driver btrfs _have_module_param scsi_debug zone_cap_mb _have_program mkfs.btrfs - _have_scsi_debug + _have_module scsi_debug have_good_mkfs_btrfs } diff --git a/tests/zbd/010 b/tests/zbd/010 index 35143b8..c5cb76a 100755 --- a/tests/zbd/010 +++ b/tests/zbd/010 @@ -15,7 +15,7 @@ requires() { _have_module null_blk _have_module_param scsi_debug zone_cap_mb _have_program mkfs.f2fs - _have_scsi_debug + _have_module scsi_debug } test() { From patchwork Mon Apr 17 12:47:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shin'ichiro Kawasaki X-Patchwork-Id: 13213819 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67A75C77B76 for ; Mon, 17 Apr 2023 12:48:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231239AbjDQMs0 (ORCPT ); Mon, 17 Apr 2023 08:48:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231238AbjDQMsX (ORCPT ); Mon, 17 Apr 2023 08:48:23 -0400 Received: from wnew3-smtp.messagingengine.com (wnew3-smtp.messagingengine.com [64.147.123.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3CEA7EEB; Mon, 17 Apr 2023 05:47:58 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.west.internal (Postfix) with ESMTP id 46E632B0679F; Mon, 17 Apr 2023 08:47:58 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 17 Apr 2023 08:47:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1681735677; x= 1681736277; bh=qytjDzneUj140M+Xh/g65kAwZaaW7nCzkWlPLlgiqs4=; b=Q bOT5Wlkk9m0LM95wQQgPxCHWr1izSMqm58lMx6yVV0+rBlXujs597Kjm2FD2n8hf w7hegWNmO+v02mqphYysL3R5azlk1QSd5fgpRsuEaEOM6bILSG1X307lVoF4IVzS LWV6TvzPfUh7lteBpgROMjs3G/VOKMCqLnCChBjH0v68skMFkfqrcPFbfQNVNBzt HXQ0XMVxTt1oGppFmo3K7IpScWsWZuKvvDuPUH8+kDqCGLQPhwU0RBXkxvf+z59S 24MfJD2cdjV+BmTManazSWBmhEMQbamhF+KIzeRrYgm/FmEzcCKKWdlhTNTeiBb+ wbksW1Z7mlxnbzEA0SnNg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=ie1e949a3.fm3; t= 1681735677; x=1681736277; bh=qytjDzneUj140M+Xh/g65kAwZaaW7nCzkWl PLlgiqs4=; b=L/o+Oe38ZkARCCuuYMxIMITbHgA3TyYtBAZFvVZ/P+TgzH9MPX/ b6YFTrjemai6c0oevT5aP9aGQn13c7pKI8zTSWD/8iD3UJIZyU3Qoe3spSkSN0KR bqYLiT2OH3uP3iC6e3mQtnJGvFpju2nXPpuePIiGxL0Q+Cko2XCfBnL42dQb3Ujh CfnQjJmPTlKdouQOKn3ZqEqWiE7taUwgYUIfxBY/Ko2i3QkYTmYsP2cGt5E8d3s4 TAAOrlvZhWlc6tAnQ7G64zUV74Jodqenoodt1TGGMr27ccZ0eFwXX7AKJt5TJ5IQ toiVBb1ejgCldUuwnz/jLrD8fgESBKMiipA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeliedgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefuhhhinhdkihgthhhirhhoucfmrgifrghsrghkihcuoehs hhhinhhitghhihhrohesfhgrshhtmhgrihhlrdgtohhmqeenucggtffrrghtthgvrhhnpe fggfegffejgeefueetgeeukedvhfeludfhhefftdeitdfhteelieefiefhueekgeenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehshhhinhhitg hhihhrohesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: ie1e949a3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Apr 2023 08:47:56 -0400 (EDT) From: Shin'ichiro Kawasaki To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org Cc: Shin'ichiro Kawasaki , Shin'ichiro Kawasaki Subject: [PATCH blktests 3/9] common/scsi_debug: factor out _setup_scsi_debug_vars Date: Mon, 17 Apr 2023 21:47:22 +0900 Message-Id: <20230417124728.458630-4-shinichiro@fastmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230417124728.458630-1-shinichiro@fastmail.com> References: <20230417124728.458630-1-shinichiro@fastmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Shin'ichiro Kawasaki As a preparation to introduce a new helper function to configure scsi_debug device with built-in scsi_debug module, factor out a part of _init_scsi_debug to a new function _setup_scsi_debug_vars. Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Chaitanya Kulkarni --- common/scsi_debug | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/common/scsi_debug b/common/scsi_debug index 5f73354..0bf768a 100644 --- a/common/scsi_debug +++ b/common/scsi_debug @@ -8,22 +8,7 @@ _have_scsi_debug() { _have_driver scsi_debug } -_init_scsi_debug() { - local -a args=("$@") - - if (( RUN_FOR_ZONED )); then - if ! _have_module_param scsi_debug zbc; then - return - fi - args+=(zbc=host-managed zone_nr_conv=0) - fi - - if ! modprobe -r scsi_debug || ! modprobe scsi_debug "${args[@]}"; then - return 1 - fi - - udevadm settle - +_setup_scsi_debug_vars() { local host_sysfs host target_sysfs target SCSI_DEBUG_HOSTS=() SCSI_DEBUG_TARGETS=() @@ -55,6 +40,25 @@ _init_scsi_debug() { return 0 } +_init_scsi_debug() { + local -a args=("$@") + + if (( RUN_FOR_ZONED )); then + if ! _have_module_param scsi_debug zbc; then + return + fi + args+=(zbc=host-managed zone_nr_conv=0) + fi + + if ! modprobe -r scsi_debug || ! modprobe scsi_debug "${args[@]}"; then + return 1 + fi + + udevadm settle + + _setup_scsi_debug_vars +} + _exit_scsi_debug() { unset SCSI_DEBUG_HOSTS unset SCSI_DEBUG_TARGETS From patchwork Mon Apr 17 12:47:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shin'ichiro Kawasaki X-Patchwork-Id: 13213818 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3184C77B7C for ; Mon, 17 Apr 2023 12:48:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231284AbjDQMs1 (ORCPT ); Mon, 17 Apr 2023 08:48:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231244AbjDQMsY (ORCPT ); Mon, 17 Apr 2023 08:48:24 -0400 Received: from wnew3-smtp.messagingengine.com (wnew3-smtp.messagingengine.com [64.147.123.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB35459DD; Mon, 17 Apr 2023 05:48:01 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.west.internal (Postfix) with ESMTP id 0130C2B067AA; Mon, 17 Apr 2023 08:48:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 17 Apr 2023 08:48:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1681735680; x= 1681736280; bh=R9QFYCJR9t4JE3rzfKuFGqladYR/WcBQuAHqEYVgryA=; b=T 4oSUiC5oTaDoCPbdIL/ZOOLIKlX8lY5SLepV7cKDIpU2wwbUDE6D22oW3/Sis7io Vs4jQsG6wPYEROzOS+dUxLL2R493RT0flfZ6an1x0WU7Z2F3GKegV8Et+6eCmxL5 2SKxG997oFLhEC5TwNUXlQMDe+7eQTzFgAznvX/SZN8/EfE4lzvl3IDs8sHPPzk7 wKVlmK3DBmKJfXNOv/lwOGZ6nbiUpjse6aHsM6o/Vx91UB1rIwcvLELMFoj9h+DE o70vS4Kalsu7yT1RTYHAd6xH+pxcyFGSkpbaLY/WV6xVZdNfcgRRWNns1rqmi85U s5FMMUVyEVPgv9WwVshcQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=ie1e949a3.fm3; t= 1681735680; x=1681736280; bh=R9QFYCJR9t4JE3rzfKuFGqladYR/WcBQuAH qEYVgryA=; b=V6BqtLBh1+SPg7ae/AjYvvqSOBS3fcdczdED/0vbSlF5je8p8qI i9Ukpl1x67YxNBpIU08ofarU04aTzP1Hx4tutloGEnzb9Z5M8IsNzOAUiCankvXE XEfnT2rf+TT8LkD1l7PzI0Tqu1aqwVdTvIPQzD/GRXwj+JSXUXw5kFoL16NJqf5w sPIctOiKwfb8cZyLqgkiRCsoQ6tr28qmVZmcBWvByc0Wa+mo4mbVaIW6u/WQxnyY fTKjM5Qgi3SW2gXXIQdsgXJaDrLJQDpquJFdmTmdTC1IjwgsrH4a0h8YBSPLyzVq vTxSp331Q1q7YE7hqLnGsqRn7l5izweBW1g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeliedgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefuhhhinhdkihgthhhirhhoucfmrgifrghsrghkihcuoehs hhhinhhitghhihhrohesfhgrshhtmhgrihhlrdgtohhmqeenucggtffrrghtthgvrhhnpe fggfegffejgeefueetgeeukedvhfeludfhhefftdeitdfhteelieefiefhueekgeenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehshhhinhhitg hhihhrohesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: ie1e949a3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Apr 2023 08:47:58 -0400 (EDT) From: Shin'ichiro Kawasaki To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org Cc: Shin'ichiro Kawasaki , Shin'ichiro Kawasaki Subject: [PATCH blktests 4/9] common/scsi_debug: introduce _configure_scsi_debug Date: Mon, 17 Apr 2023 21:47:23 +0900 Message-Id: <20230417124728.458630-5-shinichiro@fastmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230417124728.458630-1-shinichiro@fastmail.com> References: <20230417124728.458630-1-shinichiro@fastmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Shin'ichiro Kawasaki To set up scsi_debug devices with built-in scsi_debug module, introduce a new helper function _configure_scsi_debug. It works in similar manner as _init_scsi_debug which sets up scsi_debug devices with loadable scsi_debug module. _configure_scsi_debug takes parameters of scsi_debug devices in format of 'key=value' as its arguments. It calls another new helper function _scsi_debug_key_path to search sysfs files corresponding to the keys in /sys/bus/pseudo/drivers/scsi_debug or /sys/module/scsi_debug/parameters. When it finds the file, it writes the value to the file. The original values of the files are kept in the global array SCSI_DEBUG_VALUES and restored by _exit_scsi_debug. Among the parameters, 'add_host' has special meaning to add new hosts. Then it is handled separately so that it is set at last in _configure_scsi_debug, and restored at first in _exit_scsi_debug. Also, record the hosts which exist before _configure_scsi_debug in the array ORIG_SCSI_DEBUG_HOSTS. Those hosts should not be used for testing, then do not add them to SCSI_DEBUG_HOSTS. Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Chaitanya Kulkarni --- common/scsi_debug | 113 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 112 insertions(+), 1 deletion(-) diff --git a/common/scsi_debug b/common/scsi_debug index 0bf768a..ee9edac 100644 --- a/common/scsi_debug +++ b/common/scsi_debug @@ -8,16 +8,49 @@ _have_scsi_debug() { _have_driver scsi_debug } +SD_PSEUDO_PATH=/sys/bus/pseudo/drivers/scsi_debug +SD_PARAM_PATH=/sys/module/scsi_debug/parameters + +_scsi_debug_key_path() { + local key=${1} + + path="${SD_PSEUDO_PATH}/$key" + if [[ ! -e $path ]]; then + path="${SD_PARAM_PATH}/$key" + fi + if [[ ! -w $path ]]; then + return 1 + fi + + echo "$path" +} + +declare -a SCSI_DEBUG_HOSTS +declare -a SCSI_DEBUG_TARGETS +declare -a SCSI_DEBUG_DEVICES +declare -a ORIG_SCSI_DEBUG_HOSTS + _setup_scsi_debug_vars() { local host_sysfs host target_sysfs target + local -i i + SCSI_DEBUG_HOSTS=() SCSI_DEBUG_TARGETS=() SCSI_DEBUG_DEVICES=() + for host_sysfs in /sys/class/scsi_host/*; do if [[ "$(cat "${host_sysfs}/proc_name")" = scsi_debug ]]; then host="${host_sysfs#/sys/class/scsi_host/host}" + local orig_host=0 + for ((i=0;i<${#ORIG_SCSI_DEBUG_HOSTS[@]};i++)); do + if (( host == ORIG_SCSI_DEBUG_HOSTS[i])); then + orig_host=1 + fi + done + ((orig_host)) && continue SCSI_DEBUG_HOSTS+=("$host") for target_sysfs in /sys/class/scsi_device/"$host":*; do + [[ ! -e $target_sysfs ]] && break target="${target_sysfs#/sys/class/scsi_device/}" SCSI_DEBUG_TARGETS+=("$target") SCSI_DEBUG_DEVICES+=("$(ls "$target_sysfs/device/block")") @@ -59,10 +92,88 @@ _init_scsi_debug() { _setup_scsi_debug_vars } +_configure_scsi_debug() { + local -a args=("$@") + local -a values + local key value path add_host_value=1 + local -i i + + udevadm settle + + # fall back to _init_scsi_debug because scsi_debug is loadable + if _module_file_exists scsi_debug; then + _init_scsi_debug "${args[@]}" + return + fi + + # zoned device is not yet configurable due to read-only zbc parameter + if (( RUN_FOR_ZONED )) && ! _have_module scsi_debug; then + return 1 + fi + + # List SCSI_DEBUG_HOSTS before configuration + ORIG_SCSI_DEBUG_HOSTS=() + _setup_scsi_debug_vars >& /dev/null + ORIG_SCSI_DEBUG_HOSTS=("${SCSI_DEBUG_HOSTS[@]}") + + SCSI_DEBUG_KEYS=() + SCSI_DEBUG_VALUES=() + for o in "$@"; do + key=${o%=*} + value=${o#*=} + SCSI_DEBUG_KEYS+=("${key}") + values+=("${value}") + if ! path=$(_scsi_debug_key_path "${key}"); then + echo "sysfs to write $key is not avaialbe" + return 1 + fi + if [[ $key == add_host ]]; then + SCSI_DEBUG_VALUES+=("-${value}") + add_host_value=${value} + else + SCSI_DEBUG_VALUES+=("$(<"${path}")") + echo -n "${value}" > "${path}" + fi + done + + echo "${add_host_value}" > ${SD_PSEUDO_PATH}/add_host + + udevadm settle + + _setup_scsi_debug_vars +} + _exit_scsi_debug() { + local i key path add_host_value=-1 + unset SCSI_DEBUG_HOSTS unset SCSI_DEBUG_TARGETS unset SCSI_DEBUG_DEVICES udevadm settle - modprobe -r scsi_debug + + if _module_file_exists scsi_debug; then + modprobe -r scsi_debug + return + fi + + for ((i = 0; i < ${#SCSI_DEBUG_KEYS[@]}; i++)); do + key=${SCSI_DEBUG_KEYS[i]} + if [[ $key == add_host ]]; then + add_host_value=${SCSI_DEBUG_VALUES[i]} + fi + done + echo "${add_host_value}" > ${SD_PSEUDO_PATH}/add_host + + for ((i = 0; i < ${#SCSI_DEBUG_KEYS[@]}; i++)); do + key=${SCSI_DEBUG_KEYS[i]} + if ! path=$(_scsi_debug_key_path "${key}"); then + echo "sysfs to write $key is not avaialbe" + return 1 + fi + if [[ $key != add_host ]]; then + echo -n "${SCSI_DEBUG_VALUES[i]}" > "${path}" + fi + done + unset SCSI_DEBUG_KEYS + unset SCSI_DEBUG_VALUES } From patchwork Mon Apr 17 12:59:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shin'ichiro Kawasaki X-Patchwork-Id: 13213987 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16DDAC77B70 for ; Mon, 17 Apr 2023 13:04:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231403AbjDQNE1 (ORCPT ); Mon, 17 Apr 2023 09:04:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230034AbjDQND7 (ORCPT ); Mon, 17 Apr 2023 09:03:59 -0400 Received: from wnew3-smtp.messagingengine.com (wnew3-smtp.messagingengine.com [64.147.123.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1B0012017; Mon, 17 Apr 2023 06:01:00 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id 8EDE62B066B3; Mon, 17 Apr 2023 08:59:19 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 17 Apr 2023 08:59:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm3; t=1681736359; x=1681736959; bh=TBaT+4cr6v Wz/Vz1IbQN7kXEDEkzvZRMD990nt4ep2M=; b=NCp8K1lPQIB2ax2JeBaHR3G58J rxPI2+uyLoOFip4qX0Ah8MisLZG/uYNYYr4eVFJfYH/+0ZF1argZ5wGlLOWjM44h HO4jTtOvu9t5X+X315bOfWLNdYbA/1p/Ol0nD+nDFzQmmYY5RTLNS1Var/Kl3SEF XujD1CsTFztZY8d9C6LLTk7yxcqVMUrnNVnyDBolHrq9xLW3UMXumM6+mp5doAwL 4tC7PSWUnX8LMU2v78HXvLfpw6QQxLzhZijJRUZElkmE1Jbe21/XC+OTixLcHhXe w+pHTpqB3OwzLpBHzMxvPysVMzFCtmQ7pEVDuJ8AlZDO2FXlrSFxiWwA9vJg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=ie1e949a3.fm3; t=1681736359; x=1681736959; bh=TBa T+4cr6vWz/Vz1IbQN7kXEDEkzvZRMD990nt4ep2M=; b=HM61VvHZFpPY/Qev1Ar PCPVjc7Np+mFUM9OQ7HZspnvd1yXQFWyGZ9qIGU5e5KGBnmQ6ydGbc/7lVGNG70i wfdwilDBglYGgi85VV6/t/aV0yiuMMot+Z2DWSLSwkkfxgWhf0aaGMjLUqqZTlNP oHGPJzTQyv6DjjDjNrPYIZaoZyc8l0V9jg0i+CukuIXCdUvMxtonJcGsUCLIh88q El5NH5Qn5dHUauEZtKFWHLZpBFO3ESuN8Tmqkdggv9D6QiZE6gMvqak3Zfrm3apk gGtWeItCuOrBjNbtmyG2gfIQ3VtdzsWIRYpoZCBKr7qMRa9zva8kGfR1SZ2dA75i ZKw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeliedgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpefuhhhinhdkihgthhhirhhoucfmrgifrghsrghkihcuoehshhhi nhhitghhihhrohesfhgrshhtmhgrihhlrdgtohhmqeenucggtffrrghtthgvrhhnpefhke dtteeggeegleeltdfgffehleekhfduvdegveduffetudejveetieejiefghfenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehshhhinhhitghhih hrohesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: ie1e949a3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Apr 2023 08:59:17 -0400 (EDT) From: Shin'ichiro Kawasaki To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org Cc: Shin'ichiro Kawasaki , Shin'ichiro Kawasaki Subject: [PATCH blktests 5/9] scsi/004: allow to run with built-in scsi_debug Date: Mon, 17 Apr 2023 21:59:09 +0900 Message-Id: <20230417125913.458726-1-shinichiro@fastmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Shin'ichiro Kawasaki To allow the test case run with build-in scsi_debug, replace '_have_module scsi_debug' with _have_scsi_debug, and replace _init_scsi_debug with _configure_scsi_debug. Also, save and restore the values of scsi_debug parameters 'opts' and 'ndelay'. The test case modifies the parameters and do not restore their original values. It is fine when scsi_debug is loadable since scsi_debug is unloaded after the test case run. However, when scsi_debug is built- in, the modified parameters may affect following test cases. To avoid potential impact on following test cases, save original values of the parameters and restore them at the end of the test case. Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Chaitanya Kulkarni --- tests/scsi/004 | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tests/scsi/004 b/tests/scsi/004 index f0845c1..110b5f4 100755 --- a/tests/scsi/004 +++ b/tests/scsi/004 @@ -18,15 +18,22 @@ DESCRIPTION="ensure repeated TASK SET FULL results in EIO on timing out command" CAN_BE_ZONED=1 requires() { - _have_module scsi_debug + _have_scsi_debug } test() { + local opts ndelay + echo "Running ${TEST_NAME}" - if ! _init_scsi_debug add_host=1 max_luns=1 statistics=1 every_nth=1; then + if ! _configure_scsi_debug max_luns=1 statistics=1 every_nth=1; then return 1 fi + + # save scsi_debug parameters + opts=$( "/sys/block/${SCSI_DEBUG_DEVICES[0]}/device/timeout" # every_nth RW with full queue gets SAM_STAT_TASK_SET_FULL echo 0x800 > /sys/bus/pseudo/drivers/scsi_debug/opts @@ -42,7 +49,11 @@ test() { while grep -q -F "in_use_bm BUSY:" "/proc/scsi/scsi_debug/${SCSI_DEBUG_HOSTS[0]}"; do sleep 1 done - echo 1 > /sys/bus/pseudo/drivers/scsi_debug/ndelay + + # restore scsi_debug parameters + echo "$opts" > /sys/bus/pseudo/drivers/scsi_debug/opts + echo "$ndelay" > /sys/bus/pseudo/drivers/scsi_debug/ndelay + _exit_scsi_debug echo "Test complete" From patchwork Mon Apr 17 12:59:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shin'ichiro Kawasaki X-Patchwork-Id: 13213985 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C34BDC77B77 for ; Mon, 17 Apr 2023 13:04:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231377AbjDQNEB (ORCPT ); Mon, 17 Apr 2023 09:04:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231387AbjDQNDm (ORCPT ); Mon, 17 Apr 2023 09:03:42 -0400 Received: from wnew3-smtp.messagingengine.com (wnew3-smtp.messagingengine.com [64.147.123.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6939F11BA2; Mon, 17 Apr 2023 06:00:42 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailnew.west.internal (Postfix) with ESMTP id 36E6F2B06733; Mon, 17 Apr 2023 08:59:22 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 17 Apr 2023 08:59:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1681736361; x= 1681736961; bh=2NZbhL7tjJaNUxYqL9byU5qKMZUlP07NY/no4LnIiOo=; b=m /zpokqEhLV4s0DCRdg23eNxo0EJjxziiwPXw/UzyZBQaF5QK9BZJ2n1ndDlxFUv6 7Zd6uWwU/7F/BP1PnshMFcrXZm4FSxkt2470l9pIO/cQeRe0ftrK84Pr6sDp9IAc 9hAObUnx9iGaxbRGqOySn4ITRMUtAit6VxswFdOC80ZPbFyfWVG5n/5mnJXQyEXG AoOiHRXaq+PjS0LYXosyu8EUme3/m7MGsy+xIebI5Rqp5mloDQz7mVvJQw1n3vh3 2WbJQTlh+6tsjUlmMLjzX5pMKn9jFTyU/VJzdezZnWkMJ2Sxf3c89NzFDjjy9hga YfN4XiEgKcL8tmbPahcGQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=ie1e949a3.fm3; t= 1681736361; x=1681736961; bh=2NZbhL7tjJaNUxYqL9byU5qKMZUlP07NY/n o4LnIiOo=; b=Vz84V/d4N3LeFd7pJhTBSr0n7laggwbDNEthKB2s3Mc86FwGqDK eX8sPzuuU4HfrT7TG8vIwClEzljXXNEMPA8hvIqdHhG6pw07CLuL8TspNX81r8+T YJjFXaUw+smWG5wrwDU9tOo7jG10/wiD9wrpTCItcW2LojIMvJIzHqMftXBmLNC6 s6/ZdJ3H6nU4Q2nrKAUhiPPNbQKMKhMOcuJgWU2D/R0hE3YwEHOi+JESnOfYiWKO jQcEJ8J1yGevRCP2GEAoOr0xQE5oscs3dhvkIClplt48zRfilcmJ0oQtVQA3nPBy YE3jZq9dAQxh8igRKMxAFhYBksR/IBG5EkQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeliedgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefuhhhinhdkihgthhhirhhoucfmrgifrghsrghkihcuoehs hhhinhhitghhihhrohesfhgrshhtmhgrihhlrdgtohhmqeenucggtffrrghtthgvrhhnpe fggfegffejgeefueetgeeukedvhfeludfhhefftdeitdfhteelieefiefhueekgeenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehshhhinhhitg hhihhrohesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: ie1e949a3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Apr 2023 08:59:20 -0400 (EDT) From: Shin'ichiro Kawasaki To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org Cc: Shin'ichiro Kawasaki , Shin'ichiro Kawasaki Subject: [PATCH blktests 6/9] scsi/005: allow to run with built-in scsi_debug Date: Mon, 17 Apr 2023 21:59:10 +0900 Message-Id: <20230417125913.458726-2-shinichiro@fastmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230417125913.458726-1-shinichiro@fastmail.com> References: <20230417125913.458726-1-shinichiro@fastmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Shin'ichiro Kawasaki To allow the test case run with build-in scsi_debug, replace '_have_module scsi_debug' with _have_scsi_debug, and replace _init_scsi_debug with _configure_scsi_debug. Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Chaitanya Kulkarni --- tests/scsi/005 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/scsi/005 b/tests/scsi/005 index efd3d82..bfa1014 100755 --- a/tests/scsi/005 +++ b/tests/scsi/005 @@ -11,7 +11,7 @@ DESCRIPTION="test SCSI device blacklisting" QUICK=1 requires() { - _have_module scsi_debug + _have_scsi_debug _have_module_param scsi_debug inq_vendor } @@ -33,7 +33,7 @@ test() { for inq in "${inqs[@]}"; do vendor="${inq:0:8}" model="${inq:8:16}" - if ! _init_scsi_debug inq_vendor="$vendor" inq_product="$model"; then + if ! _configure_scsi_debug inq_vendor="$vendor" inq_product="$model"; then continue fi vendor="$(cat "/sys/block/${SCSI_DEBUG_DEVICES[0]}/device/vendor")" From patchwork Mon Apr 17 12:59:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shin'ichiro Kawasaki X-Patchwork-Id: 13213986 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E53CCC77B72 for ; Mon, 17 Apr 2023 13:04:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231417AbjDQNEM (ORCPT ); Mon, 17 Apr 2023 09:04:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230445AbjDQNDq (ORCPT ); Mon, 17 Apr 2023 09:03:46 -0400 Received: from wnew3-smtp.messagingengine.com (wnew3-smtp.messagingengine.com [64.147.123.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E134E2694; Mon, 17 Apr 2023 06:00:48 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.west.internal (Postfix) with ESMTP id DE7432B06736; Mon, 17 Apr 2023 08:59:24 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 17 Apr 2023 08:59:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1681736364; x= 1681736964; bh=3MYpSnaVDohgO0A6g9VDdRLlAof0SUXov2aX/Aa7Rro=; b=r 5bcdBLUG2dhF37VhsL2DQJv6sz4MvB1+sPPmIOmRJ8yEHEtTRg1Ew0nrFhoJt3ln S9oi0Aw8H1RVC789SGTl9M+VJaFLx8rSDdV6bb2nmWI8W/PeWaB60Wu9PIQJOjSo lhOtQhY88f3nYhBAZMW2XhSdV9Sg8eRErlNWeLDK4380dlAUJfr6Abaj2UjciL/3 99Z/iL15I7pOksVs2bJdFrMQykG2bNTufAVQlETZCltl3FmNC4KdxFQUqa596B95 RgZfhOWpMGedTUwCV3WBS6pwnBqBOuwYIThbdLCpoyohY44o1RJnbCqis5v07htc +REWLYbIC8MGg82S23VfA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=ie1e949a3.fm3; t= 1681736364; x=1681736964; bh=3MYpSnaVDohgO0A6g9VDdRLlAof0SUXov2a X/Aa7Rro=; b=E2cBV1XcVxeUqVtgh9cClxxpeonEfrQEUsBb6Tp+JL7rf31lNhv AJ0UXZoLu2iu0/dVfukKUMj2W/dm6SWuXdnbWTc8Mmnll4W6kOOk/aoQCv/d3C2w qKXxic43O7CBba4sruPl1JSVLNbt8jW4MABas6EhFN4oHBWSEJ05uoswny66hjbl xT9rkOonoPXXmIlTlLmpRZ5lXoImbCn9SOkH5JMSXUi7AacVKOFyTuZlxjLrEAIB eex0WSUxUpM+z4c3beA0kGmyp+F+K4E7+I3gO/BT2zuzj030BCF9FcmJupPm9EKH bbYlMOMzes4tvBeMivqh7ePa28xZGlmZJJw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeliedgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefuhhhinhdkihgthhhirhhoucfmrgifrghsrghkihcuoehs hhhinhhitghhihhrohesfhgrshhtmhgrihhlrdgtohhmqeenucggtffrrghtthgvrhhnpe fggfegffejgeefueetgeeukedvhfeludfhhefftdeitdfhteelieefiefhueekgeenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehshhhinhhitg hhihhrohesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: ie1e949a3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Apr 2023 08:59:22 -0400 (EDT) From: Shin'ichiro Kawasaki To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org Cc: Shin'ichiro Kawasaki , Shin'ichiro Kawasaki Subject: [PATCH blktests 7/9] block/001: allow to run with built-in scsi_debug and sd_mod Date: Mon, 17 Apr 2023 21:59:11 +0900 Message-Id: <20230417125913.458726-3-shinichiro@fastmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230417125913.458726-1-shinichiro@fastmail.com> References: <20230417125913.458726-1-shinichiro@fastmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Shin'ichiro Kawasaki To allow the test case run with build-in scsi_debug, replace '_have_module scsi_debug' with _have_scsi_debug, and replace _init_scsi_debug with _configure_scsi_debug. Also, to allow the test case run with build-in sd_mod, replace '_have_module sd_mod' with '_have_kernel_option BLK_DEV_SD'. When sd_mod driver is built-in, /sys/module/sd_mod directory is not created. Then _have_driver() can not detect availability of the driver. Instead, refer the kernel config to check availability of the driver. Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Chaitanya Kulkarni --- tests/block/001 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/block/001 b/tests/block/001 index 2ea3754..32dd22f 100755 --- a/tests/block/001 +++ b/tests/block/001 @@ -13,13 +13,13 @@ DESCRIPTION="stress device hotplugging" TIMED=1 requires() { - _have_module scsi_debug - _have_driver sd_mod + _have_scsi_debug + _have_kernel_option BLK_DEV_SD _have_driver sr_mod } stress_scsi_debug() { - if ! _init_scsi_debug "$@"; then + if ! _configure_scsi_debug "$@"; then return fi From patchwork Mon Apr 17 12:59:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shin'ichiro Kawasaki X-Patchwork-Id: 13213995 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35766C77B7E for ; Mon, 17 Apr 2023 13:12:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229963AbjDQNMW (ORCPT ); Mon, 17 Apr 2023 09:12:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230489AbjDQNLn (ORCPT ); Mon, 17 Apr 2023 09:11:43 -0400 Received: from wnew3-smtp.messagingengine.com (wnew3-smtp.messagingengine.com [64.147.123.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC0185BB6; Mon, 17 Apr 2023 06:11:06 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.west.internal (Postfix) with ESMTP id 8AEB32B06737; Mon, 17 Apr 2023 08:59:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 17 Apr 2023 08:59:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1681736367; x= 1681736967; bh=F5pvrPFkViYfQ8iLbFVuREU31vxnXU/CgJoVzwvbI4g=; b=g End5n9DIPkPPY5gCCpCaJCqkJeBwxBPuYH4TQXpmLzobuwm0HTmNmuVSVVGTz5LO CFpMgobiVfvZVsXh1q9irl+nbarXwIzFneJztf638eVNTVsOtgH9MmStdgLkto3c Gxgw8+i5DgUa0yptHUdtITmco2kVCK4996fnaWdDfsAIiUDu6JgMy2jinGCo1Oiu zmznR0ktN3vtU4ECBRg+2o4ePdaWdtAlX2+5tHgricf/Iam/EktdGVsae+LLbqo4 jR//IGmklhAdGd7SuaWe0XOk9eCm0TVGME/7zcU1bTyYuKRvH7fhwlxBx9RsJBrg cPILCVNPfjr8LV5HwhOKQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=ie1e949a3.fm3; t= 1681736367; x=1681736967; bh=F5pvrPFkViYfQ8iLbFVuREU31vxnXU/CgJo VzwvbI4g=; b=jiizKRIqGyaNp+PZCq7a+pskTqNyhB27RbhVq7vm4nwf+1LJktU 4EUHiOWVNnbe4O3+Y7Ie7LOXQxfh5lcdjTEh2Eq26CnNA/Qj8XZEIAq69ZR/hZhj B00mssy/PB0OY5YC49fxa/3CHwzQ/p/PCypoJP1oaNizuy5GJZ7/NDrbjn7VmlCS ve3CFaTEwgVLoFxK/C+dq8TczHk1Q9Kni5/EaVHTR1sjEUyFaKvd7ndjwVUOlqtk ikeZcPL3TkKzgcpv6DE+rXGhnnMHSYRSSwiXAkJnwKAZvVld71RC4a7HyTkTEU6D xXHyQ543V6a7AgkXCG5oVhrHCAHcZXT0xww== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeliedgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefuhhhinhdkihgthhhirhhoucfmrgifrghsrghkihcuoehs hhhinhhitghhihhrohesfhgrshhtmhgrihhlrdgtohhmqeenucggtffrrghtthgvrhhnpe fggfegffejgeefueetgeeukedvhfeludfhhefftdeitdfhteelieefiefhueekgeenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehshhhinhhitg hhihhrohesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: ie1e949a3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Apr 2023 08:59:25 -0400 (EDT) From: Shin'ichiro Kawasaki To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org Cc: Shin'ichiro Kawasaki , Shin'ichiro Kawasaki Subject: [PATCH blktests 8/9] block/002: allow to run with built-in scsi_debug Date: Mon, 17 Apr 2023 21:59:12 +0900 Message-Id: <20230417125913.458726-4-shinichiro@fastmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230417125913.458726-1-shinichiro@fastmail.com> References: <20230417125913.458726-1-shinichiro@fastmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Shin'ichiro Kawasaki To allow the test case run with build-in scsi_debug, replace '_have_module scsi_debug' with _have_scsi_debug, and replace _init_scsi_debug with _configure_scsi_debug. Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Chaitanya Kulkarni --- tests/block/002 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/block/002 b/tests/block/002 index a5f3ee5..b16d014 100755 --- a/tests/block/002 +++ b/tests/block/002 @@ -13,13 +13,13 @@ QUICK=1 requires() { _have_blktrace - _have_module scsi_debug + _have_scsi_debug } test() { echo "Running ${TEST_NAME}" - if ! _init_scsi_debug delay=0; then + if ! _configure_scsi_debug delay=0; then return 1 fi From patchwork Mon Apr 17 12:59:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shin'ichiro Kawasaki X-Patchwork-Id: 13213988 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6FDB2C77B70 for ; Mon, 17 Apr 2023 13:05:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229585AbjDQNFW (ORCPT ); Mon, 17 Apr 2023 09:05:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231183AbjDQNEh (ORCPT ); Mon, 17 Apr 2023 09:04:37 -0400 Received: from wnew3-smtp.messagingengine.com (wnew3-smtp.messagingengine.com [64.147.123.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 682CC1258B; Mon, 17 Apr 2023 06:01:35 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id 7BC6E2B06780; Mon, 17 Apr 2023 08:59:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 17 Apr 2023 08:59:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1681736370; x= 1681736970; bh=HzfCDp89CrHADm8uM7DAlH9ew8Q9RFNHbSn77EFsrrs=; b=D 8UgMpeWU7PyWGFFGtFvKdDr1GKnPYSg/y0uTVCHzyeBPRo4QGm+7qfeNCJtDUmyz 4pjjpVcToS23VBFGlTPq7p8k+leVETUhwYHchFTsSR36YIWsmi3xq0HaXZq4pHO/ wwpVXzeoYYgF1kz1e7yPQcDJSjRdYJ92kjLU2/AuiTKAx1eU2viVdqryoiIYaVWE NJhkaI8Vvi4DrX3b6dXQWr4Wv1H0VdNkKaqMt19mXhtthZ9LP5HJsGlEEwf8Vjnh JtP0Hxq0Lx6SNgv41fjdgWrvSXJvj3xKA8AZjD5tlAyctIWGoCs8QGe+FVulx09K VaC4YBrmcBbUj1flDtvgg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=ie1e949a3.fm3; t= 1681736370; x=1681736970; bh=HzfCDp89CrHADm8uM7DAlH9ew8Q9RFNHbSn 77EFsrrs=; b=WzCifZArPgtaQRkd9zNLlrmpObUhMH1oZRs8Hxlx4UQktSnrQty Gyn8zEu9QGnpDh1gv3fyh5a5rGCE+alMfQeF22a/sCs1f75t4aJED40OUYYEhJkL pVa0FAUbFfmqHH4yWneHEwrSj4T9gs6r+RsdsfsBVBnaOrFvSiK3r7bcNcrG5CyF YR2jOQvMUdRbyscyxfQTo5opoEefpVWbJ2z1q9mMrL3EzxBgZ467jvbl1orryj8q uwBvxi6kOTLfohvhDDOTh56ylhi4fX5JnT/bFbzqbU7LAgyv6FOxHFG1JHAQhRlI Rix2J4S1ln/Tj6WNuFuEgXfpTdT/nCg8BAw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeliedgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefuhhhinhdkihgthhhirhhoucfmrgifrghsrghkihcuoehs hhhinhhitghhihhrohesfhgrshhtmhgrihhlrdgtohhmqeenucggtffrrghtthgvrhhnpe fggfegffejgeefueetgeeukedvhfeludfhhefftdeitdfhteelieefiefhueekgeenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehshhhinhhitg hhihhrohesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: ie1e949a3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Apr 2023 08:59:28 -0400 (EDT) From: Shin'ichiro Kawasaki To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org Cc: Shin'ichiro Kawasaki , Shin'ichiro Kawasaki Subject: [PATCH blktests 9/9] block/027: allow to run with built-in scsi_debug Date: Mon, 17 Apr 2023 21:59:13 +0900 Message-Id: <20230417125913.458726-5-shinichiro@fastmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230417125913.458726-1-shinichiro@fastmail.com> References: <20230417125913.458726-1-shinichiro@fastmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Shin'ichiro Kawasaki To allow the test case run with build-in scsi_debug, replace '_have_module scsi_debug' with _have_scsi_debug, and replace _init_scsi_debug with _configure_scsi_debug. Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Chaitanya Kulkarni --- tests/block/027 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/block/027 b/tests/block/027 index ab6369b..a79a115 100755 --- a/tests/block/027 +++ b/tests/block/027 @@ -20,12 +20,12 @@ CAN_BE_ZONED=1 requires() { _have_cgroup2_controller io - _have_module scsi_debug + _have_scsi_debug _have_fio } scsi_debug_stress_remove() { - if ! _init_scsi_debug "$@"; then + if ! _configure_scsi_debug "$@"; then return fi