On Sat, 16 Sep 2023 00:10:22 GMT, Jonathan Joo <j...@openjdk.org> wrote:

>> 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?

Yes

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15082#discussion_r1328197163

Reply via email to