mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
fstests: filter redundant output by getfattr
When getfattr dumps values of all extended attributes (-d option),
it doesn't print empty extended attributes. e.g: user.name. But from
attr-2.4.48 this behavior is changed, new getfattr prints
user.name="".
The {=""} will break the golden image, so filter the redundant =""
at the end if it has.
Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
+4
-4
@@ -35,9 +35,9 @@ _attr()
|
||||
return $exit
|
||||
}
|
||||
|
||||
_getfattr()
|
||||
do_getfattr()
|
||||
{
|
||||
$GETFATTR_PROG $* 2>$tmp.err >$tmp.out
|
||||
_getfattr $* 2>$tmp.err >$tmp.out
|
||||
exit=$?
|
||||
_filter $tmp.out
|
||||
_filter $tmp.err 1>&2
|
||||
@@ -49,7 +49,7 @@ _attr_list()
|
||||
file=$1
|
||||
|
||||
echo " *** print attributes"
|
||||
if ! _getfattr -d -e text --absolute-names $file
|
||||
if ! do_getfattr -d -e text --absolute-names $file
|
||||
then
|
||||
echo " !!! error return"
|
||||
return 1
|
||||
@@ -110,7 +110,7 @@ done
|
||||
|
||||
echo "*** check"
|
||||
# don't print it all out...
|
||||
getfattr --absolute-names $testfile \
|
||||
_getfattr --absolute-names $testfile \
|
||||
| tee -a $seqres.full \
|
||||
| $AWK_PROG '
|
||||
/^#/ { next }
|
||||
|
||||
Reference in New Issue
Block a user