root
, but without the LINUX_IMMUTABLE
capability, into an early return, with a suggestion to turn on LINUX_IMMUTABLE
next time (if possible).
root
, but without the LINUX_IMMUTABLE
capability, into an early return, with a suggestion to turn on LINUX_IMMUTABLE
next time (if possible).
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
See the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
45@@ -45,6 +46,11 @@ def reindex_readonly(self):
46 self.log.warning(f"stdout: {e.stdout}")
47 if e.stderr:
48 self.log.warning(f"stderr: {e.stderr}")
49+ if os.getuid() == 0:
if you retouch, maybe
0 if os.getuid() == 0: # 0 implies user is root (Unix/Linux)
45@@ -45,6 +46,11 @@ def reindex_readonly(self):
46 self.log.warning(f"stdout: {e.stdout}")
47 if e.stderr:
48 self.log.warning(f"stderr: {e.stderr}")
49+ if os.getuid() == 0:
50+ self.log.warning("Return early on Linux under root, because chattr failed.")
51+ self.log.warning("This should only happen due to missing capabilities in a container.")
52+ self.log.warning("Make sure to --cap-add LINUX_IMMUTABLE if you want to run this test.")
53+ return
return
here add?
return
means that the function terminates and returns its return value.
As explained in the pull request title, the return is required to avoid the test failure.