public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: David Disseldorp <ddiss@suse.de>
To: Naohiro Aota <naohiro.aota@wdc.com>
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] fstests: btrfs: use proper filter for subvolume deletion
Date: Fri, 22 Dec 2023 16:07:26 +1100	[thread overview]
Message-ID: <20231222160726.7206676f@echidna> (raw)
In-Reply-To: <727fc0e695846a43830bdfc2d6757d6edc2d6878.1703213691.git.naohiro.aota@wdc.com>

On Fri, 22 Dec 2023 11:56:22 +0900, Naohiro Aota wrote:

> Test cases btrfs/208, 233, 276 does not use _filter_btrfs_subvol_delete()
> to process "btrfs subvolume delete" command's output. So, the following
> diff occurs even with a previous fix.
> 
> btrfs/208       - output mismatch (see /host/btrfs/208.out.bad)
>     --- tests/btrfs/208.out     2023-12-22 02:09:18.000000000 +0000
>     +++ /host/btrfs/208.out.bad 2023-12-22 02:21:40.697036486 +0000
>     @@ -6,12 +6,12 @@
>      subvol1
>      subvol2
>      subvol3
>     -Delete subvolume (no-commit): 'SCRATCH_MNT/subvol1'
>     +Delete subvolume 256 (no-commit): 'SCRATCH_MNT/subvol1'
>      After deleting one subvolume:
>      subvol2
>     ...
> 
> Let them use the filter and fix the output accordingly.
> 
> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>

Looks fine.
Reviewed-by: David Disseldorp <ddiss@suse.de>
One minor nit...

> ---
>  tests/btrfs/208     | 2 +-
>  tests/btrfs/208.out | 6 +++---
>  tests/btrfs/233     | 3 ++-
>  tests/btrfs/233.out | 4 ++--
>  tests/btrfs/276     | 3 ++-
>  tests/btrfs/276.out | 2 +-
>  6 files changed, 11 insertions(+), 9 deletions(-)
> 
> diff --git a/tests/btrfs/208 b/tests/btrfs/208
> index 909f9fa40803..d58803e2f801 100755
> --- a/tests/btrfs/208
> +++ b/tests/btrfs/208
> @@ -28,7 +28,7 @@ _delete_and_list()
>  	local msg="$2"
>  
>  	SUBVOLID=$(_btrfs_get_subvolid $SCRATCH_MNT "$subvol_name")
> -	$BTRFS_UTIL_PROG subvolume delete --subvolid $SUBVOLID $SCRATCH_MNT | _filter_scratch
> +	$BTRFS_UTIL_PROG subvolume delete --subvolid $SUBVOLID $SCRATCH_MNT | _filter_btrfs_subvol_delete
>  
>  	echo "$msg"
>  	$BTRFS_UTIL_PROG subvolume list $SCRATCH_MNT | $AWK_PROG '{ print $NF }'
> diff --git a/tests/btrfs/208.out b/tests/btrfs/208.out
> index 9b660699a4b2..dc5761ba1c87 100644
> --- a/tests/btrfs/208.out
> +++ b/tests/btrfs/208.out
> @@ -6,12 +6,12 @@ Current subvolume ids:
>  subvol1
>  subvol2
>  subvol3
> -Delete subvolume (no-commit): 'SCRATCH_MNT/subvol1'
> +Delete subvolume 'SCRATCH_MNT/subvol1'
>  After deleting one subvolume:
>  subvol2
>  subvol3
> -Delete subvolume (no-commit): 'SCRATCH_MNT/subvol3'
> +Delete subvolume 'SCRATCH_MNT/subvol3'
>  Last remaining subvolume:
>  subvol2
> -Delete subvolume (no-commit): 'SCRATCH_MNT/subvol2'
> +Delete subvolume 'SCRATCH_MNT/subvol2'
>  All subvolumes removed.
> diff --git a/tests/btrfs/233 b/tests/btrfs/233
> index 2b94a9c6befe..f2c1eba090be 100755
> --- a/tests/btrfs/233
> +++ b/tests/btrfs/233
> @@ -21,6 +21,7 @@ _cleanup()
>  
>  # Import common functions.
>  . ./common/filter
> +. ./common/filter.btrfs

common/filter.btrfs sources common/filter, so you can replace these.

  reply	other threads:[~2023-12-22  5:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-22  2:56 [PATCH] fstests: btrfs: use proper filter for subvolume deletion Naohiro Aota
2023-12-22  5:07 ` David Disseldorp [this message]
2023-12-22  6:02   ` Naohiro Aota
2023-12-22  7:30     ` David Disseldorp

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=20231222160726.7206676f@echidna \
    --to=ddiss@suse.de \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=naohiro.aota@wdc.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