8255982: Extend BasicJMapTest to test with different GC Heap

Reviewed-by: shade, iignatyev
This commit is contained in:
Lin Zang 2020-11-12 02:12:15 +00:00 committed by Igor Ignatyev
parent 2f06893a29
commit 14e25e2059
2 changed files with 62 additions and 4 deletions
test/jdk

@ -46,8 +46,12 @@ requires.extraPropDefns.vmOpts = -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
requires.properties= \
sun.arch.data.model \
java.runtime.name \
vm.gc.Z \
vm.gc.G1 \
vm.gc.Serial \
vm.gc.Parallel \
vm.gc.Shenandoah \
vm.gc.Epsilon \
vm.gc.Z \
vm.graal.enabled \
vm.compiler1.enabled \
vm.compiler2.enabled \

@ -34,16 +34,70 @@ import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
/*
* @test
* @summary Unit test for jmap utility
* @test id=Serial
* @requires vm.gc.Serial
* @summary Unit test for jmap utility (Serial GC)
* @key intermittent
* @library /test/lib
* @build jdk.test.lib.hprof.*
* @build jdk.test.lib.hprof.model.*
* @build jdk.test.lib.hprof.parser.*
* @build jdk.test.lib.hprof.util.*
* @run main/timeout=240 BasicJMapTest
* @run main/othervm/timeout=240 -XX:+UseSerialGC BasicJMapTest
*/
/*
* @test id=Parallel
* @requires vm.gc.Parallel
* @summary Unit test for jmap utility (Parallel GC)
* @key intermittent
* @library /test/lib
* @build jdk.test.lib.hprof.*
* @build jdk.test.lib.hprof.model.*
* @build jdk.test.lib.hprof.parser.*
* @build jdk.test.lib.hprof.util.*
* @run main/othervm/timeout=240 -XX:+UseParallelGC BasicJMapTest
*/
/*
* @test id=G1
* @requires vm.gc.G1
* @summary Unit test for jmap utility (G1 GC)
* @key intermittent
* @library /test/lib
* @build jdk.test.lib.hprof.*
* @build jdk.test.lib.hprof.model.*
* @build jdk.test.lib.hprof.parser.*
* @build jdk.test.lib.hprof.util.*
* @run main/othervm/timeout=240 -XX:+UseG1GC BasicJMapTest
*/
/*
* @test id=Shenandoah
* @requires vm.gc.Shenandoah
* @summary Unit test for jmap utility (Shenandoah GC)
* @key intermittent
* @library /test/lib
* @build jdk.test.lib.hprof.*
* @build jdk.test.lib.hprof.model.*
* @build jdk.test.lib.hprof.parser.*
* @build jdk.test.lib.hprof.util.*
* @run main/othervm/timeout=240 -XX:+UseShenandoahGC BasicJMapTest
*/
/*
* @test id=Z
* @requires vm.gc.Z
* @summary Unit test for jmap utility (Z GC)
* @key intermittent
* @library /test/lib
* @build jdk.test.lib.hprof.*
* @build jdk.test.lib.hprof.model.*
* @build jdk.test.lib.hprof.parser.*
* @build jdk.test.lib.hprof.util.*
* @run main/othervm/timeout=240 -XX:+UseZGC BasicJMapTest
*/
public class BasicJMapTest {
private static ProcessBuilder processBuilder = new ProcessBuilder();