RFR: Test @requires should check what GC is enabled at runtime
Roman Kennke
rkennke at redhat.com
Fri Nov 30 15:17:14 UTC 2018
> http://cr.openjdk.java.net/~shade/shenandoah/requires-runtime/webrev.01/
>
> This rewires our @requires handling again! @requires is messy, and new filtering code is based on
> understanding that:
> a) "vm.gc.Shenandoah" says "Shenandoah is available in builds, and can be selected"
> b) "vm.gc == null" says "...and we are running with default GC"
> c) "vm.gc = Shenandoah" says "...or user specified -XX:+UseShenandoahGC in jtreg opts"
>
> ...which makes all tests that set -XX:+UseShenandoahGC gain the filter like:
> @requires vm.gc.Shenandoah & (vm.gc == "null" | vm.gc == "Shenandoah")
>
> Testing: hotspot_gc_shenandoah with:
> - -shenandoahgc build
> - +shenandoahgc build
> - +shenandoahgc build, TEST_VM_OPTS="-XX:+UseShenandoahGC"
> - +shenandoahgc build, TEST_VM_OPTS="-XX:+UseParallelGC"
I needed to think again. So what you proposed selects the test if:
- Shenandoah is actually available (vm.gc.Shenandoah)
*and* one of:
- harness did not force a GC
- harness forced ShenandoahGC
which seems good. Go!
Thanks!
Roman
More information about the shenandoah-dev
mailing list