[lworld] RFR: 8327257: [lworld] Tests are needed to stress class preloading with concurrent class loadings [v3]
Paul Hübner
phubner at openjdk.org
Wed Sep 10 15:25:48 UTC 2025
On Wed, 10 Sep 2025 10:28:57 GMT, Paul Hübner <phubner at openjdk.org> wrote:
>> Hi all,
>>
>> This change strengthens our Valhalla-specific classloading test suite and guards against regressions. An overview of the new changes is as follows:
>> * `BigClassTreeClassLoader`: a utility classloader that generates huge class trees on the fly. The idea is to generate a tree that is deep (lots of parent classes) and very wide (classes have lots of value classes as fields, which have value class fields, etc.).
>> * `ConcurrentClassLoadingTest` strains the classloading and preloading by classloading many classes at the same time.
>> * `LoadableDescriptorsTest` ensures that the `LoadableDescriptors` attribute can handle unexpected data. This may need to be revisited if https://bugs.openjdk.org/browse/JDK-8366907 changes the semantics.
>> * `PreLoadCircularityTest` ensures that preloading happens even when there are cycles (via inheritance, fields, and both).
>> * `PreLoadDoesNotInitTest` is a regression test that ensures preloading will not initialize a class.
>> * `PreLoadFailuresDoNotImpactApplicationTest` ensures that a flaky classloader during preloading will not cause crashes as long as the classloader can find the class when it is actually used.
>> * `ValueClassInheritanceTest` is a regression test that ensures one cannot have a value class inherit from something that's not an abstract value class.
>
> Paul Hübner has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 12 additional commits since the last revision:
>
> - Update tests to use JDK 26.
> - Merge branch 'lworld' into JDK-8327257
> - Adjust stress rate.
> - Re-enable test.
> - Increase concurrent loading iterations.
> - Reindent.
> - More reviewer comments.
> - Incorporate feedback.
> - Move to JUnit and refactor.
> - Concurrent non-deadlocking huge tree test.
> - ... and 2 more: https://git.openjdk.org/valhalla/compare/dea11177...d02d931b
Thanks for the review.
-------------
PR Comment: https://git.openjdk.org/valhalla/pull/1552#issuecomment-3275452081
More information about the valhalla-dev
mailing list