From patchwork Wed May 2 15:03:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10375823 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AE9E86038F for ; Wed, 2 May 2018 15:03:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9DCC827FB7 for ; Wed, 2 May 2018 15:03:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 926971FFFF; Wed, 2 May 2018 15:03:55 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, 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 1A7261FFFF for ; Wed, 2 May 2018 15:03:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751644AbeEBPDy (ORCPT ); Wed, 2 May 2018 11:03:54 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:51274 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751535AbeEBPDx (ORCPT ); Wed, 2 May 2018 11:03:53 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w42EuTit194131; Wed, 2 May 2018 15:03:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=+JJZIWzomvflkeF4iJS7K7C9wfnNryQQeNr6JZfUrVE=; b=BQ+U8guO+0egO9JKAbznHfly/YidG2iL4aXqS4KQbW8KrSw2KKzubha05x1/uv+Su89m 4u9viupKM9u8nKJTJhaeCdWttcEH3EJD1VGfUVHmgaH/4BUpcRk+RjCs4KaEJa2tJOmv aWP8DK0jCbFzbV92zS1qKrGoYKARSVNff4Ff7xOwg52xUIkoAlB+/BWZIrrvmPqvTwvv qsDrmTsfnyOaWiLcMk1fsvWSoD/Ur905rwgxcxGiVMAQsbkCRUH+h18XFMFB2r3rQPub jj+5/stpRhS3hJmwYNMo1jS2M9ikRIN+e18yG6HFjK1SMsUOvxtX14zmevRiQqKEeS3C ig== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2hmhmfm7bc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 02 May 2018 15:03:51 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w42F3oLQ002159 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 May 2018 15:03:50 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w42F3o8w011330; Wed, 2 May 2018 15:03:50 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 02 May 2018 08:03:49 -0700 Date: Wed, 2 May 2018 08:03:48 -0700 From: "Darrick J. Wong" To: sandeen@sandeen.net Cc: linux-xfs@vger.kernel.org, guaneryu@gmail.com, fstests@vger.kernel.org Subject: [PATCH v2 8/9] xfs: checkbashisms in all script files Message-ID: <20180502150348.GU4127@magnolia> References: <152518916007.23023.4793255395982876953.stgit@magnolia> <152518921090.23023.14958881774088486712.stgit@magnolia> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <152518921090.23023.14958881774088486712.stgit@magnolia> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8880 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=921 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805020124 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 Find all the /bin/sh scripts in xfsprogs and check for bashisms. Cc: sandeen@sandeen.net Signed-off-by: Darrick J. Wong --- v2: fix find and regex we look for --- tests/xfs/711 | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/711.out | 1 + tests/xfs/group | 1 + 3 files changed, 53 insertions(+) create mode 100755 tests/xfs/711 create mode 100644 tests/xfs/711.out -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/tests/xfs/711 b/tests/xfs/711 new file mode 100755 index 00000000..d15f3b9d --- /dev/null +++ b/tests/xfs/711 @@ -0,0 +1,51 @@ +#! /bin/bash +# FS QA Test No. 711 +# +# checkbashisms on all /bin/sh scripts. This is a maintainer script. +# +#----------------------------------------------------------------------- +# Copyright (c) 2018 Oracle, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +#----------------------------------------------------------------------- +# + +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 + +# get standard environment +. ./common/rc + +# real QA test starts here +_supported_fs xfs +_supported_os Linux +export CHECKBASHISMS_PROG="`set_prog_path checkbashisms`" +_require_command "$CHECKBASHISMS_PROG" checkbashisms + +test -z "$WORKAREA" && _notrun "Can't find xfsprogs source" + +rm -f $seqres.full + +find $WORKAREA -type f -name 'xfs*.sh' -print0 | xargs -0 grep '^#!.*/bin/sh' | sed -e 's/:.*$//g' | while read f; do + $CHECKBASHISMS_PROG $f +done + +status=0 diff --git a/tests/xfs/711.out b/tests/xfs/711.out new file mode 100644 index 00000000..52ff4745 --- /dev/null +++ b/tests/xfs/711.out @@ -0,0 +1 @@ +QA output created by 711 diff --git a/tests/xfs/group b/tests/xfs/group index 39e259e8..b7da3fba 100644 --- a/tests/xfs/group +++ b/tests/xfs/group @@ -443,3 +443,4 @@ 443 auto quick ioctl fsr 444 auto quick 445 auto quick filestreams +711 auto quick