summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2022-05-09 19:02:41 +0200
committerFlorian Bruhin <me@the-compiler.org>2022-06-22 17:41:11 +0200
commit5cef34e0d6aac9ab4cd8cf1c78065ae26f6670f0 (patch)
tree87704af7db0d964a1aafdd4ce3330e6852e679a9
parent448cdea2bbfba4b929a85fbace6b43d11991a692 (diff)
downloadqutebrowser-5cef34e0d6aac9ab4cd8cf1c78065ae26f6670f0.tar.gz
qutebrowser-5cef34e0d6aac9ab4cd8cf1c78065ae26f6670f0.zip
Fix sandboxing tests on Flatpak
See https://github.com/flathub/org.qutebrowser.qutebrowser/issues/193 TODO: Cherry-pick to master?
-rw-r--r--tests/end2end/test_invocations.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/end2end/test_invocations.py b/tests/end2end/test_invocations.py
index c41805f77..94c747217 100644
--- a/tests/end2end/test_invocations.py
+++ b/tests/end2end/test_invocations.py
@@ -32,7 +32,7 @@ import pytest
from qutebrowser.qt.core import QProcess, QPoint
from helpers import testutils
-from qutebrowser.utils import qtutils, utils
+from qutebrowser.utils import qtutils, utils, version
ascii_locale = pytest.mark.skipif(sys.hexversion >= 0x03070000,
@@ -861,6 +861,13 @@ def test_sandboxing(
pytest.skip("Skipped with QtWebKit")
elif sandboxing == "enable-all" and testutils.disable_seccomp_bpf_sandbox():
pytest.skip("Full sandboxing not supported")
+ elif version.is_flatpak():
+ # https://github.com/flathub/io.qt.qtwebengine.BaseApp/pull/66
+ has_namespaces = False
+ expected_result = "You are NOT adequately sandboxed."
+ has_yama_non_broker = has_yama
+ else:
+ has_yama_non_broker = False
args = _base_args(request.config) + [
'--temp-basedir',
@@ -895,7 +902,7 @@ def test_sandboxing(
f"{bpf_text} supports TSYNC": "Yes" if has_seccomp else "No",
f"{yama_text} (Broker)": "Yes" if has_yama else "No",
- f"{yama_text} (Non-broker)": "No",
+ f"{yama_text} (Non-broker)": "Yes" if has_yama_non_broker else "No",
}
assert header == "Sandbox Status"