generic/{453,454}: Do NOT run for FSs restricting names
v3 cover generic/{453,454}: Do NOT run for FSs restricting names
Hello,
this is a quick attempt to finish what was discussed in thread:
generic/453: Exclude filenames that are not supported by exfat https://www.spinics.net/lists/fstests/msg16328.html
Based on Darrick's comments:
"""
TBH I think these tests (g/453 and g/454) are probably only useful for filesystems that allow unrestricted byte streams for names. """
and_require_names_are_bytes()
"""
Nowadays with wider testing of other filesystems (thanks, Red Hat!) we should hide these behind _require_names_are_bytes or move them to tests/xfs/.
"""
Changes in V2:
* Added description for _require_names_are_bytes()
* Added _require_names_are_bytes() to g/454 as well
* fixed typo s/now/not/
Changes in V3:
* Added f2fs to the list of FSs that treat file names as unrestricted byte streams
Pavel Reichl (1):
generic/{453,454}: Don't run for FSs restricting names
common/rc | 13 +++++++++++++ tests/generic/453 | 1 + tests/generic/454 | 1 + 3 files changed, 15 insertions(+)
Signature · 1 line
2.31.1
PATCH v3 1/1 generic/{453,454}: Don't run for FSs restricting names
Running generic/{453,454} tests is probably only useful for filesystems that allow unrestricted byte streams for names.
--- common/rc | 13 +++++++++++++ tests/generic/453 | 1 + tests/generic/454 | 1 + 3 files changed, 15 insertions(+)
common/rc +13 -0
@@ -4599,6 +4599,19 @@ _require_od_endian_flag() _notrun "od does not support endian flag" } +# Skip this test unless the filesystem treats names (directory entries, +# fs labels, and extended attribute names) as raw byte sequences. +_require_names_are_bytes() { + case "$FSTYP" in + ext2|ext3|ext4|f2fs|xfs|btrfs) + # do nothing + ;; + *) + _notrun "$FSTYP does not allow unrestricted byte streams for names" + ;; + esac +} + init_rc ################################################################################
tests/generic/453 +1 -0
@@ -15,6 +15,7 @@ _begin_fstest auto quick dir # Import common functions. _require_scratch +_require_names_are_bytes echo "Format and mount" _scratch_mkfs > $seqres.full 2>&1
tests/generic/454 +1 -0
@@ -17,6 +17,7 @@ _begin_fstest auto quick attr _require_scratch _require_attrs +_require_names_are_bytes echo "Format and mount" _scratch_mkfs > $seqres.full 2>&1
Signature · 1 line
2.31.1
Re: [PATCH v3 1/1] generic/{453,454}: Don't run for FSs restricting names
Quoted 7 lines · Pavel Reichl
Running generic/{453,454} tests is probably only useful for filesystems that allow unrestricted byte streams for names.
Signed-off-by Pavel Reichl <[email protected]>Suggested-by Darrick J. Wong <[email protected]>Reviewed-by Theodore Ts'o <[email protected]>---
Looks good to me now,
--D
Quoted 56 lines
common/rc | 13 +++++++++++++ tests/generic/453 | 1 + tests/generic/454 | 1 + 3 files changed, 15 insertions(+)common/rc +13
-0@@ -4599,6 +4599,19 @@ _require_od_endian_flag() _notrun "od does not support endian flag" } +# Skip this test unless the filesystem treats names (directory entries, +# fs labels, and extended attribute names) as raw byte sequences. +_require_names_are_bytes() { + case "$FSTYP" in + ext2|ext3|ext4|f2fs|xfs|btrfs) + # do nothing + ;; + *) + _notrun "$FSTYP does not allow unrestricted byte streams for names" + ;; + esac +} + init_rc ################################################################################tests/generic/453 +1
-0@@ -15,6 +15,7 @@ _begin_fstest auto quick dir # Import common functions. _require_scratch +_require_names_are_bytes echo "Format and mount" _scratch_mkfs > $seqres.full 2>&1tests/generic/454 +1
-0@@ -17,6 +17,7 @@ _begin_fstest auto quick attr _require_scratch _require_attrs +_require_names_are_bytes echo "Format and mount" _scratch_mkfs > $seqres.full 2>&1Signature · 1 line
2.31.1