We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b85f47 commit e5a5d67Copy full SHA for e5a5d67
src/borg/testsuite/archiver/__init__.py
@@ -440,7 +440,12 @@ def read_only(path):
440
pytest.skip(message)
441
try:
442
os.system('LD_PRELOAD= chmod -R ugo-w "%s"' % path)
443
- os.system(cmd_immutable)
+ rc = os.system(cmd_immutable)
444
+ if rc != 0:
445
+ # If we cannot make the path immutable (e.g., missing CAP_LINUX_IMMUTABLE
446
+ # in containers or restricted environments), the read-only tests would
447
+ # not be meaningful. Skip them instead of failing.
448
+ pytest.skip(f"Unable to make path immutable with: {cmd_immutable} (rc={rc})")
449
yield
450
finally:
451
# Restore permissions to ensure clean-up doesn't fail
0 commit comments