diff options
author | Colin Walters <walters@verbum.org> | 2021-08-26 12:47:00 -0400 |
---|---|---|
committer | Luca BRUNO <luca.bruno@coreos.com> | 2021-09-06 07:41:01 +0000 |
commit | 9f5b636990d9a1fb0fc43cedcd96412c515fb679 (patch) | |
tree | ff21c979ccc5bac2897265aa77d3977ae12566ea | |
parent | 27fcee861acb9fb1c517db684626ede30f560872 (diff) | |
download | ostree-9f5b636990d9a1fb0fc43cedcd96412c515fb679.tar.gz |
tests/basic: Skip --no-xattrs if we have selinux
It cannot work to use `--no-xattrs` when SELinux is enabled
because we get a `security.selinux` attribute on created files
regardless. So just skip this test if true.
Also add some `ostree fsck`s in here which helped me debug
this.
-rw-r--r-- | tests/basic-test.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/basic-test.sh b/tests/basic-test.sh index 935544d9..b694f370 100644 --- a/tests/basic-test.sh +++ b/tests/basic-test.sh @@ -455,11 +455,18 @@ $OSTREE commit ${COMMIT_ARGS} --skip-if-unchanged -b trees/test2 -s 'should not $OSTREE ls -R -C test2 new_rev=$($OSTREE rev-parse test2) assert_streq "${old_rev}" "${new_rev}" +$OSTREE fsck echo "ok commit --skip-if-unchanged" cd ${test_tmpdir}/checkout-test2-4 +# Unfortunately later tests depend on this right now, so commit anyways $OSTREE commit ${COMMIT_ARGS} -b test2 -s "no xattrs" --no-xattrs -echo "ok commit with no xattrs" +if have_selinux_relabel; then + echo "ok # SKIP we get an injected security.selinux xattr regardless, so we can't do this" +else + $OSTREE fsck + echo "ok commit with no xattrs" +fi mkdir tree-A tree-B touch tree-A/file-a tree-B/file-b |