From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eryu Guan <guaneryu@gmail.com>
Cc: linux-xfs@vger.kernel.org, sandeen@sandeen.net, fstests@vger.kernel.org
Subject: Re: [PATCH 8/9] xfs: checkbashisms in all script files
Date: Wed, 2 May 2018 07:59:37 -0700 [thread overview]
Message-ID: <20180502145937.GT4127@magnolia> (raw)
In-Reply-To: <20180502085503.GE29084@desktop>
On Wed, May 02, 2018 at 04:55:03PM +0800, Eryu Guan wrote:
> On Tue, May 01, 2018 at 08:40:10AM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> >
> > Find all the /bin/sh scripts in xfsprogs and check for bashisms.
> >
> > Cc: sandeen@sandeen.net
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
>
> Looks fine to me, but I'd like a review from Eric too, as it's a
> "maintainer script" :)
>
> > ---
> > 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
> >
> >
> > diff --git a/tests/xfs/711 b/tests/xfs/711
> > new file mode 100755
> > index 00000000..d3dc3cd4
> > --- /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 -name 'xfs*.sh' -print0 | xargs -0 grep '^#!/bin/sh' | sed -e 's/:.*$//g' | while read f; do
>
> Do we care about spaces between "#!" and "/bin/sh"? i.e. "#! /bin/sh",
> sometimes there can be space(s).
Yes, I suppose we do care and should look for '^#!.*/bin/bash'. I'll
also fix it to look only for files since that's all we care about.
--D
> Thanks,
> Eryu
>
> > + $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
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2018-05-02 14:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-01 15:39 [PATCH 0/9] misc. fstests changes Darrick J. Wong
2018-05-01 15:39 ` [PATCH 1/9] generic: test XATTR_REPLACE doesn't take the fs down Darrick J. Wong
2018-05-02 7:33 ` Eryu Guan
2018-05-02 14:50 ` Darrick J. Wong
2018-05-01 15:39 ` [PATCH 2/9] xfs/439: repair corrupted filesystem afterwards Darrick J. Wong
2018-05-02 7:51 ` Eryu Guan
2018-05-02 14:54 ` Darrick J. Wong
2018-05-03 1:15 ` Eryu Guan
2018-05-01 15:39 ` [PATCH 3/9] generic/45[34]: add unicode directional override checks Darrick J. Wong
2018-05-01 15:39 ` [PATCH 4/9] generic/45[34]: check unicode names only if xfs_scrub linked against libicu Darrick J. Wong
2018-05-01 15:39 ` [PATCH 5/9] generic/45[34]: test unicode confusables Darrick J. Wong
2018-05-01 15:39 ` [PATCH 6/9] generic/453: test creation of malicious directory entries Darrick J. Wong
2018-05-01 15:40 ` [PATCH 7/9] xfs/422: add fsstress to the freeze-and-rmap-repair race test Darrick J. Wong
2018-05-02 8:44 ` Eryu Guan
2018-05-02 14:55 ` Darrick J. Wong
2018-05-01 15:40 ` [PATCH 8/9] xfs: checkbashisms in all script files Darrick J. Wong
2018-05-02 8:55 ` Eryu Guan
2018-05-02 9:13 ` Jan Tulak
2018-05-02 14:59 ` Darrick J. Wong [this message]
2018-05-02 15:03 ` [PATCH v2 " Darrick J. Wong
2018-05-01 15:40 ` [PATCH 9/9] xfs: fix blocktrash fuzzers Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180502145937.GT4127@magnolia \
--to=darrick.wong@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=guaneryu@gmail.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@sandeen.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).