From patchwork Tue May 8 16:53:59 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: 10386559 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 C8A6C6037F for ; Tue, 8 May 2018 16:54:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6F7128EA8 for ; Tue, 8 May 2018 16:54:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A9ED728ED0; Tue, 8 May 2018 16:54:07 +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 1AD5728EA8 for ; Tue, 8 May 2018 16:54:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933022AbeEHQyG (ORCPT ); Tue, 8 May 2018 12:54:06 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:51708 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932606AbeEHQyF (ORCPT ); Tue, 8 May 2018 12:54:05 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w48GpxBR094206; Tue, 8 May 2018 16:54:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : mime-version : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=sIWnoabX64uiyBn9Kwy0+rqJHr4aGJV7vjd4+K71fNg=; b=U8dtfPSm+zqnQGY/sc6H9RUk5rsmCerN7Vou0YQtJbfgYRZBDCtBLMk1ww9OFQCqb586 IB/Zan4l7tV3qnbNQvt4Y22qTF08HH2fFHWP0w4itN0q6mM6DgxYIvoFyR4/kF5YVTeg knZXe1nC0LrajTohifF8jm/GMguPzDAcZ3cmq/LxjkkbY+sTRZtJcCIh38wXZFKd3HAa W8KUM+m078EOxZPki0H+Y93JTG+ymLyg3c5fsMTpM80PRqftRaeizhaQsuarDBO/1/mJ mZRcr/j6RagMfbanBtkBkhtzQG+L/F3PJBJWHFBs+jZ91vEXBro2MNwXuby3WkJbid/E Ng== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2120.oracle.com with ESMTP id 2hs4k29hnr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 08 May 2018 16:54:03 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w48Gs1G0014822 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 8 May 2018 16:54:01 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w48Gs1T9009223; Tue, 8 May 2018 16:54:01 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 08 May 2018 09:54:00 -0700 Subject: [PATCH 1/2] xfs: checkbashisms in all script files From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, sandeen@sandeen.net, fstests@vger.kernel.org Date: Tue, 08 May 2018 09:53:59 -0700 Message-ID: <152579843989.18959.14108003206856326245.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8887 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=815 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805080162 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 --- 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 32bf4f71..633dca0c 100644 --- a/tests/xfs/group +++ b/tests/xfs/group @@ -442,3 +442,4 @@ 443 auto quick ioctl fsr 444 auto quick 445 auto quick filestreams +711 auto quick