All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: david@fromorbit.com, 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 15:37:31 +0800	[thread overview]
Message-ID: <20160901073731.GA27776@eguan.usersys.redhat.com> (raw)
In-Reply-To: <147216773738.32641.691363173215857168.stgit@birch.djwong.org>

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.

Thanks,
Eryu

WARNING: multiple messages have this Message-ID (diff)
From: Eryu Guan <eguan@redhat.com>
To: "Darrick J. Wong" <darrick.wong@oracle.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 15:37:31 +0800	[thread overview]
Message-ID: <20160901073731.GA27776@eguan.usersys.redhat.com> (raw)
In-Reply-To: <147216773738.32641.691363173215857168.stgit@birch.djwong.org>

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.

Thanks,
Eryu

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

  reply	other threads:[~2016-09-01  7:37 UTC|newest]

Thread overview: 39+ 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 ` 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   ` 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   ` 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   ` 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   ` 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   ` Darrick J. Wong
2016-08-25 23:28 ` [PATCH 06/13] xfs: fix $XFS_DB_PROG usage Darrick J. Wong
2016-08-25 23:28   ` Darrick J. Wong
2016-09-01  7:37   ` Eryu Guan [this message]
2016-09-01  7:37     ` Eryu Guan
2016-09-01 15:57     ` Darrick J. Wong
2016-09-01 15:57       ` Darrick J. Wong
2016-09-01 21:34   ` Dave Chinner
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   ` Darrick J. Wong
2016-08-25 23:29 ` [PATCH 08/13] xfs: more rmapbt tests Darrick J. Wong
2016-08-25 23:29   ` Darrick J. Wong
2016-09-01  8:33   ` Eryu Guan
2016-09-01  8:33     ` Eryu Guan
2016-09-04 17:40     ` Darrick J. Wong
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-08-25 23:29   ` 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   ` 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   ` 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
2016-08-25 23:29   ` 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=20160901073731.GA27776@eguan.usersys.redhat.com \
    --to=eguan@redhat.com \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.