Thread (8 messages) 8 messages, 4 authors, 2015-01-21

Re: [PATCH v2] xfstests: btrfs: fix up 001.out

From: Dave Chinner <david@fromorbit.com>
Date: 2015-01-21 04:26:42
Also in: fstests

On Fri, Jan 02, 2015 at 09:04:29PM +0800, Anand Jain wrote:
quoted hunk ↗ jump to hunk
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 <redacted>

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help