Bumped gcovr off the 4.1 pin it had been held on since 2018 - #663
Merged
Conversation
The coverage tooling was pinned to gcovr 4.1, released in 2018, and that version is missing the two options the coverage work needs next: --json and --add-tracefile, which is how the five build configurations get merged into one report. This moves the pin to 8.6, the current release. The pin stays exact, and it stays hand-moved: it lives in a shell script, and no Dependabot ecosystem can parse that. Isolated deliberately, so that a movement in the coverage number caused by the tool could not be confused with one caused by a later change. Measured on the default_build_coverage tree of test/tx, over the same gcda with the same gcov, varying only the gcovr version: gcovr lines-valid branches-valid files 4.1 3827 1994 177 7.0 3827 1994 177 8.3 3827 1994 177 8.6 3827 1994 177 So the denominator does not move with the tool at all, and this bump moves no number. The plan this came from expected 3822 to become 3827; that figure does not reproduce, under gcc-13 or gcc-14, with or without --object-directory. The only variant that changes the count is dropping the -f filter, which collapses the report to nothing. Two things found while measuring, both recorded because they matter to what comes next. The coverage numerator is not deterministic. On an identical tree with an identical compiler, three consecutive runs of the full suite -- all 96 tests passing every time -- reported 3826, 3827 and 3827 covered lines. The line that flickers is tx_thread_system_resume.c:529, the preemption path of _tx_thread_system_resume, and it takes its guarding branch with it. It has been described as never executed; it is executed on some runs and not others. A coverage floor has to be set with that in mind, and the honest fix is a test that takes the path deliberately. Reading gcc-13 output, the compiler the runners actually use, gcovr 8.6 runs the existing coverage.sh unchanged: Cobertura XML and 181 HTML files, same 177 classes. --xml-pretty and --object-directory still work on 8.6 but are now deprecated aliases for --cobertura-pretty and --gcov-object-directory, worth knowing for whoever removes --object-directory next. Assisted-by: Claude Opus 5 <noreply@anthropic.com>
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.
scripts/install.shpinnedgcovr==4.1, released in 2018. That version has neither--jsonnor--add-tracefile, which is exactly how the five build configurations would be merged into a single coverage report — so the pin is a prerequisite for the rest of the coverage work, not just staleness.This moves it to 8.6, the current release. The pin stays exact, so a coverage percentage remains comparable between runs, and it stays hand-moved: it lives in a shell script that no Dependabot ecosystem can parse. The new comment in
install.shsays so, since #662 might otherwise imply this is now automated.Nothing else is in this pull request on purpose — the number movement it might cause should not be confused with one caused by a later change.
It moves no number
Measured on the
default_build_coveragetree oftest/tx, over the same.gcdawith the samegcov, varying only the gcovr version:The denominator does not move with the tool. The plan behind this work expected 3822 → 3827 across the bump; that figure does not reproduce — not under gcc-13, not under gcc-14, and not with
--object-directorydropped. The only variant that changes the count is dropping the-f ../../../common/srcfilter, which collapses the report to zero files.Two findings worth more than the bump
The coverage numerator is not deterministic. On an identical tree with an identical compiler, three consecutive runs of the full suite — all 96 tests passing every time — reported:
tx_thread_system_resume.c:529That line is
_tx_thread_system_return();— the "preemption is needed, return to the system" path of_tx_thread_system_resume— and it takes its guarding branch with it. It has been characterised as never executed by the suite. It is executed on some runs and not others. Two consequences: a coverage floor set at the observed maximum would flake, and the real fix is a test that takes that path deliberately rather than by timing.--xml-prettyand--object-directorystill work on 8.6, but only as deprecated aliases for--cobertura-prettyand--gcov-object-directory. Nothing to change here — worth knowing for whoever removes--object-directory, which measurably does nothing anyway.Verification
Reading gcc-13 output — the compiler the runners actually use, since
install.shinstalls plaingccand nothing setsCC— gcovr 8.6 runs the existingtest/tx/cmake/coverage.shunchanged end to end: Cobertura XML plus 181 HTML files, same 177 classes, exit 0. 96/96 tests passed.Assisted-by: Claude Opus 5 noreply@anthropic.com