RFR: 8307804: Reorganize ArrayJuggle test cases [v2]

David Holmes dholmes at openjdk.org
Tue May 16 05:10:48 UTC 2023


On Mon, 15 May 2023 09:27:05 GMT, Leo Korinth <lkorinth at openjdk.org> wrote:

>> Move all ArrayJuggle test cases to the same directory: test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle
>> 
>> Rename Juggle01 to Juggle3 (so it will not be confused with Juggle1)
>> 
>> Remove all directories and files used to launch the tests, instead use multiple  `@test id=xx` "annotations" in the four kept test files.
>> 
>> Create a new test file Juggle3Quick.java that will act as a quick group of tests. Unfortunately `#id` selectors can not be used in test groups so this is a workaround. See: https://bugs.openjdk.org/browse/CODETOOLS-7903467
>
> Leo Korinth has updated the pull request incrementally with one additional commit since the last revision:
> 
>   rerun tests

Changes are fine in principle. I haven't tried to verify the details of each test case.

I've made a number of comments below about reformatting the `@test` segments to the normal multi-line format. In the PR I found these very hard to read ( Ididn't even realize jtreg would process them as a single line like that!). I did discover afterwards that these look much better when the file is viewed wide-screen so I will leave it for GC reviewers to decide what they prefer.

Thanks.

test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/ArrayJuggle.README line 1:

> 1: Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.

The README  needs some updating with your changes

test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle1.java line 30:

> 28: 
> 29: /* @test @key stress randomness @library /vmTestbase /test/lib @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle1 */
> 30: /* @test @key stress randomness @library /vmTestbase /test/lib @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle1 -tg */

These should be laid out in the normal multi-line format - it is too hard to mentally parse otherwise.

test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle2.java line 32:

> 30: /* @test @key stress randomness @library /vmTestbase /test/lib @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle2 */
> 31: /* @test @key stress randomness @library /vmTestbase /test/lib @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle2 -tg */
> 32: 

Again please use multi-line format

test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle3.java line 28:

> 26:  */
> 27: 
> 28: // Run in Juggle3Quic.java @test id=1  @key stress randomness @library /vmTestbase /test/lib @run main/othervm -XX:+HeapDumpOnOutOfMemoryError -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle3 -gp byteArr -ms low

Is this meant to be a comment? I think you are telling me this case gets run in another file, but it is very hard to read.

test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle3.java line 60:

> 58: /* @test id=31 @key stress randomness @library /vmTestbase /test/lib @run main/othervm -XX:+HeapDumpOnOutOfMemoryError -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle3 -gp hashed(objectArr) -ms low */
> 59: /* @test id=32 @key stress randomness @library /vmTestbase /test/lib @run main/othervm -XX:+HeapDumpOnOutOfMemoryError -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle3 -gp hashed(objectArr) -ms medium */
> 60: /* @test id=33 @key stress randomness @library /vmTestbase /test/lib @run main/othervm -XX:+HeapDumpOnOutOfMemoryError -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle3 -gp hashed(objectArr) -ms high */

Please use normal multi-line format.

test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle3Quick.java line 32:

> 30: /* @test id=22 @key stress randomness @library /vmTestbase /test/lib @run main/othervm -XX:+HeapDumpOnOutOfMemoryError -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle3 -gp doubleArr -ms low */
> 31: /* @test id=29 @key stress randomness @library /vmTestbase /test/lib @run main/othervm -XX:+HeapDumpOnOutOfMemoryError -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle3 -gp hashed(doubleArr) -ms medium */
> 32: /* @test id=34 @key stress randomness @library /vmTestbase /test/lib @run main/othervm -XX:+HeapDumpOnOutOfMemoryError -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle3 -gp random(arrays) -ms high */

Please use normal multi-line format

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

PR Review: https://git.openjdk.org/jdk/pull/13929#pullrequestreview-1427706546
PR Review Comment: https://git.openjdk.org/jdk/pull/13929#discussion_r1194606832
PR Review Comment: https://git.openjdk.org/jdk/pull/13929#discussion_r1194601316
PR Review Comment: https://git.openjdk.org/jdk/pull/13929#discussion_r1194601548
PR Review Comment: https://git.openjdk.org/jdk/pull/13929#discussion_r1194602532
PR Review Comment: https://git.openjdk.org/jdk/pull/13929#discussion_r1194602865
PR Review Comment: https://git.openjdk.org/jdk/pull/13929#discussion_r1194603147


More information about the hotspot-gc-dev mailing list