From patchwork Fri Mar 22 08:12:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi Zhang X-Patchwork-Id: 10865243 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 170D2139A for ; Fri, 22 Mar 2019 08:12:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 009082A295 for ; Fri, 22 Mar 2019 08:12:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E83E82A2CD; Fri, 22 Mar 2019 08:12:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A20552A295 for ; Fri, 22 Mar 2019 08:12:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727073AbfCVIMl (ORCPT ); Fri, 22 Mar 2019 04:12:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46556 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727516AbfCVIMl (ORCPT ); Fri, 22 Mar 2019 04:12:41 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AC636C04FFF0; Fri, 22 Mar 2019 08:12:41 +0000 (UTC) Received: from dhcp-12-135.nay.redhat.com (dhcp-12-135.nay.redhat.com [10.66.12.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id 876FA19C59; Fri, 22 Mar 2019 08:12:40 +0000 (UTC) From: Yi Zhang To: osandov@fb.com Cc: linux-block@vger.kernel.org Subject: [PATCH blktests] check: add zoned sysfs node checking in _test_dev_is_zoned Date: Fri, 22 Mar 2019 16:12:28 +0800 Message-Id: <20190322081228.21898-1-yi.zhang@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 22 Mar 2019 08:12:41 +0000 (UTC) Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some kernel may not have zoned sysfs node, e.g. RHEL7, checking if it exists first in _test_dev_is_zoned. Signed-off-by: Yi Zhang --- check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check b/check index f0ca382..459104d 100755 --- a/check +++ b/check @@ -405,7 +405,7 @@ _call_test() { } _test_dev_is_zoned() { - if grep -qe "none" "${TEST_DEV_SYSFS}/queue/zoned" ; then + if [[ ! -f "${TEST_DEV_SYSFS}/queue/zoned" ]] || grep -qe "none" "${TEST_DEV_SYSFS}/queue/zoned" ; then SKIP_REASON="${TEST_DEV} is not a zoned block device" return 1 fi