diff mbox series

btrfs: remove 'seek' group from btrfs/007

Message ID bc7149309a8eca5999f22477a838602023094cb8.1662048451.git.fdmanana@suse.com (mailing list archive)
State New, archived
Headers show
Series btrfs: remove 'seek' group from btrfs/007 | expand

Commit Message

Filipe Manana Sept. 1, 2022, 4:12 p.m. UTC
From: Filipe Manana <fdmanana@suse.com>

btrfs/007 does not test lseek, it tests send/receive and lseek is not
exercised anywhere in this test. So just remove it from the 'seek' group.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 tests/btrfs/007 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Zorro Lang Sept. 2, 2022, 2 a.m. UTC | #1
On Thu, Sep 01, 2022 at 05:12:25PM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> btrfs/007 does not test lseek, it tests send/receive and lseek is not
> exercised anywhere in this test. So just remove it from the 'seek' group.
> 
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
> ---

This 'seek' group is brought in by below commit:

  commit 6fd9210bc97710f81e5a7646a2abfd11af0f0c28
  Author: Christoph Hellwig <hch@lst.de>
  Date:   Mon Feb 18 10:05:03 2019 +0100

      fstests: add a seek group

So I'd like to let Christoph help to double check it.

Thanks,
Zorro


>  tests/btrfs/007 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/btrfs/007 b/tests/btrfs/007
> index ed7d143a..c4a8d9d0 100755
> --- a/tests/btrfs/007
> +++ b/tests/btrfs/007
> @@ -13,7 +13,7 @@
>  owner=list.btrfs@jan-o-sch.net
>  
>  . ./common/preamble
> -_begin_fstest auto quick rw metadata send seek
> +_begin_fstest auto quick rw metadata send
>  
>  # Override the default cleanup function.
>  _cleanup()
> -- 
> 2.35.1
>
David Sterba Sept. 2, 2022, 9:44 a.m. UTC | #2
On Fri, Sep 02, 2022 at 10:00:30AM +0800, Zorro Lang wrote:
> On Thu, Sep 01, 2022 at 05:12:25PM +0100, fdmanana@kernel.org wrote:
> > From: Filipe Manana <fdmanana@suse.com>
> > 
> > btrfs/007 does not test lseek, it tests send/receive and lseek is not
> > exercised anywhere in this test. So just remove it from the 'seek' group.
> > 
> > Signed-off-by: Filipe Manana <fdmanana@suse.com>
> > ---
> 
> This 'seek' group is brought in by below commit:
> 
>   commit 6fd9210bc97710f81e5a7646a2abfd11af0f0c28
>   Author: Christoph Hellwig <hch@lst.de>
>   Date:   Mon Feb 18 10:05:03 2019 +0100
> 
>       fstests: add a seek group
> 
> So I'd like to let Christoph help to double check it.

It's quite obvious from the test itself that it tests only send/receive,
which is mentioned in the changelog. The commit adding the seek group
does not provide any rationale so it's hard to argue but as it stands
now the 'seek' group should not be there.
Christoph Hellwig Sept. 5, 2022, 6:35 a.m. UTC | #3
On Fri, Sep 02, 2022 at 11:44:24AM +0200, David Sterba wrote:
> >   commit 6fd9210bc97710f81e5a7646a2abfd11af0f0c28
> >   Author: Christoph Hellwig <hch@lst.de>
> >   Date:   Mon Feb 18 10:05:03 2019 +0100
> > 
> >       fstests: add a seek group
> > 
> > So I'd like to let Christoph help to double check it.
> 
> It's quite obvious from the test itself that it tests only send/receive,
> which is mentioned in the changelog. The commit adding the seek group
> does not provide any rationale so it's hard to argue but as it stands
> now the 'seek' group should not be there.

Probably.  Unless it somehow exercised seeks through the userspace
seek code I can't see any good rationale for this addition, and the
patch was far too long ago for me to remember.
Zorro Lang Sept. 5, 2022, 9:08 a.m. UTC | #4
On Mon, Sep 05, 2022 at 08:35:39AM +0200, Christoph Hellwig wrote:
> On Fri, Sep 02, 2022 at 11:44:24AM +0200, David Sterba wrote:
> > >   commit 6fd9210bc97710f81e5a7646a2abfd11af0f0c28
> > >   Author: Christoph Hellwig <hch@lst.de>
> > >   Date:   Mon Feb 18 10:05:03 2019 +0100
> > > 
> > >       fstests: add a seek group
> > > 
> > > So I'd like to let Christoph help to double check it.
> > 
> > It's quite obvious from the test itself that it tests only send/receive,
> > which is mentioned in the changelog. The commit adding the seek group
> > does not provide any rationale so it's hard to argue but as it stands
> > now the 'seek' group should not be there.
> 
> Probably.  Unless it somehow exercised seeks through the userspace
> seek code I can't see any good rationale for this addition, and the
> patch was far too long ago for me to remember.

Hi,

I just tried to learn about the history of this *problem*:

At first, Jan Schmidt added src/fssum.c into fstests by df0fd18101b6 ("xfstests:
add fssum tool"). In this original version, fssum does SEEK_DATA in both
sum_file_data_permissive() and sum_file_data_strict(), that means it always
does SEEK_DATA. So all cases run fssum, need SEEK_DATA/HOLE support.

Then 5 years later, Filipe removed SEEK_DATA operations from the 
sum_file_data_permissive(), by 1deed13f69b2 ("fstests: fix fssum to actually
ignore file holes when supposed to"). And fssum run sum_file_data_permissive()
by default. So that cause fssum don't need SEEK_DATA support by default (except
you use "-s" option).

Then 1 year later, Christoph added btrfs/007 into seek group, I think that might
because btrfs/007 still keeps the *_require_seek_data_hole*, which runs the
src/seek_sanity_test.

So, now, if we all agree that btrfs/007 isn't a seek related test, we can remove
the seek group and the *_require_seek_data_hole*.

Thanks,
Zorro

>
Filipe Manana Sept. 5, 2022, 9:20 a.m. UTC | #5
On Mon, Sep 5, 2022 at 10:08 AM Zorro Lang <zlang@redhat.com> wrote:
>
> On Mon, Sep 05, 2022 at 08:35:39AM +0200, Christoph Hellwig wrote:
> > On Fri, Sep 02, 2022 at 11:44:24AM +0200, David Sterba wrote:
> > > >   commit 6fd9210bc97710f81e5a7646a2abfd11af0f0c28
> > > >   Author: Christoph Hellwig <hch@lst.de>
> > > >   Date:   Mon Feb 18 10:05:03 2019 +0100
> > > >
> > > >       fstests: add a seek group
> > > >
> > > > So I'd like to let Christoph help to double check it.
> > >
> > > It's quite obvious from the test itself that it tests only send/receive,
> > > which is mentioned in the changelog. The commit adding the seek group
> > > does not provide any rationale so it's hard to argue but as it stands
> > > now the 'seek' group should not be there.
> >
> > Probably.  Unless it somehow exercised seeks through the userspace
> > seek code I can't see any good rationale for this addition, and the
> > patch was far too long ago for me to remember.
>
> Hi,
>
> I just tried to learn about the history of this *problem*:
>
> At first, Jan Schmidt added src/fssum.c into fstests by df0fd18101b6 ("xfstests:
> add fssum tool"). In this original version, fssum does SEEK_DATA in both
> sum_file_data_permissive() and sum_file_data_strict(), that means it always
> does SEEK_DATA. So all cases run fssum, need SEEK_DATA/HOLE support.
>
> Then 5 years later, Filipe removed SEEK_DATA operations from the
> sum_file_data_permissive(), by 1deed13f69b2 ("fstests: fix fssum to actually
> ignore file holes when supposed to"). And fssum run sum_file_data_permissive()
> by default. So that cause fssum don't need SEEK_DATA support by default (except
> you use "-s" option).
>
> Then 1 year later, Christoph added btrfs/007 into seek group, I think that might
> because btrfs/007 still keeps the *_require_seek_data_hole*, which runs the
> src/seek_sanity_test.
>
> So, now, if we all agree that btrfs/007 isn't a seek related test, we can remove
> the seek group and the *_require_seek_data_hole*.

fssum exercises lseek (SEEK_DATA) only if we pass the -s option to it,
which is not
the case for btrfs/007 (as well as for all other btrfs tests that
exercise send/receive and use fssum).
And that is because send/receive does not always preserve holes and
prealloc (specially on incremental send/receive).

That's a short version of the changelog from 1deed13f69b2, hopefully
clear enough.
And yes, the _require_seek_data_hole can go away from btrfs/007 too.

Thanks.

>
> Thanks,
> Zorro
>
> >
>
diff mbox series

Patch

diff --git a/tests/btrfs/007 b/tests/btrfs/007
index ed7d143a..c4a8d9d0 100755
--- a/tests/btrfs/007
+++ b/tests/btrfs/007
@@ -13,7 +13,7 @@ 
 owner=list.btrfs@jan-o-sch.net
 
 . ./common/preamble
-_begin_fstest auto quick rw metadata send seek
+_begin_fstest auto quick rw metadata send
 
 # Override the default cleanup function.
 _cleanup()