From patchwork Tue Sep 22 08:08:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Jensen X-Patchwork-Id: 11791809 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9D6EB112E for ; Tue, 22 Sep 2020 08:15:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0B3AE23A1E for ; Tue, 22 Sep 2020 08:15:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726620AbgIVIPz (ORCPT ); Tue, 22 Sep 2020 04:15:55 -0400 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:50925 "EHLO new4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726483AbgIVIPz (ORCPT ); Tue, 22 Sep 2020 04:15:55 -0400 X-Greylist: delayed 424 seconds by postgrey-1.27 at vger.kernel.org; Tue, 22 Sep 2020 04:15:54 EDT Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailnew.nyi.internal (Postfix) with ESMTP id 25E985803A0; Tue, 22 Sep 2020 04:08:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Tue, 22 Sep 2020 04:08:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irrelevant.dk; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm1; bh=+sAu8ps52bLSAa5FgjUvW8bW6P OzBijBGCvyvIRLYyQ=; b=B2VD8M1N3d7S0lxNURdeocMfx0KFMxkyjZd9+ogUs3 v5EGjN83aJkbD2cs1I9VrLs0KZK34p2QjhW/ZZ4VGZhCpcqv6T4ibteBHhzKXfWK W83OhDJPQtjKOEoWntqfRge5GAGPa09ZN9MNVrxS5nQ9o/PYLNQe3sJCQqbqignM UbS4VVQSNYbE/pO7xF4bAG9eWQ0S56CblxZszCaF6vZiEVO1++Z0ug8QKu38VjML XEI+Nirh7eGIu0Xo32e9Z7vrlhR0/xwymbVe2QAJcZT5SnkwLj3SckKcdKlG6CAy Zy0nZvSAOVXq9b3WUZEiX/qzsglqpRxTfaHF+65rDGLQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=+sAu8ps52bLSAa5Fg jUvW8bW6POzBijBGCvyvIRLYyQ=; b=VW7ADeXGd8yL51lLndaDt+LJIkLV5BPP+ vxraHiUjW3JxVqUddU2X/mqL7q65UyPNek3UfC0lLF+OzAtXI08NhQncgFAtc4iH 4oOx1BD0ZAEYXeOI4DxcjQWhi5Tk8OFFFySQJgC7K8gyKk84uHX2Wsokhm193JF/ I/SIu3dTfbGdZMwl2DpfYpx7TZQ1WwnFSrFddFJnO2BvCW68Gb2nmEZcG4gojNs0 b9i04usBjlkayEmkXcjTlCCyFpqPBvoh+Gp2uf21OjF9MMDBaU4qOImF0tfUo4fT b1YwfwWO1srCCJKCNsIJz+M8QCEFQQJ5aky6B2s6TR/vgC1It9mdQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeggddtudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepmfhlrghushculfgv nhhsvghnuceoihhtshesihhrrhgvlhgvvhgrnhhtrdgukheqnecuggftrfgrthhtvghrnh epfeevledvieekudeuffetgeegfeehvdffffejueeuleduhedvgeejveejhfdtteehnecu kfhppeektddrudeijedrleekrdduledtnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepihhtshesihhrrhgvlhgvvhgrnhhtrdgukh X-ME-Proxy: Received: from apples.local (80-167-98-190-cable.dk.customer.tdc.net [80.167.98.190]) by mail.messagingengine.com (Postfix) with ESMTPA id DC4ED306467E; Tue, 22 Sep 2020 04:08:47 -0400 (EDT) From: Klaus Jensen To: linux-block@vger.kernel.org Cc: Omar Sandoval , Klaus Jensen , Keith Busch , Johannes Thumshirn Subject: [PATCH blktests] block/011: remove and rescan for evicted device Date: Tue, 22 Sep 2020 10:08:43 +0200 Message-Id: <20200922080843.1249290-1-its@irrelevant.dk> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Klaus Jensen Devices that actually honor the Bus Master Enable bit and considers the resulting failure to read/write a fatal error, often ends up getting disabled by the kernel when running block/011. Remove the device and rescan the pci bus after completing the test to make sure we bring the device back up if required. Cc: Keith Busch Cc: Johannes Thumshirn Signed-off-by: Klaus Jensen --- tests/block/011 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/block/011 b/tests/block/011 index 4f331b4a7522..f1306ae3896f 100755 --- a/tests/block/011 +++ b/tests/block/011 @@ -22,6 +22,7 @@ test_device() { echo "Running ${TEST_NAME}" pdev="$(_get_pci_dev_from_blkdev)" + sysfs="/sys/bus/pci/devices/${pdev}" if _test_dev_is_rotational; then size="32m" @@ -42,4 +43,8 @@ test_device() { done echo "Test complete" + + # bring the device back up if it was disabled by the kernel + echo 1 > "${sysfs}/remove" + echo 1 > /sys/bus/pci/rescan }