linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eryu Guan <eguan@redhat.com>
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: [PATCH 06/13] xfs: fix $XFS_DB_PROG usage
Date: Thu, 1 Sep 2016 08:57:36 -0700	[thread overview]
Message-ID: <20160901155736.GA25818@birch.djwong.org> (raw)
In-Reply-To: <20160901073731.GA27776@eguan.usersys.redhat.com>

On Thu, Sep 01, 2016 at 03:37:31PM +0800, Eryu Guan wrote:
> On Thu, Aug 25, 2016 at 04:28:57PM -0700, Darrick J. Wong wrote:
> > xfs_db requires us to pass in the log device, if any; this can be
> > accomplished via _scratch_xfs_db_options (if we're operating on the
> > scratch device, anyway).  However, many of the tests/xfs/ scripts
> > pass only $SCRATCH_DEV directly, so they'll fail if we test with an
> > external log.  So, fix that.
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > ---
> [snip]
> > diff --git a/tests/xfs/111 b/tests/xfs/111
> > index f6a41a8..4899020 100755
> > --- a/tests/xfs/111
> > +++ b/tests/xfs/111
> > @@ -64,7 +64,7 @@ INO=`ls -i $SCRATCH_MNT/512 | awk '{print $1}'`
> >  _scratch_unmount
> >  
> >  # Figure out where that middle inode starts
> > -BYTE=`$XFS_DB_PROG -c "convert inode $INO byte" $SCRATCH_DEV \
> > +BYTE=`$XFS_DB_PROG -c "convert inode $INO byte" `_scratch_xfs_db_options` \
> 
> This has syntax error because of the nested ``, $SCRATCH_DEV is already
> within a ``. Replace `` with $() could fix it.
> 
> -BYTE=`$XFS_DB_PROG -c "convert inode $INO byte" `_scratch_xfs_db_options` \
> +BYTE=`$XFS_DB_PROG -c "convert inode $INO byte" $(_scratch_xfs_db_options) \
> 
> [snip]
> 
> > diff --git a/tests/xfs/186 b/tests/xfs/186
> > index 192a8c8..347db0d 100755
> > --- a/tests/xfs/186
> > +++ b/tests/xfs/186
> > @@ -98,8 +98,8 @@ _print_inode()
> >  {
> >  	echo ""
> >  	echo "================================="
> > -	$XFS_DB_PROG -c "version" $SCRATCH_DEV 2>&1 | _filter_version
> > -	$XFS_DB_PROG -c "inode $inum" -c p $SCRATCH_DEV 2>&1 | _filter_inode
> > +	$XFS_DB_PROG -c "version" `_scratch_xfs_db_options` 2>&1 | _filter_version
> > +	$XFS_DB_PROG -c "inode $inum" -c p `_scratch_xfs_db_options` 2>&1 | _filter_inode
> >  	echo "================================="
> >  }
> >  
> > @@ -136,7 +136,7 @@ _changeto_attr1()
> >  	echo ""
> >  	echo "Try setting attr1 by db"
> >  	echo ""
> > -	$XFS_DB_PROG -x -c "version attr1" $SCRATCH_DEV | _filter_version
> > +	$XFS_DB_PROG -x -c "version attr1" `_scratch_xfs_db_options` | _filter_version
> >  }
> >  
> >  # get standard environment, filters and checks
> > @@ -173,7 +173,7 @@ fi
> >  
> >  # set inum to root dir ino
> >  # we'll add in dirents and EAs into the root directory
> > -eval `$XFS_DB_PROG -r -c 'sb 0' -c 'p rootino' $SCRATCH_DEV | $SED_PROG 's/ //g'`
> > +eval `$XFS_DB_PROG -r -c 'sb 0' -c 'p rootino' `_scratch_xfs_db_options` | $SED_PROG 's/ //g'`
> 
> And here.
> 
> I can fix them at commit time.

I actually found more files that needed fixing, so I'll resubmit with
the extra fixes + the two fixes above.  Thank you for the review!

--D

> 
> Thanks,
> Eryu

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2016-09-01 15:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-25 23:28 [PATCH v8 00/13] xfstests: fixes and new tests for rmap/reflink/fsmap Darrick J. Wong
2016-08-25 23:28 ` [PATCH 01/13] tests/xfs: don't run tests if cowextsize isn't present Darrick J. Wong
2016-08-25 23:28 ` [PATCH 02/13] xfs/122: decrease the log update done item sizes Darrick J. Wong
2016-08-25 23:28 ` [PATCH 03/13] xfs/{130,235}: deal with an unreplayable dirty log Darrick J. Wong
2016-08-25 23:28 ` [PATCH 04/13] generic/159, 160: deal with EACCESS -> EPERM transition Darrick J. Wong
2016-08-25 23:28 ` [PATCH 05/13] xfs/122: test btree header block sizes Darrick J. Wong
2016-08-25 23:28 ` [PATCH 06/13] xfs: fix $XFS_DB_PROG usage Darrick J. Wong
2016-09-01  7:37   ` Eryu Guan
2016-09-01 15:57     ` Darrick J. Wong [this message]
2016-09-01 21:34   ` Dave Chinner
2016-08-25 23:29 ` [PATCH 07/13] xfs: test swapext with reflink Darrick J. Wong
2016-08-25 23:29 ` [PATCH 08/13] xfs: more rmapbt tests Darrick J. Wong
2016-09-01  8:33   ` Eryu Guan
2016-09-04 17:40     ` Darrick J. Wong
2016-08-25 23:29 ` [PATCH 09/13] xfs: test realtime rmapbt code Darrick J. Wong
2016-09-08 10:19   ` Eryu Guan
2016-09-08 15:39     ` Darrick J. Wong
2016-08-25 23:29 ` [PATCH 10/13] xfs: test getfsmap ioctl Darrick J. Wong
2016-08-25 23:29 ` [PATCH 11/13] xfs: test getbmapx shared extent reporting Darrick J. Wong
2016-08-25 23:29 ` [PATCH 12/13] xfs/122: track xfs_scrub_metadata Darrick J. Wong
2016-08-25 23:29 ` [PATCH 13/13] xfs/122: check the ag reservation counter ioctl 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=20160901155736.GA25818@birch.djwong.org \
    --to=darrick.wong@oracle.com \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=xfs@oss.sgi.com \
    /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).