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:
+2
-2
@@ -31,7 +31,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
|
||||
getfattr()
|
||||
{
|
||||
$GETFATTR_PROG --absolute-names -dh $@ 2>&1 | _filter_scratch
|
||||
_getfattr --absolute-names -dh $@ 2>&1 | _filter_scratch
|
||||
}
|
||||
|
||||
setfattr()
|
||||
@@ -166,7 +166,7 @@ _backup()
|
||||
# we *do* sort the output by path, since it otherwise would depend on
|
||||
# readdir order, which on some filesystems may change after re-creating
|
||||
# the files.
|
||||
$GETFATTR_PROG --absolute-names -dh -R -m '.' $SCRATCH_MNT | _sort_getfattr_output >$1
|
||||
_getfattr --absolute-names -dh -R -m '.' $SCRATCH_MNT | _sort_getfattr_output >$1
|
||||
echo BACKUP $1 >>$seqres.full
|
||||
cat $1 >> $seqres.full
|
||||
[ ! -s $1 ] && echo "warning: $1 (backup file) is empty"
|
||||
|
||||
Reference in New Issue
Block a user