generic/{453,454}: Don't run for FSs restricting names
authorPavel Reichl <preichl@redhat.com>
Thu, 8 Jul 2021 16:35:18 +0000 (18:35 +0200)
committerEryu Guan <guaneryu@gmail.com>
Sun, 18 Jul 2021 13:51:59 +0000 (21:51 +0800)
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>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/rc
tests/generic/453
tests/generic/454

index d4ad421..d4b1f21 100644 (file)
--- 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
 
 ################################################################################
index 55ddcc0..a0fb802 100755 (executable)
@@ -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
index 3aefa9f..133e2e9 100755 (executable)
@@ -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