diff --git a/tests/libtest.sh b/tests/libtest.sh index 04622df9..c12ffb95 100644 --- a/tests/libtest.sh +++ b/tests/libtest.sh @@ -309,6 +309,14 @@ run_sh () { ${CMD_PREFIX} flatpak run --command=bash ${ARGS-} org.test.Hello -c "$*" } +skip_without_user_xattrs () { + touch ${TEST_DATA_DIR}/test-xattrs + if ! setfattr -n user.testvalue -v somevalue ${TEST_DATA_DIR}/test-xattrs; then + echo "1..0 # SKIP this test requires xattr support" + exit 0 + fi +} + skip_without_bwrap () { if [ -z "${FLATPAK_BWRAP:-}" ]; then # running installed-tests: assume we know what we're doing