On Mon, 4 May 2026 14:41:52 GMT, Casper Norrbin <[email protected]> wrote:

> Hi everyone,
> 
> The `objArrayOop` gtest currently only tests reference arrays, but should 
> also test on flat arrays. This is reflected by a `FIXME` at the top of the 
> file. 
> 
> For this change I expanded the test to also cover flat arrays. The original 
> tested options for ref arrays (mostly related to header size and layout) make 
> less sense for a flattened array, so I instead picked more relevant options 
> to test across. I also refactored the whole test so it becomes more readable. 
> The actual data tested on remains untouched.
> 
> The jtreg runner was also missing a couple of configurations, had a bad gtest 
> specifier, and had a flag misspelled, so I fixed all those as well.
> 
> Testing:
> - Tier 1
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Thanks, left some small comments.

test/hotspot/gtest/oops/test_objArrayOop.cpp line 99:

> 97: 
> 98:   for (const FlatArraySizeCase c : flatCases) {
> 99:     if (c.objal == (int)ObjectAlignmentInBytes) {

Is there a reason you skip coops/COH here but not for the ref array?

test/hotspot/jtreg/gtest/ObjArrayTests.java line 33:

> 31:  * @summary Run object array size tests with compressed oops
> 32:  * @library /test/lib
> 33:  * @modules java.base/jdk.internal.misc

I don't think these `@modules` are required, other `GTestWrapper` tests don't 
use them.

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

PR Review: 
https://git.openjdk.org/valhalla/pull/2383#pullrequestreview-4221263980
PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2383#discussion_r3182695046
PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2383#discussion_r3182582602

Reply via email to