public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Eryu Guan <eguan@redhat.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] xfs/054: only filter ROOT_INO at the beginning
Date: Tue, 25 Oct 2016 16:50:16 +1100	[thread overview]
Message-ID: <20161025055016.GB14023@dastard> (raw)
In-Reply-To: <1477114796-19019-1-git-send-email-eguan@redhat.com>

On Sat, Oct 22, 2016 at 01:39:56PM +0800, Eryu Guan wrote:
> In the test ROOT_INO is filtered out or replaced, but if ROOT_INO is
> also 32, more "32"s are filtered or replaced than expected. This
> happens to me when testing 512B block size XFS and 1k block size CRC
> enabled XFS.
> 
> Also the ROOT_INO should be the inode number of TEST_DIR not
> SCRATCH_MNT.
> 
> Signed-off-by: Eryu Guan <eguan@redhat.com>
> ---
>  tests/xfs/054 | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/tests/xfs/054 b/tests/xfs/054
> index 7d08f8a..578b752 100755
> --- a/tests/xfs/054
> +++ b/tests/xfs/054
> @@ -52,13 +52,13 @@ _require_test
>  _require_xfs_io_command "inode"
>  
>  # We know the root inode is there
> -ROOT_INO=`ls -id $SCRATCH_MNT | awk '{print $1}'`
> +ROOT_INO=`ls -id $TEST_DIR | awk '{print $1}'`
>  
>  touch $TEST_DIR/file
>  
>  $XFS_IO_PROG -c "inode"       $TEST_DIR/file
>  $XFS_IO_PROG -c "inode -v"    $TEST_DIR/file | \
> -		grep -vw $ROOT_INO | sed -e s/.*:/LAST:/g
> +		grep -vw "^$ROOT_INO" | sed -e s/.*:/LAST:/g

So all of these sed expressions have the modifier "/g" on
them, which means "replace every matching occurrence on the line".
If all we want to do is replace the first match, then we should be
dropping the "g" modifier from the sed expressions...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2016-10-25  5:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-22  5:39 [PATCH] xfs/054: only filter ROOT_INO at the beginning Eryu Guan
2016-10-25  5:50 ` Dave Chinner [this message]
2016-10-25  7:11   ` Eryu Guan

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=20161025055016.GB14023@dastard \
    --to=david@fromorbit.com \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    /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