While adding the jacoco test suite to the openj9 external group, I noticed that there was one test consistently failing with openj9 jdk11 and 14 on all platforms (note the test passes with hotspot).
Here is the error message produced by https://ci.adoptopenjdk.net/view/Test_grinder/job/Grinder/4940/
Failed tests: startup_should_not_create_duplicate_class_definition(org.jacoco.core.runtime.InjectedClassRuntimeTest)
and
10:56:10 [[1;34mINFO[m] JaCoCo :: Test :: Core ............................. [1;31mFAILURE[m [ 3.992 s]
The failing test can be found at https://github.com/jacoco/jacoco/blob/master/org.jacoco.core.test/src/org/jacoco/core/runtime/InjectedClassRuntimeTest.java#L50-L61
FYI @DanHeidinga @pshipton - passes on jdk8 j9
The test is skipped on JDK < 9:
https://github.com/jacoco/jacoco/blob/a20dc090fc5a0531da5b65ed454426b122374a56/org.jacoco.core.test/src/org/jacoco/core/runtime/InjectedClassRuntimeTest.java#L35
I'd start from the code that calls MethodHandles.Lookup.defineClass:
https://github.com/jacoco/jacoco/blob/a20dc090fc5a0531da5b65ed454426b122374a56/org.jacoco.core/src/org/jacoco/core/runtime/InjectedClassRuntime.java#L52-L58
@tajila fyi
@hangshao0 Can you please take a look
https://github.com/eclipse/openj9/issues/11243 is resolved. The latest OpenJ9 build should be able to pass test org.jacoco.core.runtime.InjectedClassRuntimeTest now.
Thanks @hangshao0 . @nikolamilijevic1 could you please re-enable the test? Thanks.
The test is re-enabled. PR https://github.com/AdoptOpenJDK/openjdk-tests/pull/2105