[lworld] RFR: 8372261: [lworld] Augment vmTestbase array tests with large flat arrays [v2]
Leonid Mesnik
lmesnik at openjdk.org
Fri Feb 13 15:50:43 UTC 2026
On Fri, 13 Feb 2026 14:51:23 GMT, Paul Hübner <phubner at openjdk.org> wrote:
>> Leonid Mesnik has updated the pull request incrementally with one additional commit since the last revision:
>>
>> fixed gp name
>
> test/hotspot/jtreg/vmTestbase/nsk/share/gc/Memory.java line 40:
>
>> 38: private static int objectExtraSize = 0;
>> 39:
>> 40: private static final boolean previewEnabled =
>
> I think there are some more robust ways to check for preview.
> * The best way is probably `jdk.internal.misc.PreviewFeatures.isEnabled` which checks if the current VM is preview-enabled. Needs `@modules java.base/jdk.internal.misc`.
> * Alternatively, if the above is not possible, `jdk.test.lib.Utils.getTestJavaOpts` which you can check in a Stream for `--enable-preview`. This consolidates all of the `test.vm.opts` and `test.java.opts` for you.
That's an actual problem with these vmTestbase jtreg tests.
To use jdk.internal.misc.PreviewFeatures.isEnabled it is needed to add `@modules java.base/jdk.internal.misc`to every test. The same for `jdk.test.lib.Utils.getTestJavaOpts`. It is needed to ensure that `/test/lib` is used by every test.
This file has `TODO: somehow determine the real value`.
It would be really great to find single solution. This requires fixing all vmTestbase tests, but I am not sure how to better implement this.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/2099#discussion_r2804871559
More information about the valhalla-dev
mailing list