RFR: 8319540: GC: Make TestSelectDefaultGC use createTestJavaProcessBuilder

Ramkumar Sunderbabu rsunderbabu at openjdk.org
Thu Nov 27 12:06:47 UTC 2025


On Thu, 27 Nov 2025 08:54:15 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>>> We now how this:
>>> 
>>> ```
>>>         // Start VM without specifying GC
>>>         OutputAnalyzer output = GCArguments.executeTestJava(
>>> ```
>>> 
>>> It sounds to me that the comment say that we're running with out specifying a GC, but with this change we do. I think you need to update the comment or add appropriate requires line(s).
>> 
>> We still don't allow the GC flags. If the test was started with a GC flags, "@requires vm.gc.Serial & vm.gc.G1" will skip the test. Hence, the comment is still valid.
>
>> > We now how this:
>> > ```
>> >         // Start VM without specifying GC
>> >         OutputAnalyzer output = GCArguments.executeTestJava(
>> > ```
>> > 
>> > 
>> >     
>> >       
>> >     
>> > 
>> >       
>> >     
>> > 
>> >     
>> >   
>> > It sounds to me that the comment say that we're running with out specifying a GC, but with this change we do. I think you need to update the comment or add appropriate requires line(s).
>> 
>> We still don't allow the GC flags. If the test was started with a GC flags, "@requires vm.gc.Serial & vm.gc.G1" will skip the test. Hence, the comment is still valid.
> 
> OK. Now I understand.
> 
> I saw that you mentioned the obscure `@requires vm.gc.Serial & vm.gc.G1` pattern and that you were going see if we could make a clearer property. I think that would be beneficial.

@stefank @lkorinth 
Thanks for the review.
Please sponsor.

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

PR Comment: https://git.openjdk.org/jdk/pull/28422#issuecomment-3585505194


More information about the hotspot-gc-dev mailing list