All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/1] generic/{453,454}: Do NOT run for FSs restricting names
@ 2021-07-08 16:35 Pavel Reichl
  2021-07-08 16:35 ` [PATCH v3 1/1] generic/{453,454}: Don't " Pavel Reichl
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Reichl @ 2021-07-08 16:35 UTC (permalink / raw)
  To: fstests

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

-- 
2.31.1


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

* [PATCH v3 1/1] generic/{453,454}: Don't run for FSs restricting names
  2021-07-08 16:35 [PATCH v3 0/1] generic/{453,454}: Do NOT run for FSs restricting names Pavel Reichl
@ 2021-07-08 16:35 ` Pavel Reichl
  2021-07-09  1:25   ` Darrick J. Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Reichl @ 2021-07-08 16:35 UTC (permalink / raw)
  To: fstests

Running generic/{453,454} tests is probably only useful for filesystems
that allow unrestricted byte streams for names.

Signed-off-by: Pavel Reichl <preichl@redhat.com>
Suggested-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
---
 common/rc         | 13 +++++++++++++
 tests/generic/453 |  1 +
 tests/generic/454 |  1 +
 3 files changed, 15 insertions(+)

diff --git a/common/rc b/common/rc
index d4ad421e..d4b1f21f 100644
--- a/common/rc
+++ b/common/rc
@@ -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
 
 ################################################################################
diff --git a/tests/generic/453 b/tests/generic/453
index 55ddcc01..a0fb802e 100755
--- a/tests/generic/453
+++ b/tests/generic/453
@@ -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
diff --git a/tests/generic/454 b/tests/generic/454
index 3aefa9f0..133e2e9d 100755
--- a/tests/generic/454
+++ b/tests/generic/454
@@ -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
-- 
2.31.1


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

* Re: [PATCH v3 1/1] generic/{453,454}: Don't run for FSs restricting names
  2021-07-08 16:35 ` [PATCH v3 1/1] generic/{453,454}: Don't " Pavel Reichl
@ 2021-07-09  1:25   ` Darrick J. Wong
  0 siblings, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2021-07-09  1:25 UTC (permalink / raw)
  To: Pavel Reichl; +Cc: fstests

On Thu, Jul 08, 2021 at 06:35:18PM +0200, Pavel Reichl wrote:
> Running generic/{453,454} tests is probably only useful for filesystems
> that allow unrestricted byte streams for names.
> 
> Signed-off-by: Pavel Reichl <preichl@redhat.com>
> Suggested-by: Darrick J. Wong <djwong@kernel.org>
> Reviewed-by: Theodore Ts'o <tytso@mit.edu>
> ---

Looks good to me now,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

>  common/rc         | 13 +++++++++++++
>  tests/generic/453 |  1 +
>  tests/generic/454 |  1 +
>  3 files changed, 15 insertions(+)
> 
> diff --git a/common/rc b/common/rc
> index d4ad421e..d4b1f21f 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -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
>  
>  ################################################################################
> diff --git a/tests/generic/453 b/tests/generic/453
> index 55ddcc01..a0fb802e 100755
> --- a/tests/generic/453
> +++ b/tests/generic/453
> @@ -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
> diff --git a/tests/generic/454 b/tests/generic/454
> index 3aefa9f0..133e2e9d 100755
> --- a/tests/generic/454
> +++ b/tests/generic/454
> @@ -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
> -- 
> 2.31.1
> 

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

end of thread, other threads:[~2021-07-09  1:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-08 16:35 [PATCH v3 0/1] generic/{453,454}: Do NOT run for FSs restricting names Pavel Reichl
2021-07-08 16:35 ` [PATCH v3 1/1] generic/{453,454}: Don't " Pavel Reichl
2021-07-09  1:25   ` Darrick J. Wong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.