* [PATCH] fstests: filter.btrfs: update _filter_transaction_commit()
@ 2023-12-15 3:09 Naohiro Aota
2023-12-15 4:23 ` David Disseldorp
0 siblings, 1 reply; 3+ messages in thread
From: Naohiro Aota @ 2023-12-15 3:09 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Naohiro Aota
Recent btrfs-progs commit 5c91264d2dfc ("btrfs-progs: subvol delete:
print the id of the deleted subvolume") added the id of the deleted
subvolume to "Delete subvolume" print format.
As a result, btrfs/001 now always fail by the output difference.
- output mismatch (see /host/results/btrfs/001.out.bad)
--- tests/btrfs/001.out 2021-02-05 01:44:17.000000000 +0000
+++ /host/results/btrfs/001.out.bad 2023-12-15 01:43:07.000000000 +0000
@@ -33,7 +33,7 @@
Listing subvolumes
snap
subvol
-Delete subvolume 'SCRATCH_MNT/snap'
+Delete subvolume 256 (no-commit): 'SCRATCH_MNT/snap'
List root dir
subvol
...
Fix the issue by updating _filter_transaction_commit().
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
---
common/filter.btrfs | 1 +
1 file changed, 1 insertion(+)
diff --git a/common/filter.btrfs b/common/filter.btrfs
index 02c6b92dfa94..cea9911448eb 100644
--- a/common/filter.btrfs
+++ b/common/filter.btrfs
@@ -70,6 +70,7 @@ _filter_btrfs_device_stats()
_filter_transaction_commit() {
sed -e "/Transaction commit: none (default)/d" | \
+ sed -e "s/Delete subvolume [0-9]\+/Delete subvolume/g" | \
sed -e "s/Delete subvolume (.*commit):/Delete subvolume/g"
}
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] fstests: filter.btrfs: update _filter_transaction_commit()
2023-12-15 3:09 [PATCH] fstests: filter.btrfs: update _filter_transaction_commit() Naohiro Aota
@ 2023-12-15 4:23 ` David Disseldorp
2023-12-15 4:59 ` Zorro Lang
0 siblings, 1 reply; 3+ messages in thread
From: David Disseldorp @ 2023-12-15 4:23 UTC (permalink / raw)
To: Naohiro Aota; +Cc: fstests, linux-btrfs
On Fri, 15 Dec 2023 12:09:51 +0900, Naohiro Aota wrote:
...
> diff --git a/common/filter.btrfs b/common/filter.btrfs
> index 02c6b92dfa94..cea9911448eb 100644
> --- a/common/filter.btrfs
> +++ b/common/filter.btrfs
> @@ -70,6 +70,7 @@ _filter_btrfs_device_stats()
>
> _filter_transaction_commit() {
> sed -e "/Transaction commit: none (default)/d" | \
> + sed -e "s/Delete subvolume [0-9]\+/Delete subvolume/g" | \
> sed -e "s/Delete subvolume (.*commit):/Delete subvolume/g"
> }
>
Looks fine
Reviewed-by: David Disseldorp <ddiss@suse.de>
Nit: the pipe chain can be removed. It might also be a little simpler
if each version had an independent filter, e.g.
sed -e "/Transaction commit: none (default)/d" \
-e "s/Delete subvolume [0-9]\+ (.*commit)/Delete subvolume/g" \
-e "s/Delete subvolume (.*commit):/Delete subvolume/g"
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fstests: filter.btrfs: update _filter_transaction_commit()
2023-12-15 4:23 ` David Disseldorp
@ 2023-12-15 4:59 ` Zorro Lang
0 siblings, 0 replies; 3+ messages in thread
From: Zorro Lang @ 2023-12-15 4:59 UTC (permalink / raw)
To: Naohiro Aota; +Cc: fstests, linux-btrfs
On Fri, Dec 15, 2023 at 03:23:18PM +1100, David Disseldorp wrote:
> On Fri, 15 Dec 2023 12:09:51 +0900, Naohiro Aota wrote:
> ...
> > diff --git a/common/filter.btrfs b/common/filter.btrfs
> > index 02c6b92dfa94..cea9911448eb 100644
> > --- a/common/filter.btrfs
> > +++ b/common/filter.btrfs
> > @@ -70,6 +70,7 @@ _filter_btrfs_device_stats()
> >
> > _filter_transaction_commit() {
> > sed -e "/Transaction commit: none (default)/d" | \
> > + sed -e "s/Delete subvolume [0-9]\+/Delete subvolume/g" | \
> > sed -e "s/Delete subvolume (.*commit):/Delete subvolume/g"
> > }
> >
>
>
> Looks fine
> Reviewed-by: David Disseldorp <ddiss@suse.de>
>
> Nit: the pipe chain can be removed. It might also be a little simpler
> if each version had an independent filter, e.g.
> sed -e "/Transaction commit: none (default)/d" \
> -e "s/Delete subvolume [0-9]\+ (.*commit)/Delete subvolume/g" \
> -e "s/Delete subvolume (.*commit):/Delete subvolume/g"
Yup, we use `sed` as this generally. Although I can help to change that,
but appreciate that if you can do it and make sure it still works.
Thanks,
Zorro
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-12-15 4:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-15 3:09 [PATCH] fstests: filter.btrfs: update _filter_transaction_commit() Naohiro Aota
2023-12-15 4:23 ` David Disseldorp
2023-12-15 4:59 ` Zorro Lang
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.