generic: skip a few tests on NFS
Subsystems (2)
Jeff Layton
maintainercover generic: skip a few tests on NFS
There are some tests in xfstests generic section that fail or are unreliable for reasons that are known but are difficult to detect via feature tests.
Check the FSTYP on these tests and _notrun if it's "nfs". Also add some documenting comments as to why we skip them on NFS.
---
Jeff Layton (3):
generic/294: don't run this test on NFS
generic/357: don't run this test on NFS
generic/187: don't run this test on NFS
tests/generic/187 | 3 +++ tests/generic/294 | 4 ++++ tests/generic/357 | 5 +++++ 3 files changed, 12 insertions(+)
---
base-commit: 0ca1d4fbb2e9a492968f2951df101f24477f7991
change-id: 20230831-nfs-skip-7625a54f9e67
Best regards,
Signature · 1 line
Jeff Layton <[email protected]>
Jeff Layton
maintainerPATCH 1/3 generic/294: don't run this test on NFS
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.
--- tests/generic/294 | 4 ++++ 1 file changed, 4 insertions(+)
tests/generic/294 +4 -0
@@ -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
Signature · 1 line
2.41.0
Re: [PATCH fstests 1/3] generic/294: don't run this test on NFS
Quoted 15 lines · Jeff Layton
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 <[email protected]>--- tests/generic/294 | 4 ++++ 1 file changed, 4 insertions(+)tests/generic/294 +0
-0
tests/generic/294 _begin_fstest auto quick · line 23
Quoted 9 lines
tests/generic/294 +4
-0@@ -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
Quoted 5 lines
tests/generic/294 +0
-0_require_scratchSignature · 2 lines
-- 2.41.0
Jeff Layton
maintainerRe: [PATCH fstests 1/3] generic/294: don't run this test on NFS
Quoted 30 lines · Zorro Lang
Quoted 15 lines · Jeff Layton
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 <[email protected]>--- tests/generic/294 | 4 ++++ 1 file changed, 4 insertions(+)tests/generic/294 +0
-0tests/generic/294 _begin_fstest auto quick · line 23
Quoted 9 lines
tests/generic/294 +4
-0@@ -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 genericI 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_fshelper can use a black list, likes:
Quoted 5 lines
_supported_fs^nfsIf 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.
Signature · 1 line
Jeff Layton <[email protected]>
Jeff Layton
maintainerPATCH 2/3 generic/357: don't run this test on NFS
In reply to Jeff LaytonNFS doesn't keep track of whether a file is reflinked or not, so it doesn't prevent this behavior. It shouldn't be a problem for NFS anyway, so just skip this test there.
--- tests/generic/357 | 5 +++++ 1 file changed, 5 insertions(+)
tests/generic/357 +5 -0
@@ -24,6 +24,11 @@ _cleanup() . ./common/reflink # real QA test starts here + +# For NFS, a reflink is just a CLONE operation, and after that +# point it's dealt with by the server. +test $FSTYP = "nfs" && _notrun "NFS allows reflinked swapfiles" + _require_scratch_swapfile _require_scratch_reflink _require_cp_reflink
Signature · 1 line
2.41.0
Jeff Layton
maintainerPATCH 3/3 generic/187: don't run this test on NFS
In reply to Jeff LaytonThis test is unreliable on NFS. It fails consistently when run vs. a server exporting btrfs, but passes when the server exports xfs. Since we don't have any sort of attribute that we can require to test this, just skip this one on NFS.
--- tests/generic/187 | 3 +++ 1 file changed, 3 insertions(+)
tests/generic/187 +3 -0
@@ -36,6 +36,9 @@ _require_xfs_io_command "fpunch" test $FSTYP = "btrfs" && _notrun "Can't fragment free space on btrfs." _require_odirect +# This test is unreliable on NFS, as it depends on the exported filesystem. +test $FSTYP = "nfs" && _notrun "This test is unreliable on NFS" + _fragment_freesp() { file=$1
Signature · 1 line
2.41.0