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@xxxxxxxxxx>
> > ---
> [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
|