Skip to content

Commit 14e25e2

Browse files
Lin Zangiignatev
authored andcommitted
8255982: Extend BasicJMapTest to test with different GC Heap
Reviewed-by: shade, iignatyev
1 parent 2f06893 commit 14e25e2

File tree

2 files changed

+62
-4
lines changed

2 files changed

+62
-4
lines changed

test/jdk/TEST.ROOT

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,12 @@ requires.extraPropDefns.vmOpts = -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
4646
requires.properties= \
4747
sun.arch.data.model \
4848
java.runtime.name \
49-
vm.gc.Z \
49+
vm.gc.G1 \
50+
vm.gc.Serial \
51+
vm.gc.Parallel \
5052
vm.gc.Shenandoah \
53+
vm.gc.Epsilon \
54+
vm.gc.Z \
5155
vm.graal.enabled \
5256
vm.compiler1.enabled \
5357
vm.compiler2.enabled \

test/jdk/sun/tools/jmap/BasicJMapTest.java

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,70 @@
3434
import jdk.test.lib.process.ProcessTools;
3535

3636
/*
37-
* @test
38-
* @summary Unit test for jmap utility
37+
* @test id=Serial
38+
* @requires vm.gc.Serial
39+
* @summary Unit test for jmap utility (Serial GC)
3940
* @key intermittent
4041
* @library /test/lib
4142
* @build jdk.test.lib.hprof.*
4243
* @build jdk.test.lib.hprof.model.*
4344
* @build jdk.test.lib.hprof.parser.*
4445
* @build jdk.test.lib.hprof.util.*
45-
* @run main/timeout=240 BasicJMapTest
46+
* @run main/othervm/timeout=240 -XX:+UseSerialGC BasicJMapTest
4647
*/
48+
49+
/*
50+
* @test id=Parallel
51+
* @requires vm.gc.Parallel
52+
* @summary Unit test for jmap utility (Parallel GC)
53+
* @key intermittent
54+
* @library /test/lib
55+
* @build jdk.test.lib.hprof.*
56+
* @build jdk.test.lib.hprof.model.*
57+
* @build jdk.test.lib.hprof.parser.*
58+
* @build jdk.test.lib.hprof.util.*
59+
* @run main/othervm/timeout=240 -XX:+UseParallelGC BasicJMapTest
60+
*/
61+
62+
/*
63+
* @test id=G1
64+
* @requires vm.gc.G1
65+
* @summary Unit test for jmap utility (G1 GC)
66+
* @key intermittent
67+
* @library /test/lib
68+
* @build jdk.test.lib.hprof.*
69+
* @build jdk.test.lib.hprof.model.*
70+
* @build jdk.test.lib.hprof.parser.*
71+
* @build jdk.test.lib.hprof.util.*
72+
* @run main/othervm/timeout=240 -XX:+UseG1GC BasicJMapTest
73+
*/
74+
75+
/*
76+
* @test id=Shenandoah
77+
* @requires vm.gc.Shenandoah
78+
* @summary Unit test for jmap utility (Shenandoah GC)
79+
* @key intermittent
80+
* @library /test/lib
81+
* @build jdk.test.lib.hprof.*
82+
* @build jdk.test.lib.hprof.model.*
83+
* @build jdk.test.lib.hprof.parser.*
84+
* @build jdk.test.lib.hprof.util.*
85+
* @run main/othervm/timeout=240 -XX:+UseShenandoahGC BasicJMapTest
86+
*/
87+
88+
/*
89+
* @test id=Z
90+
* @requires vm.gc.Z
91+
* @summary Unit test for jmap utility (Z GC)
92+
* @key intermittent
93+
* @library /test/lib
94+
* @build jdk.test.lib.hprof.*
95+
* @build jdk.test.lib.hprof.model.*
96+
* @build jdk.test.lib.hprof.parser.*
97+
* @build jdk.test.lib.hprof.util.*
98+
* @run main/othervm/timeout=240 -XX:+UseZGC BasicJMapTest
99+
*/
100+
47101
public class BasicJMapTest {
48102

49103
private static ProcessBuilder processBuilder = new ProcessBuilder();

0 commit comments

Comments
 (0)