we need to pass LLVM_PROFILE_FILE as a new env variable, which wasn't passed to some commands by ucmd()
i fixed it in 0cd58c63cf29fd9bcc2e1b50a927d48de064bfa1
it was leaving some coverage artifacts in the pwd which was breaking some tests like ls.
LLVM_PROFILE_FILE: "${{ github.workspace }}/build/coverage-%p-%m.profraw"
because of the change of format, files have to be exported into a different directory to make sure they don't pollute the tests
the coverage files are HUGE
56G /Users/runner/work/coreutils/coreutils/build/ on a mac
it causes the linux machine to fails with
System.IO.IOException: No space left on device : '/home/runner/runners/2.320.0/_diag/Worker_20241116-105056-utc.log'
and doesn't show anything in the log
it takes 16 minutes for grcov to process everything - it was a few seconds before
During one of my numerous experiment, i got <LLVM Profile Warning: Unable to track new values: Running out of static counters. Consider using option -mllvm -vp-counters-per-site=<n> to allocate more value profile counters at compile time. despite passing -Clink-arg=-Wl,-mllvm -Clink-arg=-Wl,-vp-counters-per-site=6, still happened.
I am going to collect some finding of my work (@cakebaker probably has other).
-Zprofile has been removed from rustc - https://github.com/rust-lang/rust/pull/131829 we should use -Cinstrument-coverage instead
we have to switch to a different method described here https://github.com/mozilla/grcov/issues/1240 (cc @marco-c)
we need to pass LLVM_PROFILE_FILE as a new env variable, which wasn't passed to some commands by ucmd() i fixed it in 0cd58c63cf29fd9bcc2e1b50a927d48de064bfa1 it was leaving some coverage artifacts in the pwd which was breaking some tests like ls.
LLVM_PROFILE_FILE: "${{ github.workspace }}/build/coverage-%p-%m.profraw"
because of the change of format, files have to be exported into a different directory to make sure they don't pollute the tests
the coverage files are HUGE
56G /Users/runner/work/coreutils/coreutils/build/
on a mac it causes the linux machine to fails withSystem.IO.IOException: No space left on device : '/home/runner/runners/2.320.0/_diag/Worker_20241116-105056-utc.log'
and doesn't show anything in the logit takes 16 minutes for grcov to process everything - it was a few seconds before
During one of my numerous experiment, i got
<LLVM Profile Warning: Unable to track new values: Running out of static counters. Consider using option -mllvm -vp-counters-per-site=<n> to allocate more value profile counters at compile time.
despite passing-Clink-arg=-Wl,-mllvm -Clink-arg=-Wl,-vp-counters-per-site=6
, still happened.Using
cargo llvm-cov show-env
like in https://github.com/foundationdb-rs/foundationdb-rs/blob/c6623a84a7f35597eb7f68357a3c9cb91831501e/.github/workflows/coverage.yml fails the same wayMy experimentations: https://github.com/uutils/coreutils/pull/6850