Skip to contentSkip to conversation

common/casefold: only check for the Casefold flag

PATCH In review Theodore Ts'o 3 participants 4 messages Aug 26, 2019 – Aug 27, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common/casefold: only check for the Casefold flag

The _casefold_lsattr_dir function lists all of the file attributes. As result, tests/generic/556.out has an ext4-specific assumption that files 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.

---
 common/casefold       |  6 +++++-
 tests/generic/556.out | 10 +++++-----
 2 files changed, 10 insertions(+), 6 deletions(-)
common/casefold +5 -1
index 051fd1d1..2a7ab3eb 100644
@@ -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
 }
tests/generic/556.out +5 -5
index 1573c8b1..47656065 100644
@@ -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
Signature · 1 line
2.23.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Theodore Ts'o

The _casefold_lsattr_dir function lists all of the file attributes. As result, tests/generic/556.out has an ext4-specific assumption that files 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.

Signature · 1 line
Gabriel Krisman Bertazi
#2 lore raw
In reply to Theodore Ts'o
Quoted 3 lines · Theodore Ts'o

The _casefold_lsattr_dir function lists all of the file attributes. As result, tests/generic/556.out has an ext4-specific assumption that files will have the Extents attribute. That won't be true for all

"files" above should probably be changed "the test directories".

Eryu, can you make that change before you apply the patch, or do you want me to resend?

Quoted 4 lines

file systems, and it won't even be true for ext4 file systems that do not have the extents feature enabled.

- Ted

#3 lore raw
Quoted 8 lines · Theodore Y. Ts'o
Quoted 3 lines · Theodore Ts'o

The _casefold_lsattr_dir function lists all of the file attributes. As result, tests/generic/556.out has an ext4-specific assumption that files will have the Extents attribute. That won't be true for all

"files" above should probably be changed "the test directories".

Eryu, can you make that change before you apply the patch, or do you

Sure, I can fix it on commit.

Quoted 8 lines

want me to resend?

Quoted 4 lines

file systems, and it won't even be true for ext4 file systems that do not have the extents feature enabled.

- Ted

Thanks!

Eryu