On Fri, 15 Sep 2023 01:29:57 GMT, David Holmes <dhol...@openjdk.org> wrote:
>> Jonathan Joo has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Clean up test and improve total counter name > > test/jdk/sun/tools/jcmd/TestGcCounters.java line 34: > >> 32: output.shouldHaveExitValue(0); >> 33: output.shouldContain(SUN_THREADS + ".total_gc_cpu_time"); >> 34: output.shouldContain(SUN_THREADS_GCCPU + ".g1_conc_mark"); > > If this test is only for G1 then you need it to `@require` that the GC is G1, > else this will fail when run under other GCs. Is the proper way to do this via adding the @requires annotation in the test header, like done in https://github.com/openjdk/jdk/blob/8f46abc938ffe338e25d5fdbdcfa0aaa12edfa58/test/hotspot/jtreg/gc/stress/TestStressG1Humongous.java#L30? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15082#discussion_r1327872911