Make log pipe test tolerate restricted kernels - #13431
Merged
Merged
Conversation
Some CI environments do not permit unprivileged processes to increase FIFO buffer sizes, even when the requested size is below the system maximum. The log_pipe AuTest treats this kernel policy as a product failure and cannot run in those environments. This makes the test accept only the corresponding `Operation not permitted` diagnostic when the FIFO remains unchanged, while continuing to reject other errors and fatal diagnostics. It also waits briefly for asynchronous diagnostic output before deciding whether the size check failed.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
tests/gold_tests/logging/pipe_buffer_is_larger_than.py:61
- The diags log scan can raise a UnicodeDecodeError (or match an unrelated permission error) and incorrectly fail or pass the verifier. It’s safer to decode with replacement and to require that the permission error corresponds to the specific FIFO being checked.
for _ in range(50):
if os.path.exists(diags_log):
with open(diags_log, encoding='utf-8') as diags:
diagnostics = diags.read()
if "Set pipe size failed" in diagnostics and "Operation not permitted" in diagnostics:
print("Success. The kernel denied increasing the pipe buffer for the unprivileged ATS user.")
return 0
time.sleep(0.1)
tests/gold_tests/logging/log_pipe.test.py:136
- The negative-lookahead currently only permits the exact string immediately after "ERROR:". If the diags log includes timestamps/tags between "ERROR:" and the message, the allowed "Operation not permitted" line will still be treated as an unexpected error. Consider allowing arbitrary text after "ERROR:" before the permitted substring, and also re-adding the default "Unrecognized configuration value" exclusion since disable_log_checks disables it.
ts.Disk.diags_log.Content += Testers.ExcludesExpression(
r"ERROR:(?! Set pipe size failed for pipe .*: Operation not permitted)", "The diagnostics should contain no unexpected errors.")
ts.Disk.diags_log.Content += Testers.ExcludesExpression("FATAL:", "The diagnostics should contain no fatal errors.")
cmcfarlen
pushed a commit
that referenced
this pull request
Aug 4, 2026
Some CI environments do not permit unprivileged processes to increase FIFO buffer sizes, even when the requested size is below the system maximum. The log_pipe AuTest treats this kernel policy as a product failure and cannot run in those environments. This makes the test accept only the corresponding `Operation not permitted` diagnostic when the FIFO remains unchanged, while continuing to reject other errors and fatal diagnostics. It also waits briefly for asynchronous diagnostic output before deciding whether the size check failed. (cherry picked from commit f063c0e)
Contributor
|
Cherry-picked to the 10.2.x branch as 9bafe09 for the 10.2.0 release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some CI environments do not permit unprivileged processes to increase
FIFO buffer sizes, even when the requested size is below the system
maximum. The log_pipe AuTest treats this kernel policy as a product
failure and cannot run in those environments.
This makes the test accept only the corresponding
Operation not permitteddiagnostic when the FIFO remains unchanged, while continuingto reject other errors and fatal diagnostics. It also waits briefly for
asynchronous diagnostic output before deciding whether the size check
failed.