Effective coverage reads function totals as line totals when the LLVM report has no branches
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- testing-qa
Research direction
Start with effective_coverage.parse_index_page_totals and reproduce the issue using the synthetic html_report/index.html rows in the issue. Check how it selects totals and handles the branch cell - (0/0). Done means it returns lines (1, 4) and branches (0, 0) for the reproduction, so the effective line coverage uses line totals.
Written by the indexing model from the issue text.
Description
Found while reviewing the user manual against the implementation at fe013fe. Reproduced by calling effective_coverage.parse_index_page_totals on a synthetic index page.
The effective-coverage path reads the totals from the LLVM HTML index page by taking the last three matches of NN.NN% (covered/total) in the page and treating them as function, line and branch totals. When the report contains no branches, llvm-cov renders the branch total as - (0/0), which does not match. The last three matches are then shifted by one cell: the function totals are read as line totals and the line totals as branch totals.
Reproduction
html_report/index.html whose only rows are
<tr><td>a.rs</td><td>100.00% (1/1)</td><td>25.00% (1/4)</td><td>- (0/0)</td></tr>
<tr><td>Totals</td><td>100.00% (1/1)</td><td>25.00% (1/4)</td><td>- (0/0)</td></tr>
parse_index_page_totals returns {'lines': (1, 1), 'branches': (1, 4)}. Expected: {'lines': (1, 4), 'branches': (0, 0)}.
Effect
With --yaml, a report without branch data is gated on the function coverage instead of the line coverage. In the example the effective line coverage is 100 % although 1 of 4 lines is covered. A Rust-only scope built without -Zcoverage-options=branch has no branch data.
Expected behavior
Read the totals from the Totals row by column, and accept - (0/0) as zero branches.
- Dominant language
- Python
- Stars
- 0
- Forks
- 4
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 16
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eclipse-score/coverage_tool
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
eclipse-score/coverage_tool#101 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
eclipse-score/coverage_tool#99 · 1 comment ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
eclipse-score/coverage_tool#98 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
eclipse-score/coverage_tool#96 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
eclipse-score/coverage_tool#27 ·
Maintainers usually reply within 2 days
All issues in eclipse-score/coverage_tool
Similar issues
-
accepted
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
future-agi/future-agi#5908 ·
Maintainers usually reply within 1 day
-
Placeholder export disables HTML image input for picture descriptionPossibly taken @cloudiful claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
docling-project/docling-serve#817 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Techiebutler/freeframe#687 ·
Maintainers usually reply within 1 day
-
Parse truncated verbose GC logs up to the first XML errorPossibly taken A pull request linked to this issue is open or already merged. Openbug verbose GC
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
IBM/javacore-analyser#677 ·
Maintainers usually reply within 1 day
-
Image publishing fails for annotated release tags (v0.2.3 never published)Possibly taken @zgypa-agent claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
bolton-brush/BFD9000#119 ·