Open Bug 1415824 (untestedcode-codecoverage) Opened 7 years ago Updated 10 months ago

[meta] Write tests for files with zero coverage

Categories

(Testing :: Code Coverage, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: marco, Unassigned)

References

(Depends on 22 open bugs, Blocks 1 open bug, )

Details

(Keywords: meta)

Files from the zero coverage files report (https://marco-c.github.io/code-coverage-reports/) are often dead code and sometimes they are simply not tested.

Untested files are clearly very risky. If we are never executing them on automation, there's a high chance of unnoticed regressions.

This bug will track adding at least basic tests for these files.
Depends on: 1415829
Depends on: 1416230
Depends on: 1436319
Depends on: 1436327
Depends on: 1436357
Alias: untestedcode-codecoverage
See Also: → deadcode-codecoverage
Depends on: 1457215
See Also: → 1476545
Depends on: 1485267
Depends on: 1486433
Depends on: 1512737
Blocks: 1565016
No longer blocks: 1565016
Depends on: 1565016
Depends on: 1563235
Depends on: 1584399
Depends on: 1586794
Depends on: 1588275
Depends on: 1600030

Adding dependency on running gdb tests in automation, though I don't know how likely it is for them to learn how to do coverage builds.

Depends on: 1597005
Depends on: 1604581
Depends on: 1621250
Depends on: 1623979

Hi, from code coverage analysis, it show that this code has 0% test coverage [1], however, we do have a test for that [2]. Do we have a way to modify this coverage data or explicitly mark code as covered?

Thank you.

[1] https://coverage.moz.tools/#revision=latest&path=widget%2Fcocoa%2FMediaHardwareKeysEventSourceMacMediaCenter.mm&view=file
[2] https://searchfox.org/mozilla-central/source/dom/media/mediacontrol/tests/gtest/TestMediaKeysEventMediaCenter.mm

Flags: needinfo?(mcastelluccio)

(In reply to Alastor Wu [:alwu] from comment #2)

Hi, from code coverage analysis, it show that this code has 0% test coverage [1], however, we do have a test for that [2]. Do we have a way to modify this coverage data or explicitly mark code as covered?

Thank you.

[1] https://coverage.moz.tools/#revision=latest&path=widget%2Fcocoa%2FMediaHardwareKeysEventSourceMacMediaCenter.mm&view=file
[2] https://searchfox.org/mozilla-central/source/dom/media/mediacontrol/tests/gtest/TestMediaKeysEventMediaCenter.mm

We are not running tests in coverage mode on OS X, that explains it :)

See also bug 1599847, adding a skiplist is tracked in https://github.com/mozilla/code-coverage/issues/336.

Flags: needinfo?(mcastelluccio)
Depends on: 1670084
Depends on: 1680247
Depends on: 1693965
Depends on: 1734113
Depends on: 1751212
Depends on: 1774183
Severity: normal → S3
Depends on: 1836520
Depends on: 1844639
You need to log in before you can comment on or make changes to this bug.