RFR: 7904066: Make some plugin tests runnable with JTReg

Alexandre Iline shurailine at openjdk.org
Fri Jul 11 23:34:49 UTC 2025


On Fri, 11 Jul 2025 23:23:24 GMT, Alexandre Iline <shurailine at openjdk.org> wrote:

> Adding necessary TEST.ROOT files.
> Fixing up a few tests.
> Fixing a problem in the code.

plugins/coverage_reports/src/openjdk/codetools/jcov/report/jcov/JCovCoverageComparison.java line 102:

> 100:                         var isOldMethod = oldSource == null || oldMethodsCache.containsKey(id);
> 101:                         DataMethod oldMethod = isOldMethod ? oldMethodsCache.get(id) : null;
> 102:                         var newLineCoverage = new MethodCoverage(newMethod, false).getLineCoverage();

@lkuskov 

Regarding this and similar changes in the files.
The countBlocks parameter: https://github.com/openjdk/jcov/blob/a48fd09dbc21607414c4018d7028809024532e2a/src/classes/com/sun/tdk/jcov/report/MethodCoverage.java#L59
was set to "true" everywhere in the coverage reports plugin. However, in the next constructor it is interpreted as "javapCoverage": https://github.com/openjdk/jcov/blob/a48fd09dbc21607414c4018d7028809024532e2a/src/classes/com/sun/tdk/jcov/report/MethodCoverage.java#L68C54-L68C63

Is counting blocks equivalent to generating Java reports, or how do I interpret this?

I am guessing this is the outcome from your recent javap report fixup.

I have changed all the values to false because what I need in the reports is line coverage.

Can you advise?

-------------

PR Review Comment: https://git.openjdk.org/jcov/pull/64#discussion_r2202059199


More information about the jcov-dev mailing list