summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2019-01-18 14:33:39 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2019-01-21 10:41:37 +0000
commitce8dab0ff768e9b8d78e25d681d0efa097803131 (patch)
tree752f0328199ffba3b2a50139c12f6da18dc32660
parent4379761764bdbeb38e2d28ec514384957248bb6d (diff)
downloadbuildstream-ce8dab0ff768e9b8d78e25d681d0efa097803131.tar.gz
tests/frontend/workspace.py: Skip test_open_multi_unwritable when root
The test assumes that a directory with write permission removed isn't writable, this isn't the case if the process running the tests has CAP_DAC_OVERRIDE which is common when running as root.
-rw-r--r--tests/frontend/workspace.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py
index 00c0bd835..2995bf967 100644
--- a/tests/frontend/workspace.py
+++ b/tests/frontend/workspace.py
@@ -204,6 +204,7 @@ def test_open_multi(cli, tmpdir, datafiles):
assert not ('.bzr' in workspace_lsdir)
+@pytest.mark.skipif(os.geteuid() == 0, reason="root may have CAP_DAC_OVERRIDE and ignore permissions")
@pytest.mark.datafiles(DATA_DIR)
def test_open_multi_unwritable(cli, tmpdir, datafiles):
workspace_object = WorkspaceCreater(cli, tmpdir, datafiles)