public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH fstests 0/2] generic: skip a couple more tests on NFS
@ 2024-01-10 18:27 Jeff Layton
  2024-01-10 18:27 ` [PATCH fstests 1/2] generic/465: don't run it " Jeff Layton
  2024-01-10 18:27 ` [PATCH fstests 2/2] generic/732: " Jeff Layton
  0 siblings, 2 replies; 8+ messages in thread
From: Jeff Layton @ 2024-01-10 18:27 UTC (permalink / raw)
  To: Anna Schumaker, Trond Myklebust, Chuck Lever, Yongcheng Yang,
	linux-nfs, fstests, Jeff Layton

Both of these tests don't and aren't expected to ever pass on NFS.
Remove them from their _supported_fs lists.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
Jeff Layton (2):
      generic/465: don't run it on NFS
      generic/732: don't run it on NFS

 tests/generic/465 | 2 +-
 tests/generic/732 | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)
---
base-commit: f814a0d8b89c84055b4351f8b9655c5868db08ba
change-id: 20240110-fixes-701e439421c1

Best regards,
-- 
Jeff Layton <jlayton@kernel.org>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH fstests 1/2] generic/465: don't run it on NFS
  2024-01-10 18:27 [PATCH fstests 0/2] generic: skip a couple more tests on NFS Jeff Layton
@ 2024-01-10 18:27 ` Jeff Layton
  2024-01-11 20:47   ` Zorro Lang
  2024-01-10 18:27 ` [PATCH fstests 2/2] generic/732: " Jeff Layton
  1 sibling, 1 reply; 8+ messages in thread
From: Jeff Layton @ 2024-01-10 18:27 UTC (permalink / raw)
  To: Anna Schumaker, Trond Myklebust, Chuck Lever, Yongcheng Yang,
	linux-nfs, fstests, Jeff Layton

This test kicks off a thread that issues a read against a file, while
writing to the file in 1M chunks. It expects that the reader will see
either the written data or a short read.

NFS allows DIO reads and writes to run in parallel. That means that it's
possible for them to race and the reader to see NULLs in the file if
things get reordered.

Just skip this test on NFS, since we can't guarantee that it will
reliably pass.

Cc: Anna Schumaker <anna@kernel.org>
Cc: Trond Myklebust <trondmy@hammerspace.com>
Cc: Chuck Lever <chuck.lever@oracle.com>
Link: https://lore.kernel.org/linux-nfs/2f7f6d4490ac08013ef78481ff5c7840f41b1bb4.camel@kernel.org/
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 tests/generic/465 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/generic/465 b/tests/generic/465
index 73fdfb5548af..0745d6a1dd3a 100755
--- a/tests/generic/465
+++ b/tests/generic/465
@@ -21,7 +21,7 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_supported_fs generic
+_supported_fs ^nfs
 
 _require_aiodio aio-dio-append-write-read-race
 _require_test_program "feature"

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH fstests 2/2] generic/732: don't run it on NFS
  2024-01-10 18:27 [PATCH fstests 0/2] generic: skip a couple more tests on NFS Jeff Layton
  2024-01-10 18:27 ` [PATCH fstests 1/2] generic/465: don't run it " Jeff Layton
@ 2024-01-10 18:27 ` Jeff Layton
  2024-01-11 20:49   ` Zorro Lang
  1 sibling, 1 reply; 8+ messages in thread
From: Jeff Layton @ 2024-01-10 18:27 UTC (permalink / raw)
  To: Anna Schumaker, Trond Myklebust, Chuck Lever, Yongcheng Yang,
	linux-nfs, fstests, Jeff Layton

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(-)

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH fstests 1/2] generic/465: don't run it on NFS
  2024-01-10 18:27 ` [PATCH fstests 1/2] generic/465: don't run it " Jeff Layton
@ 2024-01-11 20:47   ` Zorro Lang
  0 siblings, 0 replies; 8+ messages in thread
From: Zorro Lang @ 2024-01-11 20:47 UTC (permalink / raw)
  To: Jeff Layton
  Cc: Anna Schumaker, Trond Myklebust, Chuck Lever, Yongcheng Yang,
	linux-nfs, fstests

On Wed, Jan 10, 2024 at 01:27:27PM -0500, Jeff Layton wrote:
> This test kicks off a thread that issues a read against a file, while
> writing to the file in 1M chunks. It expects that the reader will see
> either the written data or a short read.
> 
> NFS allows DIO reads and writes to run in parallel. That means that it's
> possible for them to race and the reader to see NULLs in the file if
> things get reordered.
> 
> Just skip this test on NFS, since we can't guarantee that it will
> reliably pass.
> 
> Cc: Anna Schumaker <anna@kernel.org>
> Cc: Trond Myklebust <trondmy@hammerspace.com>
> Cc: Chuck Lever <chuck.lever@oracle.com>
> Link: https://lore.kernel.org/linux-nfs/2f7f6d4490ac08013ef78481ff5c7840f41b1bb4.camel@kernel.org/
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---

I've seen several nfs folks agree to skip it on nfs, and no any objection,
so I'll merge this change.

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

>  tests/generic/465 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/generic/465 b/tests/generic/465
> index 73fdfb5548af..0745d6a1dd3a 100755
> --- a/tests/generic/465
> +++ b/tests/generic/465
> @@ -21,7 +21,7 @@ _cleanup()
>  . ./common/filter
>  
>  # real QA test starts here
> -_supported_fs generic
> +_supported_fs ^nfs
>  
>  _require_aiodio aio-dio-append-write-read-race
>  _require_test_program "feature"
> 
> -- 
> 2.43.0
> 
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH fstests 2/2] generic/732: don't run it on NFS
  2024-01-10 18:27 ` [PATCH fstests 2/2] generic/732: " Jeff Layton
@ 2024-01-11 20:49   ` Zorro Lang
  2024-01-11 21:13     ` Jeff Layton
  0 siblings, 1 reply; 8+ messages in thread
From: Zorro Lang @ 2024-01-11 20:49 UTC (permalink / raw)
  To: Jeff Layton
  Cc: Anna Schumaker, Trond Myklebust, Chuck Lever, Yongcheng Yang,
	linux-nfs, fstests

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
> 
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH fstests 2/2] generic/732: don't run it on NFS
  2024-01-11 20:49   ` Zorro Lang
@ 2024-01-11 21:13     ` Jeff Layton
  2024-01-12 13:35       ` Zorro Lang
  2024-01-12 13:36       ` Zorro Lang
  0 siblings, 2 replies; 8+ messages in thread
From: Jeff Layton @ 2024-01-11 21:13 UTC (permalink / raw)
  To: Zorro Lang
  Cc: Anna Schumaker, Trond Myklebust, Chuck Lever, Yongcheng Yang,
	linux-nfs, fstests

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
> > 
> > 
> 

-- 
Jeff Layton <jlayton@kernel.org>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH fstests 2/2] generic/732: don't run it on NFS
  2024-01-11 21:13     ` Jeff Layton
@ 2024-01-12 13:35       ` Zorro Lang
  2024-01-12 13:36       ` Zorro Lang
  1 sibling, 0 replies; 8+ messages in thread
From: Zorro Lang @ 2024-01-12 13:35 UTC (permalink / raw)
  To: Jeff Layton
  Cc: Anna Schumaker, Trond Myklebust, Chuck Lever, Yongcheng Yang,
	linux-nfs, fstests

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>
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH fstests 2/2] generic/732: don't run it on NFS
  2024-01-11 21:13     ` Jeff Layton
  2024-01-12 13:35       ` Zorro Lang
@ 2024-01-12 13:36       ` Zorro Lang
  1 sibling, 0 replies; 8+ messages in thread
From: Zorro Lang @ 2024-01-12 13:36 UTC (permalink / raw)
  To: Jeff Layton
  Cc: Anna Schumaker, Trond Myklebust, Chuck Lever, Yongcheng Yang,
	linux-nfs, fstests

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>
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-01-12 13:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-10 18:27 [PATCH fstests 0/2] generic: skip a couple more tests on NFS Jeff Layton
2024-01-10 18:27 ` [PATCH fstests 1/2] generic/465: don't run it " Jeff Layton
2024-01-11 20:47   ` Zorro Lang
2024-01-10 18:27 ` [PATCH fstests 2/2] generic/732: " Jeff Layton
2024-01-11 20:49   ` Zorro Lang
2024-01-11 21:13     ` Jeff Layton
2024-01-12 13:35       ` Zorro Lang
2024-01-12 13:36       ` Zorro Lang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox