fix(ci): keep coverage profraw writable under umask 0777 tests - #13502
Merged
RenjiSann merged 3 commits intoJul 22, 2026
Conversation
Contributor
did you try to fix the issue itself instead ? |
Some uutests set umask(0777) before spawning the utility. LLVM profile files created under that umask can be mode 000; later writes fail with Permission denied on stderr and break exact asserts (e.g. mkfifo). Prepare the profraw directory with a default owner-write ACL when setfacl is available (hard-fail under CI), use coverage-%p-%m.profraw, and install acl on the coverage Ubuntu job. Signed-off-by: Alex Chen <l46983284@gmail.com>
l46983284-cpu
force-pushed
the
fix/uutests-llvm-profile-stderr
branch
from
July 22, 2026 10:45
84e741e to
0c9625f
Compare
Contributor
Author
|
Yes, now — that was only a stderr filter. I replaced this PR with a coverage-script fix for the umask/profraw issue itself. |
Avoid the unknown word profraw in CICD.yml and ignore setfacl/profraw in the workflow spell-checker header. Signed-off-by: Alex Chen <l46983284@gmail.com>
Merging this PR will not alter performance
Comparing Footnotes
|
|
GNU testsuite comparison: |
Contributor
|
much better, thanks |
Default ACL still keeps umask(0777) profiles owner-writable, but restore LLVM's online-merge pool (%4m) instead of one file per process. Signed-off-by: Alex Chen <l46983284@gmail.com>
Collaborator
|
Great ! thanks :) |
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.
Summary
Code Coverage can fail exact-stderr tests (for example
mkfifo) when LLVM prints:LLVM Profile Error: Failed to write file "...profraw": Permission deniedRoot cause is not the utility under test. Some uutests set
umask(0777)before spawning the binary. LLVM profile files created under that umask can be mode000; later profile writes fail with EACCES. That message lands on the utility stderr and breaksstderr_isasserts. A shared%4mprofile pool made this worse across processes.This PR fixes the coverage harness:
prepare_profraw_dirrecreates the trace directory with a default owner-write ACL viasetfacl(hard-fail on CI ifsetfaclis missing or fails).LLVM_PROFILE_FILEusescoverage-%p-%m.profrawinstead of a shared%4mpool.aclpackage sosetfaclis present.This replaces the earlier stderr-filter approach on this same PR. A capture-side filter can still be useful later as defense-in-depth for other LLVM I/O noise, but is not this change.
Test plan
0777→ mode000, reopen fails; with default ACL → mode660, reopen succeedsutil/build-run-test-coverage-linux.sh+ coverage job apt installNotes