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:
+12
@@ -224,6 +224,18 @@ _sort_getfattr_output()
|
|||||||
awk '{a[FNR]=$0}END{n = asort(a); for(i=1; i <= n; i++) print a[i]"\n"}' RS=''
|
awk '{a[FNR]=$0}END{n = asort(a); for(i=1; i <= n; i++) print a[i]"\n"}' RS=''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Previously, when getfattr dumps values of all extended attributes, it prints
|
||||||
|
# empty attr as 'user.name', but new getfattr (since attr-2.4.48) prints it as
|
||||||
|
# 'user.name=""'. Filter out the ending '=""' so that both old and new getfattr
|
||||||
|
# pints the same output.
|
||||||
|
#
|
||||||
|
# Note: This function returns the getfattr command result.
|
||||||
|
_getfattr()
|
||||||
|
{
|
||||||
|
$GETFATTR_PROG "$@" | sed -e 's/=\"\"//'
|
||||||
|
return ${PIPESTATUS[0]}
|
||||||
|
}
|
||||||
|
|
||||||
# set maximum total attr space based on fs type
|
# set maximum total attr space based on fs type
|
||||||
case "$FSTYP" in
|
case "$FSTYP" in
|
||||||
xfs|udf|pvfs2|9p|ceph)
|
xfs|udf|pvfs2|9p|ceph)
|
||||||
|
|||||||
+1
-1
@@ -151,7 +151,7 @@ done
|
|||||||
|
|
||||||
# Dump all xattrs to see whether nothing broke
|
# Dump all xattrs to see whether nothing broke
|
||||||
for FILE in ${FNAMES[@]}; do
|
for FILE in ${FNAMES[@]}; do
|
||||||
$GETFATTR_PROG -h -d --absolute-names $SCRATCH_MNT/$FILE 2>/dev/null | \
|
_getfattr -h -d --absolute-names $SCRATCH_MNT/$FILE 2>/dev/null | \
|
||||||
_filter_scratch | sort
|
_filter_scratch | sort
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -51,14 +51,14 @@ attr_set()
|
|||||||
$SETFATTR_PROG -n $name $file
|
$SETFATTR_PROG -n $name $file
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tmp=$($GETFATTR_PROG --absolute-names --only-values -n $name $file)
|
tmp=$(_getfattr --absolute-names --only-values -n $name $file)
|
||||||
[[ "$tmp" == "$value" ]] || echo "unexpected value returned: $tmp"
|
[[ "$tmp" == "$value" ]] || echo "unexpected value returned: $tmp"
|
||||||
}
|
}
|
||||||
|
|
||||||
# List attributes on a file.
|
# List attributes on a file.
|
||||||
attr_list()
|
attr_list()
|
||||||
{
|
{
|
||||||
$GETFATTR_PROG --absolute-names $1 | grep -v '^#'
|
_getfattr --absolute-names $1 | grep -v '^#'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Removes an extended attribute from a file.
|
# Removes an extended attribute from a file.
|
||||||
|
|||||||
+4
-4
@@ -35,9 +35,9 @@ _attr()
|
|||||||
return $exit
|
return $exit
|
||||||
}
|
}
|
||||||
|
|
||||||
_getfattr()
|
do_getfattr()
|
||||||
{
|
{
|
||||||
$GETFATTR_PROG $* 2>$tmp.err >$tmp.out
|
_getfattr $* 2>$tmp.err >$tmp.out
|
||||||
exit=$?
|
exit=$?
|
||||||
_filter $tmp.out
|
_filter $tmp.out
|
||||||
_filter $tmp.err 1>&2
|
_filter $tmp.err 1>&2
|
||||||
@@ -49,7 +49,7 @@ _attr_list()
|
|||||||
file=$1
|
file=$1
|
||||||
|
|
||||||
echo " *** print attributes"
|
echo " *** print attributes"
|
||||||
if ! _getfattr -d -e text --absolute-names $file
|
if ! do_getfattr -d -e text --absolute-names $file
|
||||||
then
|
then
|
||||||
echo " !!! error return"
|
echo " !!! error return"
|
||||||
return 1
|
return 1
|
||||||
@@ -110,7 +110,7 @@ done
|
|||||||
|
|
||||||
echo "*** check"
|
echo "*** check"
|
||||||
# don't print it all out...
|
# don't print it all out...
|
||||||
getfattr --absolute-names $testfile \
|
_getfattr --absolute-names $testfile \
|
||||||
| tee -a $seqres.full \
|
| tee -a $seqres.full \
|
||||||
| $AWK_PROG '
|
| $AWK_PROG '
|
||||||
/^#/ { next }
|
/^#/ { next }
|
||||||
|
|||||||
+1
-1
@@ -76,7 +76,7 @@ set_xattr_loop $test_file &
|
|||||||
setter_pid=$!
|
setter_pid=$!
|
||||||
|
|
||||||
for ((i = 0; i < 1000; i++)); do
|
for ((i = 0; i < 1000; i++)); do
|
||||||
$GETFATTR_PROG --absolute-names -n $xattr_name \
|
_getfattr --absolute-names -n $xattr_name \
|
||||||
$SCRATCH_MNT/$test_file | value_filter
|
$SCRATCH_MNT/$test_file | value_filter
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -31,7 +31,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
|
|||||||
|
|
||||||
getfattr()
|
getfattr()
|
||||||
{
|
{
|
||||||
$GETFATTR_PROG --absolute-names -dh $@ 2>&1 | _filter_scratch
|
_getfattr --absolute-names -dh $@ 2>&1 | _filter_scratch
|
||||||
}
|
}
|
||||||
|
|
||||||
setfattr()
|
setfattr()
|
||||||
@@ -166,7 +166,7 @@ _backup()
|
|||||||
# we *do* sort the output by path, since it otherwise would depend on
|
# we *do* sort the output by path, since it otherwise would depend on
|
||||||
# readdir order, which on some filesystems may change after re-creating
|
# readdir order, which on some filesystems may change after re-creating
|
||||||
# the files.
|
# 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
|
echo BACKUP $1 >>$seqres.full
|
||||||
cat $1 >> $seqres.full
|
cat $1 >> $seqres.full
|
||||||
[ ! -s $1 ] && echo "warning: $1 (backup file) is empty"
|
[ ! -s $1 ] && echo "warning: $1 (backup file) is empty"
|
||||||
|
|||||||
+2
-2
@@ -72,7 +72,7 @@ _flakey_drop_and_remount
|
|||||||
# with the 3 xattrs that we had before deleting the second one and fsyncing the
|
# with the 3 xattrs that we had before deleting the second one and fsyncing the
|
||||||
# file.
|
# file.
|
||||||
echo "xattr names and values after first fsync log replay:"
|
echo "xattr names and values after first fsync log replay:"
|
||||||
$GETFATTR_PROG --absolute-names --dump $SCRATCH_MNT/foobar | _filter_scratch
|
_getfattr --absolute-names --dump $SCRATCH_MNT/foobar | _filter_scratch
|
||||||
|
|
||||||
# Now write some data to our file, fsync it, remove the first xattr, add a new
|
# Now write some data to our file, fsync it, remove the first xattr, add a new
|
||||||
# hard link to our file and commit the fsync log by fsyncing some other new
|
# hard link to our file and commit the fsync log by fsyncing some other new
|
||||||
@@ -89,7 +89,7 @@ _flakey_drop_and_remount
|
|||||||
|
|
||||||
# Now only the xattr with name user.attr3 should be set in our file.
|
# Now only the xattr with name user.attr3 should be set in our file.
|
||||||
echo "xattr names and values after second fsync log replay:"
|
echo "xattr names and values after second fsync log replay:"
|
||||||
$GETFATTR_PROG --absolute-names --dump $SCRATCH_MNT/foobar | _filter_scratch
|
_getfattr --absolute-names --dump $SCRATCH_MNT/foobar | _filter_scratch
|
||||||
|
|
||||||
status=0
|
status=0
|
||||||
exit
|
exit
|
||||||
|
|||||||
+1
-1
@@ -63,7 +63,7 @@ $SETCAP_PROG cap_chown+ep $file
|
|||||||
$SETFATTR_PROG -n trusted.name -v value $file
|
$SETFATTR_PROG -n trusted.name -v value $file
|
||||||
echo data2 >> $file
|
echo data2 >> $file
|
||||||
cat $file
|
cat $file
|
||||||
$GETFATTR_PROG -m '^trusted\.*' --absolute-names $file | filefilter
|
_getfattr -m '^trusted\.*' --absolute-names $file | filefilter
|
||||||
|
|
||||||
echo "**** Verifying that chmod doesn't affect open file descriptors ****"
|
echo "**** Verifying that chmod doesn't affect open file descriptors ****"
|
||||||
rm -f $file
|
rm -f $file
|
||||||
|
|||||||
+1
-1
@@ -30,7 +30,7 @@ _cleanup()
|
|||||||
|
|
||||||
getfattr()
|
getfattr()
|
||||||
{
|
{
|
||||||
$GETFATTR_PROG --absolute-names "$@" |& _filter_test_dir
|
_getfattr --absolute-names "$@" |& _filter_test_dir
|
||||||
}
|
}
|
||||||
|
|
||||||
setfattr()
|
setfattr()
|
||||||
|
|||||||
+1
-1
@@ -49,7 +49,7 @@ $SETFATTR_PROG -n user.ping -v pong $SCRATCH_MNT/testfile
|
|||||||
|
|
||||||
# Now call getfattr with --dump, which calls the listxattrs system call.
|
# Now call getfattr with --dump, which calls the listxattrs system call.
|
||||||
# It should list all the xattrs we have set before.
|
# It should list all the xattrs we have set before.
|
||||||
$GETFATTR_PROG --absolute-names --dump $SCRATCH_MNT/testfile | _filter_scratch
|
_getfattr --absolute-names --dump $SCRATCH_MNT/testfile | _filter_scratch
|
||||||
|
|
||||||
status=0
|
status=0
|
||||||
exit
|
exit
|
||||||
|
|||||||
+3
-2
@@ -23,6 +23,7 @@ _cleanup()
|
|||||||
|
|
||||||
# get standard environment, filters and checks
|
# get standard environment, filters and checks
|
||||||
. ./common/rc
|
. ./common/rc
|
||||||
|
. ./common/attr
|
||||||
|
|
||||||
# remove previous $seqres.full before test
|
# remove previous $seqres.full before test
|
||||||
rm -f $seqres.full
|
rm -f $seqres.full
|
||||||
@@ -59,11 +60,11 @@ $GETRICHACL_PROG x
|
|||||||
mkdir sub
|
mkdir sub
|
||||||
$SETRICHACL_PROG --set 'everyone@:rwpxd:fd:allow' sub
|
$SETRICHACL_PROG --set 'everyone@:rwpxd:fd:allow' sub
|
||||||
stat -c %A+ sub
|
stat -c %A+ sub
|
||||||
$GETFATTR_PROG -m system\.richacl sub
|
_getfattr -m system\.richacl sub
|
||||||
|
|
||||||
chmod 775 sub
|
chmod 775 sub
|
||||||
stat -c %A+ sub
|
stat -c %A+ sub
|
||||||
$GETFATTR_PROG -m system\.richacl sub
|
_getfattr -m system\.richacl sub
|
||||||
$GETRICHACL_PROG sub
|
$GETRICHACL_PROG sub
|
||||||
|
|
||||||
touch sub/f
|
touch sub/f
|
||||||
|
|||||||
+1
-1
@@ -49,7 +49,7 @@ $SETFATTR_PROG -n trusted.small -v a $SCRATCH_MNT/file
|
|||||||
runfile="$tmp.getfattr"
|
runfile="$tmp.getfattr"
|
||||||
touch $runfile
|
touch $runfile
|
||||||
while [ -e $runfile ]; do
|
while [ -e $runfile ]; do
|
||||||
$GETFATTR_PROG --absolute-names -n trusted.small $SCRATCH_MNT/file \
|
_getfattr --absolute-names -n trusted.small $SCRATCH_MNT/file \
|
||||||
> /dev/null || break
|
> /dev/null || break
|
||||||
done &
|
done &
|
||||||
getfattr_pid=$!
|
getfattr_pid=$!
|
||||||
|
|||||||
+3
-3
@@ -58,7 +58,7 @@ testf() {
|
|||||||
|
|
||||||
echo "Testing ${key} ($(hexbytes "${key}")) -> ${value}" >> $seqres.full
|
echo "Testing ${key} ($(hexbytes "${key}")) -> ${value}" >> $seqres.full
|
||||||
|
|
||||||
actual_value="$($GETFATTR_PROG --absolute-names --only-values -n "user.${key}" "${testfile}")"
|
actual_value="$(_getfattr --absolute-names --only-values -n "user.${key}" "${testfile}")"
|
||||||
if [ "${actual_value}" != "${value}" ]; then
|
if [ "${actual_value}" != "${value}" ]; then
|
||||||
echo "Key ${key} has value ${actual_value}, expected ${value}."
|
echo "Key ${key} has value ${actual_value}, expected ${value}."
|
||||||
fi
|
fi
|
||||||
@@ -127,7 +127,7 @@ setf "zerojoin_moo\xe2\x80\x8ccow.txt" "zero width joiners"
|
|||||||
setf "combmark_\xe1\x80\x9c\xe1\x80\xad\xe1\x80\xaf.txt" "combining marks"
|
setf "combmark_\xe1\x80\x9c\xe1\x80\xad\xe1\x80\xaf.txt" "combining marks"
|
||||||
setf "combmark_\xe1\x80\x9c\xe1\x80\xaf\xe1\x80\xad.txt" "combining marks"
|
setf "combmark_\xe1\x80\x9c\xe1\x80\xaf\xe1\x80\xad.txt" "combining marks"
|
||||||
|
|
||||||
$GETFATTR_PROG --absolute-names -d "${testfile}" >> $seqres.full
|
_getfattr --absolute-names -d "${testfile}" >> $seqres.full
|
||||||
|
|
||||||
echo "Test files"
|
echo "Test files"
|
||||||
testf "french_caf\xc3\xa9.txt" "NFC"
|
testf "french_caf\xc3\xa9.txt" "NFC"
|
||||||
@@ -175,7 +175,7 @@ testf "combmark_\xe1\x80\x9c\xe1\x80\xad\xe1\x80\xaf.txt" "combining marks"
|
|||||||
testf "combmark_\xe1\x80\x9c\xe1\x80\xaf\xe1\x80\xad.txt" "combining marks"
|
testf "combmark_\xe1\x80\x9c\xe1\x80\xaf\xe1\x80\xad.txt" "combining marks"
|
||||||
|
|
||||||
echo "Uniqueness of keys?"
|
echo "Uniqueness of keys?"
|
||||||
crazy_keys="$($GETFATTR_PROG --absolute-names -d "${testfile}" | egrep -c '(french_|chinese_|greek_|arabic_|urk)')"
|
crazy_keys="$(_getfattr --absolute-names -d "${testfile}" | egrep -c '(french_|chinese_|greek_|arabic_|urk)')"
|
||||||
expected_keys=11
|
expected_keys=11
|
||||||
test "${crazy_keys}" -ne "${expected_keys}" && echo "Expected ${expected_keys} keys, saw ${crazy_keys}."
|
test "${crazy_keys}" -ne "${expected_keys}" && echo "Expected ${expected_keys} keys, saw ${crazy_keys}."
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -58,7 +58,7 @@ $XFS_IO_PROG -c "pwrite -S 0xea 0 64K" \
|
|||||||
# were not lost and neither was the data we wrote.
|
# were not lost and neither was the data we wrote.
|
||||||
_flakey_drop_and_remount
|
_flakey_drop_and_remount
|
||||||
echo "File xattrs after power failure:"
|
echo "File xattrs after power failure:"
|
||||||
$GETFATTR_PROG --absolute-names --dump $SCRATCH_MNT/foobar | _filter_scratch
|
_getfattr --absolute-names --dump $SCRATCH_MNT/foobar | _filter_scratch
|
||||||
echo "File data after power failure:"
|
echo "File data after power failure:"
|
||||||
od -t x1 $SCRATCH_MNT/foobar
|
od -t x1 $SCRATCH_MNT/foobar
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -56,7 +56,7 @@ $SETFATTR_PROG -n "trusted.overlay.opaque" -v "y" $upperdir/testdir
|
|||||||
$MOUNT_PROG -t overlay -o ro -o lowerdir=$upperdir:$lowerdir $OVL_BASE_SCRATCH_MNT $SCRATCH_MNT
|
$MOUNT_PROG -t overlay -o ro -o lowerdir=$upperdir:$lowerdir $OVL_BASE_SCRATCH_MNT $SCRATCH_MNT
|
||||||
|
|
||||||
# Dump trusted.overlay xattr, we should not see the "opaque" xattr
|
# Dump trusted.overlay xattr, we should not see the "opaque" xattr
|
||||||
$GETFATTR_PROG -d -m overlay $SCRATCH_MNT/testdir
|
_getfattr -d -m overlay $SCRATCH_MNT/testdir
|
||||||
echo "Silence is golden"
|
echo "Silence is golden"
|
||||||
|
|
||||||
# success, all done
|
# success, all done
|
||||||
|
|||||||
+2
-2
@@ -71,7 +71,7 @@ touch $SCRATCH_MNT/testf1
|
|||||||
$SETFATTR_PROG -n "trusted.overlayfsrz" -v "n" \
|
$SETFATTR_PROG -n "trusted.overlayfsrz" -v "n" \
|
||||||
$SCRATCH_MNT/testf0 2>&1 | _filter_scratch
|
$SCRATCH_MNT/testf0 2>&1 | _filter_scratch
|
||||||
|
|
||||||
$GETFATTR_PROG --absolute-names -n "trusted.overlayfsrz" \
|
_getfattr --absolute-names -n "trusted.overlayfsrz" \
|
||||||
$SCRATCH_MNT/testf0 2>&1 | _filter_scratch
|
$SCRATCH_MNT/testf0 2>&1 | _filter_scratch
|
||||||
|
|
||||||
# {s,g}etfattr of "trusted.overlay.xxx" should fail.
|
# {s,g}etfattr of "trusted.overlay.xxx" should fail.
|
||||||
@@ -86,7 +86,7 @@ $SETFATTR_PROG -n "trusted.overlay.fsz" -v "n" \
|
|||||||
$SCRATCH_MNT/testf1 2>&1 | _filter_scratch | \
|
$SCRATCH_MNT/testf1 2>&1 | _filter_scratch | \
|
||||||
sed -e 's/permitted/supported/g'
|
sed -e 's/permitted/supported/g'
|
||||||
|
|
||||||
$GETFATTR_PROG --absolute-names -n "trusted.overlay.fsz" \
|
_getfattr --absolute-names -n "trusted.overlay.fsz" \
|
||||||
$SCRATCH_MNT/testf1 2>&1 | _filter_scratch | \
|
$SCRATCH_MNT/testf1 2>&1 | _filter_scratch | \
|
||||||
sed -e 's/permitted/supported/g'
|
sed -e 's/permitted/supported/g'
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -77,7 +77,7 @@ subdir_d=$($here/src/t_dir_type $impure_dir $impure_subdir_st_ino)
|
|||||||
mv $SCRATCH_MNT/test_file $impure_dir
|
mv $SCRATCH_MNT/test_file $impure_dir
|
||||||
test_file_st_ino=$(stat -c '%i' $impure_dir/test_file)
|
test_file_st_ino=$(stat -c '%i' $impure_dir/test_file)
|
||||||
|
|
||||||
impure=$($GETFATTR_PROG --absolute-names --only-values -n 'trusted.overlay.impure' \
|
impure=$(_getfattr --absolute-names --only-values -n 'trusted.overlay.impure' \
|
||||||
$upperdir/test_dir/impure_dir)
|
$upperdir/test_dir/impure_dir)
|
||||||
[[ $impure == "y" ]] || echo "Impure directory missing impure xattr"
|
[[ $impure == "y" ]] || echo "Impure directory missing impure xattr"
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ $here/src/t_dir_type $impure_dir $test_file_st_ino
|
|||||||
$here/src/t_dir_type $impure_dir $impure_subdir_st_ino
|
$here/src/t_dir_type $impure_dir $impure_subdir_st_ino
|
||||||
[[ $? != 0 ]] || echo "Directory's readdir cache has stale subdir entries"
|
[[ $? != 0 ]] || echo "Directory's readdir cache has stale subdir entries"
|
||||||
|
|
||||||
impure=$($GETFATTR_PROG --absolute-names --only-values -n 'trusted.overlay.impure' \
|
impure=$(_getfattr --absolute-names --only-values -n 'trusted.overlay.impure' \
|
||||||
$upperdir/test_dir/impure_dir 2>/dev/null)
|
$upperdir/test_dir/impure_dir 2>/dev/null)
|
||||||
[[ -z $impure ]] || echo "Pure directory has impure xattr"
|
[[ -z $impure ]] || echo "Pure directory has impure xattr"
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -89,7 +89,7 @@ subdir_d=$($here/src/t_dir_type $impure_dir $impure_subdir_st_ino)
|
|||||||
mv $SCRATCH_MNT/test_file $impure_dir
|
mv $SCRATCH_MNT/test_file $impure_dir
|
||||||
test_file_st_ino=$(stat -c '%i' $impure_dir/test_file)
|
test_file_st_ino=$(stat -c '%i' $impure_dir/test_file)
|
||||||
|
|
||||||
impure=$($GETFATTR_PROG --absolute-names --only-values -n 'trusted.overlay.impure' \
|
impure=$(_getfattr --absolute-names --only-values -n 'trusted.overlay.impure' \
|
||||||
$upperdir/test_dir/impure_dir)
|
$upperdir/test_dir/impure_dir)
|
||||||
[[ $impure == "y" ]] || echo "Impure directory missing impure xattr"
|
[[ $impure == "y" ]] || echo "Impure directory missing impure xattr"
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ $here/src/t_dir_type $impure_dir $test_file_st_ino
|
|||||||
$here/src/t_dir_type $impure_dir $impure_subdir_st_ino
|
$here/src/t_dir_type $impure_dir $impure_subdir_st_ino
|
||||||
[[ $? != 0 ]] || echo "Directory's readdir cache has stale subdir entries"
|
[[ $? != 0 ]] || echo "Directory's readdir cache has stale subdir entries"
|
||||||
|
|
||||||
impure=$($GETFATTR_PROG --absolute-names --only-values -n 'trusted.overlay.impure' \
|
impure=$(_getfattr --absolute-names --only-values -n 'trusted.overlay.impure' \
|
||||||
$upperdir/test_dir/impure_dir 2>/dev/null)
|
$upperdir/test_dir/impure_dir 2>/dev/null)
|
||||||
[[ -z $impure ]] || echo "Pure directory has impure xattr"
|
[[ -z $impure ]] || echo "Pure directory has impure xattr"
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -57,7 +57,7 @@ check_redirect()
|
|||||||
local target=$1
|
local target=$1
|
||||||
local expect=$2
|
local expect=$2
|
||||||
|
|
||||||
value=$($GETFATTR_PROG --absolute-names --only-values -n \
|
value=$(_getfattr --absolute-names --only-values -n \
|
||||||
$OVL_XATTR_REDIRECT $target)
|
$OVL_XATTR_REDIRECT $target)
|
||||||
|
|
||||||
[[ "$value" == "$expect" ]] || echo "Redirect xattr incorrect"
|
[[ "$value" == "$expect" ]] || echo "Redirect xattr incorrect"
|
||||||
@@ -67,7 +67,7 @@ check_no_redirect()
|
|||||||
{
|
{
|
||||||
local target=$1
|
local target=$1
|
||||||
|
|
||||||
value=$($GETFATTR_PROG --absolute-names -d -m \
|
value=$(_getfattr --absolute-names -d -m \
|
||||||
$OVL_XATTR_REDIRECT $target)
|
$OVL_XATTR_REDIRECT $target)
|
||||||
|
|
||||||
[[ -z "$value" ]] || echo "Redirect xattr not empty"
|
[[ -z "$value" ]] || echo "Redirect xattr not empty"
|
||||||
@@ -78,7 +78,7 @@ check_opaque()
|
|||||||
{
|
{
|
||||||
local target=$1
|
local target=$1
|
||||||
|
|
||||||
value=$($GETFATTR_PROG --absolute-names --only-values -n \
|
value=$(_getfattr --absolute-names --only-values -n \
|
||||||
$OVL_XATTR_OPAQUE $target)
|
$OVL_XATTR_OPAQUE $target)
|
||||||
|
|
||||||
[[ "$value" == "$OVL_XATTR_OPAQUE_VAL" ]] || \
|
[[ "$value" == "$OVL_XATTR_OPAQUE_VAL" ]] || \
|
||||||
|
|||||||
+1
-1
@@ -64,7 +64,7 @@ check_impure()
|
|||||||
{
|
{
|
||||||
local target=$1
|
local target=$1
|
||||||
|
|
||||||
value=$($GETFATTR_PROG --absolute-names --only-values -n \
|
value=$(_getfattr --absolute-names --only-values -n \
|
||||||
$OVL_XATTR_IMPURE $target)
|
$OVL_XATTR_IMPURE $target)
|
||||||
|
|
||||||
[[ "$value" == "$OVL_XATTR_IMPURE_VAL" ]] || echo "Missing impure xattr"
|
[[ "$value" == "$OVL_XATTR_IMPURE_VAL" ]] || echo "Missing impure xattr"
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user