Skip to contentSkip to conversation

erofs-utils: tests: double-quote entries assignment in _check_xattrs

PATCH In review Yue Hu 2 participants 2 messages Nov 24, 2023

lore
Share & tools
lore

Yue Hu

author
#0 lore raw

PATCH 1/2 erofs-utils: tests: double-quote entries assignment in _check_xattrs

From: Yue Hu <[email protected]>

Otherwise, may cause below error:

./erofs/019: 353: local: include/erofs: bad variable name
FAIL: erofs/019

Additionally, adjust the -type f test before the -printf action to avoid retrieving non-regular file names.

---
 tests/common/rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/common/rc +1 -1
index f234fdc..cdc72a9 100644
@@ -350,7 +350,7 @@ _check_xattrs()
 {
 	local dir1="$1"
 	local dir2="$2"
-	local entries=`find $dir1 -mindepth 1 -printf '%P\n' -type f`
+	local entries="`find $dir1 -mindepth 1 -type f -printf '%P\n'`"
 
 	for entry in $entries; do
 		xattr1=`getfattr --absolute-names -d $dir1/$entry | tail -n+2`
Signature · 1 line
2.17.1
#1 lore raw
Quoted 11 lines · Yue Hu

From: Yue Hu <[email protected]>

Otherwise, may cause below error:

./erofs/019: 353: local: include/erofs: bad variable name
FAIL: erofs/019

Additionally, adjust the -type f test before the -printf action to avoid retrieving non-regular file names.

Thanks, folded this with your SoB.

Thanks,
Gao Xiang