diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2019-01-18 14:33:39 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2019-01-21 10:41:37 +0000 |
commit | ce8dab0ff768e9b8d78e25d681d0efa097803131 (patch) | |
tree | 752f0328199ffba3b2a50139c12f6da18dc32660 | |
parent | 4379761764bdbeb38e2d28ec514384957248bb6d (diff) | |
download | buildstream-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.py | 1 |
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) |