RFR: 8364927: Add @requires annotation to TestReclaimStringsLeaksMemory.java [v2]
Stefan Karlsson
stefank at openjdk.org
Wed Sep 3 07:12:45 UTC 2025
On Tue, 2 Sep 2025 21:57:17 GMT, jonghoonpark <duke at openjdk.org> wrote:
>> This change updates `TestReclaimStringsLeaksMemory.java` to properly guard against unsupported GC arguments.
>> Previously, the test only checked `@requires vm.gc == "null"`.
>>
>> The fix separates the tests and adds explicit `@requires` clauses for each GC configuration to ensure the test only runs when supported.
>>
>> This prevents test failures on VMs that do not support the specified GC.
>>
>> (This is my first contribution to the JDK. Thank you for your review and guidance.)
>
> jonghoonpark has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits:
>
> - Merge branch 'master' of https://git.openjdk.org/jdk into JDK-8364927-add-requires-annotation
> - 8364927: Add @requires annotation to TestReclaimStringsLeaksMemory.java
>
> Signed-off-by: jonghoonpark <dev at jonghoonpark.com>
test/hotspot/jtreg/gc/stress/TestReclaimStringsLeaksMemory.java line 38:
> 36:
> 37: /*
> 38: * @test TestReclaimStringsLeaksMemorySerial
In other tests we set the id instead. For example, in the TestSystemGC we have:
* @test id=Serial
Maybe do the same for this test?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26766#discussion_r2317984317
More information about the hotspot-gc-dev
mailing list