You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test failure if there are systemd credential mounts with name containing backslash #778
Even with #777, I'm seeing a test failure when running the bubblewrap test suite on a real system:
not ok 54 test_ro_bind_root_is_recursive
...
# File "[REDACTED]/bubblewrap/tests/test-sandbox.py", line 331, in _test_ro_bind_root_is_recursive
# flags = os.statvfs(mountpoint).f_flag
# FileNotFoundError: [Errno 2] No such file or directory: '/run/credentials/systemd-cryptsetup@[REDACTED].service'
I can work around this with
diff --git a/tests/test-sandbox.py b/tests/test-sandbox.py
index 74fb4aa..95351b7 100644
--- a/tests/test-sandbox.py+++ b/tests/test-sandbox.py@@ -328,7 +328,12 @@ class TestSandbox(unittest.TestCase):
if any(mountpoint == p or mountpoint.startswith(p + '/')
for p in skip_prefixes):
continue
- flags = os.statvfs(mountpoint).f_flag++ try:+ flags = os.statvfs(mountpoint).f_flag+ except FileNotFoundError:+ pass+
self.assertTrue(
flags & os.ST_RDONLY,
f'{mountpoint} is not read-only',
but I'd prefer to understand what's happening here and why. Perhaps it's just that these are mount points that I don't have read access to as an unprivileged user, and so they're excluded from the recursive bind-mount?
Aha, found it. The problem is not that they aren't shared (they are), the problem is that one of my credentials has a - in its name, which systemd escapes as \x2d, which /proc/self/mounts then re-escapes as \134x2d.
changed the title [-]Test failure if there are systemd credential mounts[/-][+]Test failure if there are systemd credential mounts with name containing backslash[/+]on Aug 29, 2026
Activity
smcv commentedon Aug 28, 2026
This happens for both
test_ro_bind_root_is_recursiveandtest_ro_bind_root_is_recursive_fallback.xxyzz commentedon Aug 29, 2026
Maybe it's not a shared mount?
smcv commentedon Aug 29, 2026
Aha, found it. The problem is not that they aren't shared (they are), the problem is that one of my credentials has a
-in its name, which systemd escapes as\x2d, which/proc/self/mountsthen re-escapes as\134x2d.test-helper: Unescape mount points when parsing /proc/self/mounts
[-]Test failure if there are systemd credential mounts[/-][+]Test failure if there are systemd credential mounts with name containing backslash[/+]test-helper: Unescape mount points when parsing /proc/self/mounts
test-helper: Unescape mount points when parsing /proc/self/mounts