common/casefold: only check for the Casefold flag
authorTheodore Ts'o <tytso@mit.edu>
Mon, 26 Aug 2019 17:50:20 +0000 (13:50 -0400)
committerEryu Guan <guaneryu@gmail.com>
Sat, 31 Aug 2019 16:19:41 +0000 (00:19 +0800)
The _casefold_lsattr_dir function lists all of the file attributes.
As result, tests/generic/556.out has an ext4-specific assumption
that the test directories will have the Extents attribute. That
won't be true for all file systems, and it won't even be true for
ext4 file systems that do not have the extents feature enabled.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/casefold
tests/generic/556.out

index 051fd1d10e7ab3e82b6bebfc92b9613274fea28e..2a7ab3ebef201f1f81e0406cc576a2359bf9eff1 100644 (file)
@@ -86,5 +86,9 @@ _casefold_unset_attr()
 
 _casefold_lsattr_dir()
 {
-       $LSATTR_PROG -ld "${1}" | _filter_spaces
+       if $LSATTR_PROG -ld "${1}" | grep -q Casefold ; then
+               echo "${1} Casefold"
+       else
+               echo "${1}"
+       fi
 }
index 1573c8b1f7827f4a263068c83eb84a7c4ba3d3d8..476560657311f3a4f400c1c20adc526df2173f2c 100644 (file)
@@ -1,9 +1,9 @@
 QA output created by 556
-SCRATCH_MNT/basic Extents, Casefold
-SCRATCH_MNT/basic Extents
-SCRATCH_MNT/casefold_flag_removal Extents, Casefold
-SCRATCH_MNT/casefold_flag_removal Extents, Casefold
-SCRATCH_MNT/flag_inheritance/d1/d2/d3 Extents, Casefold
+SCRATCH_MNT/basic Casefold
+SCRATCH_MNT/basic
+SCRATCH_MNT/casefold_flag_removal Casefold
+SCRATCH_MNT/casefold_flag_removal Casefold
+SCRATCH_MNT/flag_inheritance/d1/d2/d3 Casefold
 SCRATCH_MNT/symlink/ind1/TARGET
 mv: cannot stat 'SCRATCH_MNT/rename/rename': No such file or directory
 # file: SCRATCH_MNT/xattrs/x