Make xattr tests optional for Travis

This commit is contained in:
Ben S 2016-06-11 14:06:43 +01:00
parent 5f01ff02fa
commit 921f3ca37c

View File

@ -101,8 +101,11 @@ chmod 000 "$DIR/permissions/forbidden-directory"
## -- extended attributes -- ## -- extended attributes --
# These tests are optional but the presence of the *directory* is used
# elsewhere! Yes I know this is a bad practice.
mkdir "$DIR/attributes" mkdir "$DIR/attributes"
if hash xattr; then
touch "$DIR/attributes/none" touch "$DIR/attributes/none"
touch "$DIR/attributes/one" touch "$DIR/attributes/one"
@ -130,3 +133,6 @@ touch "$DIR/attributes/dirs/full-but-forbidden/file"
xattr -w greeting hello "$DIR/attributes/dirs/full-but-forbidden" xattr -w greeting hello "$DIR/attributes/dirs/full-but-forbidden"
chmod 000 "$DIR/attributes/dirs/full-but-forbidden" chmod 000 "$DIR/attributes/dirs/full-but-forbidden"
chmod +a "$YOU deny readextattr" "$DIR/attributes/dirs/full-but-forbidden" chmod +a "$YOU deny readextattr" "$DIR/attributes/dirs/full-but-forbidden"
else
echo "Skipping xattr tests"
fi