All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Anand Jain <anand.jain@oracle.com>
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org, fdmanana@gmail.com
Subject: Re: [PATCH v2] xfstests: btrfs: fix up 001.out
Date: Wed, 21 Jan 2015 15:26:27 +1100	[thread overview]
Message-ID: <20150121042627.GF16510@dastard> (raw)
In-Reply-To: <1420203869-26085-1-git-send-email-anand.jain@oracle.com>

On Fri, Jan 02, 2015 at 09:04:29PM +0800, Anand Jain wrote:
> The subvol delete output has changed with btrfs-progs
>     -Delete subvolume 'SCRATCH_MNT/snap'
>     +Delete subvolume (no-commit): 'SCRATCH_MNT/snap'
> 
> so fix 001 failing.
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> 
> v2: Thanks Filipe for mentioning now we have _run_btrfs_util_prog. and
>     commit update
> ---
>  tests/btrfs/001     | 2 +-
>  tests/btrfs/001.out | 1 -
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tests/btrfs/001 b/tests/btrfs/001
> index 8258d06..a7747c8 100755
> --- a/tests/btrfs/001
> +++ b/tests/btrfs/001
> @@ -99,7 +99,7 @@ echo "Listing subvolumes"
>  $BTRFS_UTIL_PROG subvolume list $SCRATCH_MNT | awk '{ print $NF }'
>  
>  # Delete the snapshot
> -$BTRFS_UTIL_PROG subvolume delete $SCRATCH_MNT/snap | _filter_btrfs_subvol_delete
> +_run_btrfs_util_prog subvolume delete $SCRATCH_MNT/snap

This is also the wrong way to fix the problem.

We have output filters for a reason, people:

_filter_btrfs_subvol_delete()
{
	_filter_scratch | _filter_transcation_commit_default
}

Simply becomes:

_filter_btrfs_subvol_delete()
{
	_filter_scratch | _filter_transcation_commit_default | \
		sed -e 's/^Delete subvolume.*:/Delete subvolume/'
}

The golden output does not change - the filter simply removes the
part of the message that changed between versions.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  parent reply	other threads:[~2015-01-21  4:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-31 19:48 [PATCH] xfstests: btrfs: fix up 001.out Anand Jain
2015-01-02 12:44 ` Filipe David Manana
2015-01-04  4:59   ` Anand Jain
2015-01-02 13:04 ` [PATCH v2] " Anand Jain
2015-01-05  3:25   ` Eryu Guan
2015-01-05  4:40     ` Anand Jain
2015-01-21  4:26   ` Dave Chinner [this message]
2015-01-21  5:30     ` Anand Jain

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=20150121042627.GF16510@dastard \
    --to=david@fromorbit.com \
    --cc=anand.jain@oracle.com \
    --cc=fdmanana@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@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 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.