RFR: 8341261: Tests assume UnlockExperimentalVMOptions is disabled by default [v2]
Todd V. Jonker
duke at openjdk.org
Wed Oct 2 19:09:35 UTC 2024
On Tue, 1 Oct 2024 19:28:25 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> Todd V. Jonker has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Refactor VMOptionWarning for better scoping of @require
>> - Use simpler vm.opt.final approach
>
>> 'm not entirely satisfied by adding a @require that only applies to a subset of the checks in a test class. In VMOptionWarning, the experimental flag only applies to the first of the three scenarios it checks. But I suspect this is a general problem with @require, and I'd be happy to hear suggestions on how to avoid disabling too much.
>
> You can add multiple run sections with different @requires lines. Then you can let each run line pass in different "tokens" to the main function and let it use that to dispatch to the various sub-tests. Maybe `test/hotspot/jtreg/gc//metaspace/TestSizeTransitions.java` could be a an OK inspiration for that.
@stefank Thanks for the suggestion on bringing better focus to the `@require`. I refactored `VMOptionWarning` in a separate commit.
That said, I'm hesitant about that change because we'll need to backport this to 21, and that will be unclean due to [JDK-8236736](https://bugs.openjdk.org/browse/JDK-8236736) removing a [chunk of this file](https://github.com/openjdk/jdk/commit/bea493bcb86370dc3fb00d86c545f01fc614e000#diff-e3ce20490186bd16e73f192a52ee093fbaac7cd498d99f8fec44ab42571d3eaeR57-L64) in mainline.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21233#issuecomment-2389485121
More information about the hotspot-dev
mailing list