diff mbox series

[fstests,1/3] generic/294: don't run this test on NFS

Message ID 20230831-nfs-skip-v1-1-d54c1c6a9af2@kernel.org (mailing list archive)
State New, archived
Headers show
Series generic: skip a few tests on NFS | expand

Commit Message

Jeff Layton Aug. 31, 2023, 6:40 p.m. UTC
When creating a new dentry (of any type), NFS will optimize away any
on-the-wire lookups prior to the create since that means an extra
round trip to the server. Because of that, it consistently fails this
test.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 tests/generic/294 | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Zorro Lang Sept. 1, 2023, 5:14 a.m. UTC | #1
On Thu, Aug 31, 2023 at 02:40:28PM -0400, Jeff Layton wrote:
> When creating a new dentry (of any type), NFS will optimize away any
> on-the-wire lookups prior to the create since that means an extra
> round trip to the server. Because of that, it consistently fails this
> test.
> 
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
>  tests/generic/294 | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tests/generic/294 b/tests/generic/294
> index 406b1b3954b9..777b62aec9ad 100755
> --- a/tests/generic/294
> +++ b/tests/generic/294
> @@ -15,6 +15,10 @@ _begin_fstest auto quick
>  
>  # real QA test starts here
>  
> +# NFS will optimize away the on-the-wire lookup before attempting to
> +# create a new file (since that means an extra round trip).
> +test $FSTYP = "nfs"  && _notrun "NFS optmizes away lookups on exclusive creates"
> +
>  # Modify as appropriate.
>  _supported_fs generic

I don't know if nfs-list wants to skip these test cases on nfs. Anyway, if
there's not an objection from nfs team, the _supported_fs helper can use
a black list, likes:

  _supported_fs ^nfs

If a test case doesn't support nfs totally, you can use this and give it a
proper comment.

Thanks,
Zorro

>  _require_scratch
> 
> -- 
> 2.41.0
>
Jeff Layton Sept. 1, 2023, 10:21 a.m. UTC | #2
On Fri, 2023-09-01 at 13:14 +0800, Zorro Lang wrote:
> On Thu, Aug 31, 2023 at 02:40:28PM -0400, Jeff Layton wrote:
> > When creating a new dentry (of any type), NFS will optimize away any
> > on-the-wire lookups prior to the create since that means an extra
> > round trip to the server. Because of that, it consistently fails this
> > test.
> > 
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > ---
> >  tests/generic/294 | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/tests/generic/294 b/tests/generic/294
> > index 406b1b3954b9..777b62aec9ad 100755
> > --- a/tests/generic/294
> > +++ b/tests/generic/294
> > @@ -15,6 +15,10 @@ _begin_fstest auto quick
> >  
> >  # real QA test starts here
> >  
> > +# NFS will optimize away the on-the-wire lookup before attempting to
> > +# create a new file (since that means an extra round trip).
> > +test $FSTYP = "nfs"  && _notrun "NFS optmizes away lookups on exclusive creates"
> > +
> >  # Modify as appropriate.
> >  _supported_fs generic
> 
> I don't know if nfs-list wants to skip these test cases on nfs. Anyway, if
> there's not an objection from nfs team, the _supported_fs helper can use
> a black list, likes:
> 
>   _supported_fs ^nfs
> 
> If a test case doesn't support nfs totally, you can use this and give it a
> proper comment.
> 

I think we do want to skip it. This one consistently fails on NFS and is
testing very specific and subtle behavior that is not required by POSIX.

I can respin these using the _supported_fs syntax if that's preferred
though.
diff mbox series

Patch

diff --git a/tests/generic/294 b/tests/generic/294
index 406b1b3954b9..777b62aec9ad 100755
--- a/tests/generic/294
+++ b/tests/generic/294
@@ -15,6 +15,10 @@  _begin_fstest auto quick
 
 # real QA test starts here
 
+# NFS will optimize away the on-the-wire lookup before attempting to
+# create a new file (since that means an extra round trip).
+test $FSTYP = "nfs"  && _notrun "NFS optmizes away lookups on exclusive creates"
+
 # Modify as appropriate.
 _supported_fs generic
 _require_scratch