RFR: Fix shared tests to run without Shenandoah

Aleksey Shipilev shade at redhat.com
Wed Nov 28 19:02:54 UTC 2018


On 11/28/18 7:21 PM, Roman Kennke wrote:
>> Okay, what's up with TestFullGCCount test? Does it not run without Shenandoah built? It should. The
>> @requires line there only protects from running the test with Shenandoah in explicit-concurrent
>> mode, right? (While you are at it, you can probably change "vm.gc == "Shenandoah"" to
>> "vm.gc.Shenandoah")
> 
> The way it was written was very confusing and it was wrong too. All the
> @requires together would not select any test at all, except default GC.

Really? Multiple @requires are AND-ed. The @requires in this test are NOT-ed. So, passing both
requires are actually very easy, no?

See:

Running tests using TEST_OPTS control variable 'VM_OPTIONS=-XX:+UnlockExperimentalVMOptions
-XX:+UseShenandoahGC -XX:+ExplicitGCInvokesConcurrent'
Test results: no tests selected

Running tests using TEST_OPTS control variable 'VM_OPTIONS=-XX:+UnlockExperimentalVMOptions
-XX:+UseShenandoahGC -XX:-ExplicitGCInvokesConcurrent'
Passed: gc/TestFullGCCount.java
Test results: passed: 1

Running tests using TEST_OPTS control variable 'VM_OPTIONS=-XX:+UseConcMarkSweepGC
-XX:+ExplicitGCInvokesConcurrent'
Test results: no tests selected

Running tests using TEST_OPTS control variable 'VM_OPTIONS=-XX:+UseConcMarkSweepGC
-XX:-ExplicitGCInvokesConcurrent'
Passed: gc/TestFullGCCount.java
Test results: passed: 1

Running tests using TEST_OPTS control variable 'VM_OPTIONS=-XX:+UseParallelGC'
Passed: gc/TestFullGCCount.java
Test results: passed: 1

Running tests using TEST_OPTS control variable 'VM_OPTIONS=-XX:+UseG1GC'
Passed: gc/TestFullGCCount.java
Test results: passed: 1

# Default
Passed: gc/TestFullGCCount.java
Test results: passed: 1

These things are supposed to ensure the selected GC is doing Full GCs on explicit request, and they
seem to do it just fine. That is, there is no need to split the test? And the only thing to do is to
drop "== null"?

> http://cr.openjdk.java.net/~rkennke/fix-shared-tests/webrev.02/

Almost there.

-Aleksey



More information about the shenandoah-dev mailing list