On Thu, 4 Jan 2024 20:37:39 GMT, David Holmes <dhol...@openjdk.org> wrote:

>>> > For this test I think we can just add @requires vm.gc.Serial
>>> 
>>> @stefank but it doesn't require that, it explicitly sets that. The test 
>>> requires that no specific GC has been requested.
>> 
>> @dholmes-ora `@requires vm.gc.Serial` doesn't mean that it requires Serial 
>> to be set. It's more subtle than that. It means that either Serial is set 
>> (and available) or it can be set (because no other GC has been selected). It 
>> is the correct requires line to use when you explicitly set the GC in the 
>> test. Look at our other GC tests.
>> 
>> For example:
>> test/hotspot/jtreg/gc/arguments/TestNewSizeThreadIncrease.java
>> 
>> Without selecting a GC, the test is run:
>> 
>> $ make -C ../build/fastdebug test 
>> TEST=test/hotspot/jtreg/gc/arguments/TestNewSizeThreadIncrease.java 
>> JTREG="JAVA_OPTIONS=-Xmx128m"
>> ...
>>    TEST                                              TOTAL  PASS  FAIL ERROR 
>>   
>>    jtreg:open/test/hotspot/jtreg/gc/arguments/TestNewSizeThreadIncrease.java
>>                                                          1     1     0     0 
>>  
>> 
>> 
>> With Serial as the selected GC, the test is run:
>> 
>> $ make -C ../build/fastdebug test 
>> TEST=test/hotspot/jtreg/gc/arguments/TestNewSizeThreadIncrease.java 
>> JTREG="JAVA_OPTIONS=-Xmx128m -XX:+UseSerialGC"
>> ...
>>    TEST                                              TOTAL  PASS  FAIL ERROR 
>>   
>>    jtreg:open/test/hotspot/jtreg/gc/arguments/TestNewSizeThreadIncrease.java
>>                                                          1     1     0     0 
>>   
>> 
>> 
>> With G1 as the selected GC, the test is excluded:
>> 
>> $ make -C ../build/fastdebug test 
>> TEST=test/hotspot/jtreg/gc/arguments/TestNewSizeThreadIncrease.java 
>> JTREG="JAVA_OPTIONS=-Xmx128m -XX:+UseG1GC"
>> ...
>>    TEST                                              TOTAL  PASS  FAIL ERROR 
>>   
>>    jtreg:open/test/hotspot/jtreg/gc/arguments/TestNewSizeThreadIncrease.java
>>                                                          0     0     0     0
>
>> It means that either Serial is set (and available) or it can be set 
> 
> @stefank that is subtle - and unintuitive. Thanks for explaining.

@dholmes-ora Thanks for the review.

This change only involves the test part. Do I need a second review?

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

PR Comment: https://git.openjdk.org/jdk/pull/17263#issuecomment-1878035550

Reply via email to