* [PATCH] btrfs: update some tests to be able to run with btrfs-progs v6.11
@ 2024-10-02 15:28 fdmanana
2024-10-02 18:22 ` Boris Burkov
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: fdmanana @ 2024-10-02 15:28 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana
From: Filipe Manana <fdmanana@suse.com>
In btrfs-progs v6.11 the output of the "filesystem show" command changed
so that it no longers prints blank lines. This happened with commit
4331bfb011bd ("btrfs-progs: fi show: remove stray newline in filesystem
show").
We have some tests that expect the blank lines in their golden output,
and therefore they fail with btrfs-progs v6.11.
So update the filter _filter_btrfs_filesystem_show to remove blank lines
and change the golden output of the tests to not expect the blank lines,
making the tests work with btrfs-progs v6.11 and older versions.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
common/filter.btrfs | 5 ++++-
tests/btrfs/100.out | 2 --
tests/btrfs/218.out | 1 -
tests/btrfs/254.out | 1 -
4 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/common/filter.btrfs b/common/filter.btrfs
index 5a944aeb..6c53dffe 100644
--- a/common/filter.btrfs
+++ b/common/filter.btrfs
@@ -30,11 +30,14 @@ _filter_btrfs_filesystem_show()
UUID=$2
fi
- # the uniq collapses all device lines into 1
+ # Before btrfs-progs v6.11 we had some blank lines in the output, so
+ # delete them.
+ # The uniq collapses all device lines into 1.
_filter_uuid $UUID | _filter_scratch | _filter_scratch_pool | \
_filter_size | _filter_btrfs_version | _filter_devid | \
_filter_zero_size | \
sed -e "s/\(Total devices\) $NUMDEVS/\1 $NUM_SUBST/g" | \
+ sed -e "/^\s*$/d" | \
uniq > $tmp.btrfs_filesystem_show
# The first two lines are Label/UUID and total devices
diff --git a/tests/btrfs/100.out b/tests/btrfs/100.out
index aa492919..1fe3c0de 100644
--- a/tests/btrfs/100.out
+++ b/tests/btrfs/100.out
@@ -3,9 +3,7 @@ Label: none uuid: <UUID>
Total devices <NUM> FS bytes used <SIZE>
devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
devid <DEVID> size <SIZE> used <SIZE> path /dev/mapper/error-test
-
Label: none uuid: <UUID>
Total devices <NUM> FS bytes used <SIZE>
devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
-
=== device replace completed
diff --git a/tests/btrfs/218.out b/tests/btrfs/218.out
index 7ccf13e9..be11074c 100644
--- a/tests/btrfs/218.out
+++ b/tests/btrfs/218.out
@@ -2,7 +2,6 @@ QA output created by 218
Label: none uuid: <UUID>
Total devices <NUM> FS bytes used <SIZE>
devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
-
[SCRATCH_DEV].write_io_errs 0
[SCRATCH_DEV].read_io_errs 0
[SCRATCH_DEV].flush_io_errs 0
diff --git a/tests/btrfs/254.out b/tests/btrfs/254.out
index 20819cf5..86089ee3 100644
--- a/tests/btrfs/254.out
+++ b/tests/btrfs/254.out
@@ -3,4 +3,3 @@ Label: none uuid: <UUID>
Total devices <NUM> FS bytes used <SIZE>
devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
*** Some devices missing
-
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] btrfs: update some tests to be able to run with btrfs-progs v6.11
2024-10-02 15:28 [PATCH] btrfs: update some tests to be able to run with btrfs-progs v6.11 fdmanana
@ 2024-10-02 18:22 ` Boris Burkov
2024-10-03 5:30 ` Qu Wenruo
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Boris Burkov @ 2024-10-02 18:22 UTC (permalink / raw)
To: fdmanana; +Cc: fstests, linux-btrfs, Filipe Manana
On Wed, Oct 02, 2024 at 04:28:49PM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> In btrfs-progs v6.11 the output of the "filesystem show" command changed
> so that it no longers prints blank lines. This happened with commit
> 4331bfb011bd ("btrfs-progs: fi show: remove stray newline in filesystem
> show").
>
> We have some tests that expect the blank lines in their golden output,
> and therefore they fail with btrfs-progs v6.11.
>
> So update the filter _filter_btrfs_filesystem_show to remove blank lines
> and change the golden output of the tests to not expect the blank lines,
> making the tests work with btrfs-progs v6.11 and older versions.
>
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Boris Burkov <boris@bur.io>
> ---
> common/filter.btrfs | 5 ++++-
> tests/btrfs/100.out | 2 --
> tests/btrfs/218.out | 1 -
> tests/btrfs/254.out | 1 -
> 4 files changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/common/filter.btrfs b/common/filter.btrfs
> index 5a944aeb..6c53dffe 100644
> --- a/common/filter.btrfs
> +++ b/common/filter.btrfs
> @@ -30,11 +30,14 @@ _filter_btrfs_filesystem_show()
> UUID=$2
> fi
>
> - # the uniq collapses all device lines into 1
> + # Before btrfs-progs v6.11 we had some blank lines in the output, so
> + # delete them.
> + # The uniq collapses all device lines into 1.
> _filter_uuid $UUID | _filter_scratch | _filter_scratch_pool | \
> _filter_size | _filter_btrfs_version | _filter_devid | \
> _filter_zero_size | \
> sed -e "s/\(Total devices\) $NUMDEVS/\1 $NUM_SUBST/g" | \
> + sed -e "/^\s*$/d" | \
> uniq > $tmp.btrfs_filesystem_show
>
> # The first two lines are Label/UUID and total devices
> diff --git a/tests/btrfs/100.out b/tests/btrfs/100.out
> index aa492919..1fe3c0de 100644
> --- a/tests/btrfs/100.out
> +++ b/tests/btrfs/100.out
> @@ -3,9 +3,7 @@ Label: none uuid: <UUID>
> Total devices <NUM> FS bytes used <SIZE>
> devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> devid <DEVID> size <SIZE> used <SIZE> path /dev/mapper/error-test
> -
> Label: none uuid: <UUID>
> Total devices <NUM> FS bytes used <SIZE>
> devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> -
> === device replace completed
> diff --git a/tests/btrfs/218.out b/tests/btrfs/218.out
> index 7ccf13e9..be11074c 100644
> --- a/tests/btrfs/218.out
> +++ b/tests/btrfs/218.out
> @@ -2,7 +2,6 @@ QA output created by 218
> Label: none uuid: <UUID>
> Total devices <NUM> FS bytes used <SIZE>
> devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> -
> [SCRATCH_DEV].write_io_errs 0
> [SCRATCH_DEV].read_io_errs 0
> [SCRATCH_DEV].flush_io_errs 0
> diff --git a/tests/btrfs/254.out b/tests/btrfs/254.out
> index 20819cf5..86089ee3 100644
> --- a/tests/btrfs/254.out
> +++ b/tests/btrfs/254.out
> @@ -3,4 +3,3 @@ Label: none uuid: <UUID>
> Total devices <NUM> FS bytes used <SIZE>
> devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> *** Some devices missing
> -
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] btrfs: update some tests to be able to run with btrfs-progs v6.11
2024-10-02 15:28 [PATCH] btrfs: update some tests to be able to run with btrfs-progs v6.11 fdmanana
2024-10-02 18:22 ` Boris Burkov
@ 2024-10-03 5:30 ` Qu Wenruo
2024-10-04 18:23 ` Boris Burkov
2024-10-07 11:32 ` [PATCH v2] " fdmanana
3 siblings, 0 replies; 7+ messages in thread
From: Qu Wenruo @ 2024-10-03 5:30 UTC (permalink / raw)
To: fdmanana, fstests; +Cc: linux-btrfs, Filipe Manana
在 2024/10/3 00:58, fdmanana@kernel.org 写道:
> From: Filipe Manana <fdmanana@suse.com>
>
> In btrfs-progs v6.11 the output of the "filesystem show" command changed
> so that it no longers prints blank lines. This happened with commit
> 4331bfb011bd ("btrfs-progs: fi show: remove stray newline in filesystem
> show").
>
> We have some tests that expect the blank lines in their golden output,
> and therefore they fail with btrfs-progs v6.11.
>
> So update the filter _filter_btrfs_filesystem_show to remove blank lines
> and change the golden output of the tests to not expect the blank lines,
> making the tests work with btrfs-progs v6.11 and older versions.
>
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Thanks,
Qu
> ---
> common/filter.btrfs | 5 ++++-
> tests/btrfs/100.out | 2 --
> tests/btrfs/218.out | 1 -
> tests/btrfs/254.out | 1 -
> 4 files changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/common/filter.btrfs b/common/filter.btrfs
> index 5a944aeb..6c53dffe 100644
> --- a/common/filter.btrfs
> +++ b/common/filter.btrfs
> @@ -30,11 +30,14 @@ _filter_btrfs_filesystem_show()
> UUID=$2
> fi
>
> - # the uniq collapses all device lines into 1
> + # Before btrfs-progs v6.11 we had some blank lines in the output, so
> + # delete them.
> + # The uniq collapses all device lines into 1.
> _filter_uuid $UUID | _filter_scratch | _filter_scratch_pool | \
> _filter_size | _filter_btrfs_version | _filter_devid | \
> _filter_zero_size | \
> sed -e "s/\(Total devices\) $NUMDEVS/\1 $NUM_SUBST/g" | \
> + sed -e "/^\s*$/d" | \
> uniq > $tmp.btrfs_filesystem_show
>
> # The first two lines are Label/UUID and total devices
> diff --git a/tests/btrfs/100.out b/tests/btrfs/100.out
> index aa492919..1fe3c0de 100644
> --- a/tests/btrfs/100.out
> +++ b/tests/btrfs/100.out
> @@ -3,9 +3,7 @@ Label: none uuid: <UUID>
> Total devices <NUM> FS bytes used <SIZE>
> devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> devid <DEVID> size <SIZE> used <SIZE> path /dev/mapper/error-test
> -
> Label: none uuid: <UUID>
> Total devices <NUM> FS bytes used <SIZE>
> devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> -
> === device replace completed
> diff --git a/tests/btrfs/218.out b/tests/btrfs/218.out
> index 7ccf13e9..be11074c 100644
> --- a/tests/btrfs/218.out
> +++ b/tests/btrfs/218.out
> @@ -2,7 +2,6 @@ QA output created by 218
> Label: none uuid: <UUID>
> Total devices <NUM> FS bytes used <SIZE>
> devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> -
> [SCRATCH_DEV].write_io_errs 0
> [SCRATCH_DEV].read_io_errs 0
> [SCRATCH_DEV].flush_io_errs 0
> diff --git a/tests/btrfs/254.out b/tests/btrfs/254.out
> index 20819cf5..86089ee3 100644
> --- a/tests/btrfs/254.out
> +++ b/tests/btrfs/254.out
> @@ -3,4 +3,3 @@ Label: none uuid: <UUID>
> Total devices <NUM> FS bytes used <SIZE>
> devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> *** Some devices missing
> -
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] btrfs: update some tests to be able to run with btrfs-progs v6.11
2024-10-02 15:28 [PATCH] btrfs: update some tests to be able to run with btrfs-progs v6.11 fdmanana
2024-10-02 18:22 ` Boris Burkov
2024-10-03 5:30 ` Qu Wenruo
@ 2024-10-04 18:23 ` Boris Burkov
2024-10-07 11:31 ` Filipe Manana
2024-10-07 11:32 ` [PATCH v2] " fdmanana
3 siblings, 1 reply; 7+ messages in thread
From: Boris Burkov @ 2024-10-04 18:23 UTC (permalink / raw)
To: fdmanana; +Cc: fstests, linux-btrfs, Filipe Manana
On Wed, Oct 02, 2024 at 04:28:49PM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> In btrfs-progs v6.11 the output of the "filesystem show" command changed
> so that it no longers prints blank lines. This happened with commit
> 4331bfb011bd ("btrfs-progs: fi show: remove stray newline in filesystem
> show").
>
> We have some tests that expect the blank lines in their golden output,
> and therefore they fail with btrfs-progs v6.11.
>
> So update the filter _filter_btrfs_filesystem_show to remove blank lines
> and change the golden output of the tests to not expect the blank lines,
> making the tests work with btrfs-progs v6.11 and older versions.
I got around to updating my test boxes to include this and did a full
re-run and I believe you may have missed removing the newline from the
golden outputs of btrfs/006 and btrfs/101. Sorry if I missed an updated
version or something.
I don't yet see this patch in the various branches I look at, so I
assume it's not to late to fold in those two changes as well. If not,
lmk, and I'm happy to send a follow up later.
Thanks,
Boris
>
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
> ---
> common/filter.btrfs | 5 ++++-
> tests/btrfs/100.out | 2 --
> tests/btrfs/218.out | 1 -
> tests/btrfs/254.out | 1 -
> 4 files changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/common/filter.btrfs b/common/filter.btrfs
> index 5a944aeb..6c53dffe 100644
> --- a/common/filter.btrfs
> +++ b/common/filter.btrfs
> @@ -30,11 +30,14 @@ _filter_btrfs_filesystem_show()
> UUID=$2
> fi
>
> - # the uniq collapses all device lines into 1
> + # Before btrfs-progs v6.11 we had some blank lines in the output, so
> + # delete them.
> + # The uniq collapses all device lines into 1.
> _filter_uuid $UUID | _filter_scratch | _filter_scratch_pool | \
> _filter_size | _filter_btrfs_version | _filter_devid | \
> _filter_zero_size | \
> sed -e "s/\(Total devices\) $NUMDEVS/\1 $NUM_SUBST/g" | \
> + sed -e "/^\s*$/d" | \
> uniq > $tmp.btrfs_filesystem_show
>
> # The first two lines are Label/UUID and total devices
> diff --git a/tests/btrfs/100.out b/tests/btrfs/100.out
> index aa492919..1fe3c0de 100644
> --- a/tests/btrfs/100.out
> +++ b/tests/btrfs/100.out
> @@ -3,9 +3,7 @@ Label: none uuid: <UUID>
> Total devices <NUM> FS bytes used <SIZE>
> devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> devid <DEVID> size <SIZE> used <SIZE> path /dev/mapper/error-test
> -
> Label: none uuid: <UUID>
> Total devices <NUM> FS bytes used <SIZE>
> devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> -
> === device replace completed
> diff --git a/tests/btrfs/218.out b/tests/btrfs/218.out
> index 7ccf13e9..be11074c 100644
> --- a/tests/btrfs/218.out
> +++ b/tests/btrfs/218.out
> @@ -2,7 +2,6 @@ QA output created by 218
> Label: none uuid: <UUID>
> Total devices <NUM> FS bytes used <SIZE>
> devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> -
> [SCRATCH_DEV].write_io_errs 0
> [SCRATCH_DEV].read_io_errs 0
> [SCRATCH_DEV].flush_io_errs 0
> diff --git a/tests/btrfs/254.out b/tests/btrfs/254.out
> index 20819cf5..86089ee3 100644
> --- a/tests/btrfs/254.out
> +++ b/tests/btrfs/254.out
> @@ -3,4 +3,3 @@ Label: none uuid: <UUID>
> Total devices <NUM> FS bytes used <SIZE>
> devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> *** Some devices missing
> -
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] btrfs: update some tests to be able to run with btrfs-progs v6.11
2024-10-04 18:23 ` Boris Burkov
@ 2024-10-07 11:31 ` Filipe Manana
0 siblings, 0 replies; 7+ messages in thread
From: Filipe Manana @ 2024-10-07 11:31 UTC (permalink / raw)
To: Boris Burkov; +Cc: fstests, linux-btrfs, Filipe Manana
On Fri, Oct 4, 2024 at 7:23 PM Boris Burkov <boris@bur.io> wrote:
>
> On Wed, Oct 02, 2024 at 04:28:49PM +0100, fdmanana@kernel.org wrote:
> > From: Filipe Manana <fdmanana@suse.com>
> >
> > In btrfs-progs v6.11 the output of the "filesystem show" command changed
> > so that it no longers prints blank lines. This happened with commit
> > 4331bfb011bd ("btrfs-progs: fi show: remove stray newline in filesystem
> > show").
> >
> > We have some tests that expect the blank lines in their golden output,
> > and therefore they fail with btrfs-progs v6.11.
> >
> > So update the filter _filter_btrfs_filesystem_show to remove blank lines
> > and change the golden output of the tests to not expect the blank lines,
> > making the tests work with btrfs-progs v6.11 and older versions.
>
> I got around to updating my test boxes to include this and did a full
> re-run and I believe you may have missed removing the newline from the
> golden outputs of btrfs/006 and btrfs/101. Sorry if I missed an updated
> version or something.
No, I really missed those 2 tests, and I don't know why.
>
> I don't yet see this patch in the various branches I look at, so I
> assume it's not to late to fold in those two changes as well. If not,
> lmk, and I'm happy to send a follow up later.
It hasn't been merged anywhere yet, so I've sent an updated v2.
Thanks.
>
> Thanks,
> Boris
>
> >
> > Signed-off-by: Filipe Manana <fdmanana@suse.com>
> > ---
> > common/filter.btrfs | 5 ++++-
> > tests/btrfs/100.out | 2 --
> > tests/btrfs/218.out | 1 -
> > tests/btrfs/254.out | 1 -
> > 4 files changed, 4 insertions(+), 5 deletions(-)
> >
> > diff --git a/common/filter.btrfs b/common/filter.btrfs
> > index 5a944aeb..6c53dffe 100644
> > --- a/common/filter.btrfs
> > +++ b/common/filter.btrfs
> > @@ -30,11 +30,14 @@ _filter_btrfs_filesystem_show()
> > UUID=$2
> > fi
> >
> > - # the uniq collapses all device lines into 1
> > + # Before btrfs-progs v6.11 we had some blank lines in the output, so
> > + # delete them.
> > + # The uniq collapses all device lines into 1.
> > _filter_uuid $UUID | _filter_scratch | _filter_scratch_pool | \
> > _filter_size | _filter_btrfs_version | _filter_devid | \
> > _filter_zero_size | \
> > sed -e "s/\(Total devices\) $NUMDEVS/\1 $NUM_SUBST/g" | \
> > + sed -e "/^\s*$/d" | \
> > uniq > $tmp.btrfs_filesystem_show
> >
> > # The first two lines are Label/UUID and total devices
> > diff --git a/tests/btrfs/100.out b/tests/btrfs/100.out
> > index aa492919..1fe3c0de 100644
> > --- a/tests/btrfs/100.out
> > +++ b/tests/btrfs/100.out
> > @@ -3,9 +3,7 @@ Label: none uuid: <UUID>
> > Total devices <NUM> FS bytes used <SIZE>
> > devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> > devid <DEVID> size <SIZE> used <SIZE> path /dev/mapper/error-test
> > -
> > Label: none uuid: <UUID>
> > Total devices <NUM> FS bytes used <SIZE>
> > devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> > -
> > === device replace completed
> > diff --git a/tests/btrfs/218.out b/tests/btrfs/218.out
> > index 7ccf13e9..be11074c 100644
> > --- a/tests/btrfs/218.out
> > +++ b/tests/btrfs/218.out
> > @@ -2,7 +2,6 @@ QA output created by 218
> > Label: none uuid: <UUID>
> > Total devices <NUM> FS bytes used <SIZE>
> > devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> > -
> > [SCRATCH_DEV].write_io_errs 0
> > [SCRATCH_DEV].read_io_errs 0
> > [SCRATCH_DEV].flush_io_errs 0
> > diff --git a/tests/btrfs/254.out b/tests/btrfs/254.out
> > index 20819cf5..86089ee3 100644
> > --- a/tests/btrfs/254.out
> > +++ b/tests/btrfs/254.out
> > @@ -3,4 +3,3 @@ Label: none uuid: <UUID>
> > Total devices <NUM> FS bytes used <SIZE>
> > devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> > *** Some devices missing
> > -
> > --
> > 2.43.0
> >
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2] btrfs: update some tests to be able to run with btrfs-progs v6.11
2024-10-02 15:28 [PATCH] btrfs: update some tests to be able to run with btrfs-progs v6.11 fdmanana
` (2 preceding siblings ...)
2024-10-04 18:23 ` Boris Burkov
@ 2024-10-07 11:32 ` fdmanana
2024-10-10 21:01 ` David Sterba
3 siblings, 1 reply; 7+ messages in thread
From: fdmanana @ 2024-10-07 11:32 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana, Boris Burkov, Qu Wenruo
From: Filipe Manana <fdmanana@suse.com>
In btrfs-progs v6.11 the output of the "filesystem show" command changed
so that it no longers prints blank lines. This happened with commit
4331bfb011bd ("btrfs-progs: fi show: remove stray newline in filesystem
show").
We have some tests that expect the blank lines in their golden output,
and therefore they fail with btrfs-progs v6.11.
So update the filter _filter_btrfs_filesystem_show to remove blank lines
and change the golden output of the tests to not expect the blank lines,
making the tests work with btrfs-progs v6.11 and older versions.
Reviewed-by: Boris Burkov <boris@bur.io>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
V2: Add missing updates to btrfs/006 and btrfs/100.
common/filter.btrfs | 5 ++++-
tests/btrfs/006.out | 2 --
tests/btrfs/100.out | 2 --
tests/btrfs/101.out | 2 --
tests/btrfs/218.out | 1 -
tests/btrfs/254.out | 1 -
6 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/common/filter.btrfs b/common/filter.btrfs
index 5a944aeb..bc914642 100644
--- a/common/filter.btrfs
+++ b/common/filter.btrfs
@@ -30,7 +30,10 @@ _filter_btrfs_filesystem_show()
UUID=$2
fi
- # the uniq collapses all device lines into 1
+ # Before btrfs-progs v6.11 we had some blank lines in the output, so
+ # delete them.
+ # The uniq collapses all device lines into 1.
+ sed -e "/^\s*$/d" | \
_filter_uuid $UUID | _filter_scratch | _filter_scratch_pool | \
_filter_size | _filter_btrfs_version | _filter_devid | \
_filter_zero_size | \
diff --git a/tests/btrfs/006.out b/tests/btrfs/006.out
index b7f29f96..97d44f13 100644
--- a/tests/btrfs/006.out
+++ b/tests/btrfs/006.out
@@ -7,12 +7,10 @@ TestLabel.006
Label: 'TestLabel.006' uuid: <UUID>
Total devices <EXACTNUM> FS bytes used <SIZE>
devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
-
== Show filesystem by UUID
Label: 'TestLabel.006' uuid: <EXACTUUID>
Total devices <EXACTNUM> FS bytes used <SIZE>
devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
-
== Sync filesystem
== Show device stats by mountpoint
<NUMDEVS> [SCRATCH_DEV].corruption_errs <NUM>
diff --git a/tests/btrfs/100.out b/tests/btrfs/100.out
index aa492919..1fe3c0de 100644
--- a/tests/btrfs/100.out
+++ b/tests/btrfs/100.out
@@ -3,9 +3,7 @@ Label: none uuid: <UUID>
Total devices <NUM> FS bytes used <SIZE>
devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
devid <DEVID> size <SIZE> used <SIZE> path /dev/mapper/error-test
-
Label: none uuid: <UUID>
Total devices <NUM> FS bytes used <SIZE>
devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
-
=== device replace completed
diff --git a/tests/btrfs/101.out b/tests/btrfs/101.out
index e1b88c2d..c2359c7c 100644
--- a/tests/btrfs/101.out
+++ b/tests/btrfs/101.out
@@ -3,9 +3,7 @@ Label: none uuid: <UUID>
Total devices <NUM> FS bytes used <SIZE>
devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
devid <DEVID> size <SIZE> used <SIZE> path /dev/mapper/error-test
-
Label: none uuid: <UUID>
Total devices <NUM> FS bytes used <SIZE>
devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
-
=== device delete completed
diff --git a/tests/btrfs/218.out b/tests/btrfs/218.out
index 7ccf13e9..be11074c 100644
--- a/tests/btrfs/218.out
+++ b/tests/btrfs/218.out
@@ -2,7 +2,6 @@ QA output created by 218
Label: none uuid: <UUID>
Total devices <NUM> FS bytes used <SIZE>
devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
-
[SCRATCH_DEV].write_io_errs 0
[SCRATCH_DEV].read_io_errs 0
[SCRATCH_DEV].flush_io_errs 0
diff --git a/tests/btrfs/254.out b/tests/btrfs/254.out
index 20819cf5..86089ee3 100644
--- a/tests/btrfs/254.out
+++ b/tests/btrfs/254.out
@@ -3,4 +3,3 @@ Label: none uuid: <UUID>
Total devices <NUM> FS bytes used <SIZE>
devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
*** Some devices missing
-
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2] btrfs: update some tests to be able to run with btrfs-progs v6.11
2024-10-07 11:32 ` [PATCH v2] " fdmanana
@ 2024-10-10 21:01 ` David Sterba
0 siblings, 0 replies; 7+ messages in thread
From: David Sterba @ 2024-10-10 21:01 UTC (permalink / raw)
To: fdmanana; +Cc: fstests, linux-btrfs, Filipe Manana, Boris Burkov, Qu Wenruo
On Mon, Oct 07, 2024 at 12:32:50PM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> In btrfs-progs v6.11 the output of the "filesystem show" command changed
> so that it no longers prints blank lines. This happened with commit
> 4331bfb011bd ("btrfs-progs: fi show: remove stray newline in filesystem
> show").
>
> We have some tests that expect the blank lines in their golden output,
> and therefore they fail with btrfs-progs v6.11.
>
> So update the filter _filter_btrfs_filesystem_show to remove blank lines
> and change the golden output of the tests to not expect the blank lines,
> making the tests work with btrfs-progs v6.11 and older versions.
>
> Reviewed-by: Boris Burkov <boris@bur.io>
> Reviewed-by: Qu Wenruo <wqu@suse.com>
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-10-10 21:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-02 15:28 [PATCH] btrfs: update some tests to be able to run with btrfs-progs v6.11 fdmanana
2024-10-02 18:22 ` Boris Burkov
2024-10-03 5:30 ` Qu Wenruo
2024-10-04 18:23 ` Boris Burkov
2024-10-07 11:31 ` Filipe Manana
2024-10-07 11:32 ` [PATCH v2] " fdmanana
2024-10-10 21:01 ` David Sterba
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).