[PATCH 1/2] erofs-utils: tests: double-quote entries assignment in _check_xattrs
Yue Hu
zbestahu at gmail.com
Fri Nov 24 14:35:42 AEDT 2023
From: Yue Hu <huyue2 at coolpad.com>
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.
Signed-off-by: Yue Hu <huyue2 at coolpad.com>
---
tests/common/rc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/common/rc b/tests/common/rc
index f234fdc..cdc72a9 100644
--- a/tests/common/rc
+++ b/tests/common/rc
@@ -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`
--
2.17.1
More information about the Linux-erofs
mailing list