diff mbox series

[fstests,2/2] generic/732: don't run it on NFS

Message ID 20240110-fixes-v1-2-69f5ddd95656@kernel.org (mailing list archive)
State New
Headers show
Series generic: skip a couple more tests on NFS | expand

Commit Message

Jeffrey Layton Jan. 10, 2024, 6:27 p.m. UTC
This test sets up two independent superblocks with the same backend
server, and then does RENAMES of the same files in the two servers. This
is basically trying to simulate the case where two clients are competing
to rename files in the same directory on the same server.

This test would usually pass vs. an NFSv4 server that doesn't have
dfdd2630a7398 ("nfsd: fix change_info in NFSv4 RENAME replies"), because
the client would end up improperly invalidating the dcache for the whole
dir after most RENAMEs.

However, this test doesn't (and shouldn't) pass on NFS, because the
client has no idea that a rename has happened on the second mount. The
expected behavior for the NFS client is for it to use the cache timeouts
in this case, which is what it now does with the above server bug fixed.

Exempt NFS from running this test, since we don't expect it to pass.

Cc: Yongcheng Yang <yoyang@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 tests/generic/732 | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Zorro Lang Jan. 11, 2024, 8:49 p.m. UTC | #1
On Wed, Jan 10, 2024 at 01:27:28PM -0500, Jeff Layton wrote:
> This test sets up two independent superblocks with the same backend
> server, and then does RENAMES of the same files in the two servers. This
> is basically trying to simulate the case where two clients are competing
> to rename files in the same directory on the same server.
> 
> This test would usually pass vs. an NFSv4 server that doesn't have
> dfdd2630a7398 ("nfsd: fix change_info in NFSv4 RENAME replies"), because
> the client would end up improperly invalidating the dcache for the whole
> dir after most RENAMEs.
> 
> However, this test doesn't (and shouldn't) pass on NFS, because the
> client has no idea that a rename has happened on the second mount. The
> expected behavior for the NFS client is for it to use the cache timeouts
> in this case, which is what it now does with the above server bug fixed.
> 
> Exempt NFS from running this test, since we don't expect it to pass.
> 
> Cc: Yongcheng Yang <yoyang@redhat.com>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---

This case is written for a nfs fix at first. If nfs would like to skip this
test, I don't know if it makes sense to keep it in fstests?

Thanks,
Zorro

>  tests/generic/732 | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/tests/generic/732 b/tests/generic/732
> index 785aac58f361..5b5087d5accd 100755
> --- a/tests/generic/732
> +++ b/tests/generic/732
> @@ -22,9 +22,7 @@ _cleanup()
>  }
>  
>  # real QA test starts here
> -_supported_fs generic
> -[ "$FSTYP" = "nfs" ] && _fixed_by_kernel_commit fdd2630a739819 \
> -	"nfsd: fix change_info in NFSv4 RENAME replies"
> +_supported_fs ^nfs
>  
>  _require_test
>  _require_scratch
> 
> -- 
> 2.43.0
> 
>
Jeffrey Layton Jan. 11, 2024, 9:13 p.m. UTC | #2
On Fri, 2024-01-12 at 04:49 +0800, Zorro Lang wrote:
> On Wed, Jan 10, 2024 at 01:27:28PM -0500, Jeff Layton wrote:
> > This test sets up two independent superblocks with the same backend
> > server, and then does RENAMES of the same files in the two servers. This
> > is basically trying to simulate the case where two clients are competing
> > to rename files in the same directory on the same server.
> > 
> > This test would usually pass vs. an NFSv4 server that doesn't have
> > dfdd2630a7398 ("nfsd: fix change_info in NFSv4 RENAME replies"), because
> > the client would end up improperly invalidating the dcache for the whole
> > dir after most RENAMEs.
> > 
> > However, this test doesn't (and shouldn't) pass on NFS, because the
> > client has no idea that a rename has happened on the second mount. The
> > expected behavior for the NFS client is for it to use the cache timeouts
> > in this case, which is what it now does with the above server bug fixed.
> > 
> > Exempt NFS from running this test, since we don't expect it to pass.
> > 
> > Cc: Yongcheng Yang <yoyang@redhat.com>
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > ---
> 
> This case is written for a nfs fix at first. If nfs would like to skip this
> test, I don't know if it makes sense to keep it in fstests?
> 
> 

It might make sense to keep this test in place for stuff like cephfs,
but if dropping it altogether is best, then that's fine with me.

> 
> >  tests/generic/732 | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/tests/generic/732 b/tests/generic/732
> > index 785aac58f361..5b5087d5accd 100755
> > --- a/tests/generic/732
> > +++ b/tests/generic/732
> > @@ -22,9 +22,7 @@ _cleanup()
> >  }
> >  
> >  # real QA test starts here
> > -_supported_fs generic
> > -[ "$FSTYP" = "nfs" ] && _fixed_by_kernel_commit fdd2630a739819 \
> > -	"nfsd: fix change_info in NFSv4 RENAME replies"
> > +_supported_fs ^nfs
> >  
> >  _require_test
> >  _require_scratch
> > 
> > -- 
> > 2.43.0
> > 
> > 
>
Zorro Lang Jan. 12, 2024, 1:35 p.m. UTC | #3
On Thu, Jan 11, 2024 at 04:13:11PM -0500, Jeff Layton wrote:
> On Fri, 2024-01-12 at 04:49 +0800, Zorro Lang wrote:
> > On Wed, Jan 10, 2024 at 01:27:28PM -0500, Jeff Layton wrote:
> > > This test sets up two independent superblocks with the same backend
> > > server, and then does RENAMES of the same files in the two servers. This
> > > is basically trying to simulate the case where two clients are competing
> > > to rename files in the same directory on the same server.
> > > 
> > > This test would usually pass vs. an NFSv4 server that doesn't have
> > > dfdd2630a7398 ("nfsd: fix change_info in NFSv4 RENAME replies"), because
> > > the client would end up improperly invalidating the dcache for the whole
> > > dir after most RENAMEs.
> > > 
> > > However, this test doesn't (and shouldn't) pass on NFS, because the
> > > client has no idea that a rename has happened on the second mount. The
> > > expected behavior for the NFS client is for it to use the cache timeouts
> > > in this case, which is what it now does with the above server bug fixed.
> > > 
> > > Exempt NFS from running this test, since we don't expect it to pass.
> > > 
> > > Cc: Yongcheng Yang <yoyang@redhat.com>
> > > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > > ---
> > 
> > This case is written for a nfs fix at first. If nfs would like to skip this
> > test, I don't know if it makes sense to keep it in fstests?
> > 
> > 
> 
> It might make sense to keep this test in place for stuff like cephfs,
> but if dropping it altogether is best, then that's fine with me.

OK, thanks for this feedback, if it still makes sense for any one fs,
we can keep it.

Thanks,
Zorro

> 
> > 
> > >  tests/generic/732 | 4 +---
> > >  1 file changed, 1 insertion(+), 3 deletions(-)
> > > 
> > > diff --git a/tests/generic/732 b/tests/generic/732
> > > index 785aac58f361..5b5087d5accd 100755
> > > --- a/tests/generic/732
> > > +++ b/tests/generic/732
> > > @@ -22,9 +22,7 @@ _cleanup()
> > >  }
> > >  
> > >  # real QA test starts here
> > > -_supported_fs generic
> > > -[ "$FSTYP" = "nfs" ] && _fixed_by_kernel_commit fdd2630a739819 \
> > > -	"nfsd: fix change_info in NFSv4 RENAME replies"
> > > +_supported_fs ^nfs
> > >  
> > >  _require_test
> > >  _require_scratch
> > > 
> > > -- 
> > > 2.43.0
> > > 
> > > 
> > 
> 
> -- 
> Jeff Layton <jlayton@kernel.org>
>
Zorro Lang Jan. 12, 2024, 1:36 p.m. UTC | #4
On Thu, Jan 11, 2024 at 04:13:11PM -0500, Jeff Layton wrote:
> On Fri, 2024-01-12 at 04:49 +0800, Zorro Lang wrote:
> > On Wed, Jan 10, 2024 at 01:27:28PM -0500, Jeff Layton wrote:
> > > This test sets up two independent superblocks with the same backend
> > > server, and then does RENAMES of the same files in the two servers. This
> > > is basically trying to simulate the case where two clients are competing
> > > to rename files in the same directory on the same server.
> > > 
> > > This test would usually pass vs. an NFSv4 server that doesn't have
> > > dfdd2630a7398 ("nfsd: fix change_info in NFSv4 RENAME replies"), because
> > > the client would end up improperly invalidating the dcache for the whole
> > > dir after most RENAMEs.
> > > 
> > > However, this test doesn't (and shouldn't) pass on NFS, because the
> > > client has no idea that a rename has happened on the second mount. The
> > > expected behavior for the NFS client is for it to use the cache timeouts
> > > in this case, which is what it now does with the above server bug fixed.
> > > 
> > > Exempt NFS from running this test, since we don't expect it to pass.
> > > 
> > > Cc: Yongcheng Yang <yoyang@redhat.com>
> > > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > > ---
> > 
> > This case is written for a nfs fix at first. If nfs would like to skip this
> > test, I don't know if it makes sense to keep it in fstests?
> > 
> > 
> 
> It might make sense to keep this test in place for stuff like cephfs,
> but if dropping it altogether is best, then that's fine with me.

Oh, I forgot this:

Reviewed-by: Zorro Lang <zlang@redhat.com>

> 
> > 
> > >  tests/generic/732 | 4 +---
> > >  1 file changed, 1 insertion(+), 3 deletions(-)
> > > 
> > > diff --git a/tests/generic/732 b/tests/generic/732
> > > index 785aac58f361..5b5087d5accd 100755
> > > --- a/tests/generic/732
> > > +++ b/tests/generic/732
> > > @@ -22,9 +22,7 @@ _cleanup()
> > >  }
> > >  
> > >  # real QA test starts here
> > > -_supported_fs generic
> > > -[ "$FSTYP" = "nfs" ] && _fixed_by_kernel_commit fdd2630a739819 \
> > > -	"nfsd: fix change_info in NFSv4 RENAME replies"
> > > +_supported_fs ^nfs
> > >  
> > >  _require_test
> > >  _require_scratch
> > > 
> > > -- 
> > > 2.43.0
> > > 
> > > 
> > 
> 
> -- 
> Jeff Layton <jlayton@kernel.org>
>
diff mbox series

Patch

diff --git a/tests/generic/732 b/tests/generic/732
index 785aac58f361..5b5087d5accd 100755
--- a/tests/generic/732
+++ b/tests/generic/732
@@ -22,9 +22,7 @@  _cleanup()
 }
 
 # real QA test starts here
-_supported_fs generic
-[ "$FSTYP" = "nfs" ] && _fixed_by_kernel_commit fdd2630a739819 \
-	"nfsd: fix change_info in NFSv4 RENAME replies"
+_supported_fs ^nfs
 
 _require_test
 _require_scratch