linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org, eguan@redhat.com,
	fstests@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: [PATCH 06/13] xfs: fix $XFS_DB_PROG usage
Date: Fri, 2 Sep 2016 07:34:00 +1000	[thread overview]
Message-ID: <20160901213400.GW22388@dastard> (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.

I hadn't looked at this until now, but....

> diff --git a/tests/xfs/001 b/tests/xfs/001
> index c33adae..e1e1411 100755
> --- a/tests/xfs/001
> +++ b/tests/xfs/001
> @@ -44,11 +44,11 @@ _do_bit_test()
>  	bits="$2"
>  
>  	echo "testing $field with $bits bits"
> -	$XFS_DB_PROG -x -c "inode $FILE_INO" -c "write $field 0" $SCRATCH_DEV
> +	$XFS_DB_PROG -x -c "inode $FILE_INO" -c "write $field 0" `_scratch_xfs_db_options`

*yuck*

We are going to be getting that wrong -all the time-.

I'd suggest changing these to

	_scratch_xfs_db <command string>

and

_scratch_xfs_db()
{
	$XFS_DB_PROG $* `_scratch_xfs_db_options`
}

And hiding everything to do with devices completely i a much cleaner
and more maintainable solution to the problem.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

  parent reply	other threads:[~2016-09-01 21:34 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
2016-09-01 21:34   ` Dave Chinner [this message]
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=20160901213400.GW22388@dastard \
    --to=david@fromorbit.com \
    --cc=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).