mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-21 13:34:34 +03:00
tests/libtest: check that we have setfattr
We use `setfattr` to determine whether the filesystem we're on supports xattrs, but we need to check that `setfattr` itself is available. We just make it a hard requirement but only if trying to run tests that ask about xattr support. Closes: #1207 Approved by: cgwalters
This commit is contained in:
parent
335f914d48
commit
95bfe6b862
@ -517,6 +517,9 @@ os_repository_new_commit ()
|
||||
# Usage: if ! skip_one_without_user_xattrs; then ... more tests ...; fi
|
||||
_have_user_xattrs=''
|
||||
have_user_xattrs() {
|
||||
if ! which setfattr 2>/dev/null; then
|
||||
fatal "no setfattr available to determine xattr support"
|
||||
fi
|
||||
if test "${_have_user_xattrs}" = ''; then
|
||||
touch test-xattrs
|
||||
if setfattr -n user.testvalue -v somevalue test-xattrs 2>/dev/null; then
|
||||
|
Loading…
Reference in New Issue
Block a user