]> git.feebdaed.xyz Git - 0xmirror/crun.git/commitdiff
tests: skip mount-bind-to-rootfs in rootless mode
authorGiuseppe Scrivano <gscrivan@redhat.com>
Thu, 18 Dec 2025 22:40:25 +0000 (22:40 +0000)
committerGiuseppe Scrivano <gscrivan@redhat.com>
Mon, 22 Dec 2025 07:19:08 +0000 (07:19 +0000)
The bind mount to rootfs requires root privileges and doesn't work
in user namespace simulation environments.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
tests/test_mounts.py

index 01702d461a380e467bfd4183511017393f13fe27..060f24a5671a66410d3e85c7a80f3c359a684e80 100755 (executable)
@@ -136,6 +136,9 @@ def test_mount_tmpfs_permissions():
     return -1
 
 def test_mount_bind_to_rootfs():
+    if is_rootless():
+        return (77, "requires root for bind mount to rootfs")
+
     conf = base_config()
     conf['process']['args'] = ['/init', 'true']
     add_all_namespaces(conf)