From patchwork Tue Feb 12 02:17:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10807215 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 6AFB41575 for ; Tue, 12 Feb 2019 02:17:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55E0F2B2BC for ; Tue, 12 Feb 2019 02:17:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4A8002B2C7; Tue, 12 Feb 2019 02:17:53 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY 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 E899F2B2BC for ; Tue, 12 Feb 2019 02:17:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727686AbfBLCRw (ORCPT ); Mon, 11 Feb 2019 21:17:52 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:49964 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727265AbfBLCRw (ORCPT ); Mon, 11 Feb 2019 21:17:52 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x1C2FrjW031266; Tue, 12 Feb 2019 02:17:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=lOPVf0qRNMbWx6y4BO3jp7AHXfTNGlU9Yj3uRq5bA3E=; b=HfjcT7UXeLSJ3Xkj/7ccT0WqxO+qjg3V0EgiVlXiz56G0hQ5yltCngL0DE2t+Nkp+wfx VZnJuVF+QBywKzFwZ4h06pVz2fdMAGej3YTsfM0X+PDoSYJ2lfRgqiWv8+YnfwZX1BlV sPy2n/ZNIeQitWxUNuyvn0w2iKtHUzaHhhuKUsnQuq2BhE9k7kwZBCO3WIdxZQNVH4vu AyU8kWweHLcGj9qVxfKyyqcP8I58jo7qXfPMMP+RpMLVAcIdtELMWDmEfYyFH/9AVs3K lRPmFD113Mxx76/i5jDDbY14eBgXNdl1E/S0JVIBOeYVlDcIwKkDiJdd5R4jN3hgknYw 0Q== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2qhredsace-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Feb 2019 02:17:50 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x1C2HnE6010944 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Feb 2019 02:17:49 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x1C2HnMu021941; Tue, 12 Feb 2019 02:17:49 GMT Received: from localhost (/10.159.237.14) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 11 Feb 2019 18:17:49 -0800 Subject: [PATCH 1/2] inject: skip tests when knob dir exists but knob doesn't From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 11 Feb 2019 18:17:48 -0800 Message-ID: <154993786856.2062.15965021741779968907.stgit@magnolia> In-Reply-To: <154993786231.2062.8490515215533507881.stgit@magnolia> References: <154993786231.2062.8490515215533507881.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9164 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=851 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902120014 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong If the XFS error injection knob directory exists but the knob itself doesn't, then we know that this kernel doesn't support the knob and can skip the test. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster --- common/inject | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/inject b/common/inject index 903fb379..984ec209 100644 --- a/common/inject +++ b/common/inject @@ -62,6 +62,13 @@ _require_xfs_io_error_injection() knob="$(_find_xfs_mountdev_errortag_knob "${TEST_DEV}" "${type}")" test -w "${knob}" && return + # If the directory containing the sysfs error injection knob exists + # but the knob itself isn't usable, this kernel doesn't know about + # the knob. Skip the test. + if [ -d "$(dirname "${knob}")" ]; then + _notrun "XFS error injection $type unknown on this kernel." + fi + # NOTE: We can't actually test error injection here because xfs # hasn't always range checked the argument to xfs_errortag_add. # We also don't want to trip an error before we're ready to deal