Skip to content

Commit 99a6c47

Browse files
committed
8298073: gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java causes test task timeout on macosx
8241293: CompressedClassSpaceSizeInJmapHeap.java time out after 8 minutes Reviewed-by: ayang, sspitsyn
1 parent f729f5b commit 99a6c47

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

test/hotspot/jtreg/ProblemList.txt

-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ gc/stress/gclocker/TestExcessGCLockerCollections.java 8229120 generic-all
7878
gc/stress/gclocker/TestGCLockerWithParallel.java 8180622 generic-all
7979
gc/stress/gclocker/TestGCLockerWithG1.java 8180622 generic-all
8080
gc/stress/TestJNIBlockFullGC/TestJNIBlockFullGC.java 8192647 generic-all
81-
gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java 8241293,8298073 macosx-x64,macosx-aarch64
8281
gc/stress/TestStressG1Humongous.java 8286554 windows-x64
8382

8483
#############################################################################

test/hotspot/jtreg/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -32,10 +32,11 @@
3232
* @library /test/lib
3333
* @modules java.base/jdk.internal.misc
3434
* java.management
35-
* @run main/othervm -XX:CompressedClassSpaceSize=48m gc.metaspace.CompressedClassSpaceSizeInJmapHeap
35+
* @run main/timeout=240 gc.metaspace.CompressedClassSpaceSizeInJmapHeap
3636
*/
3737

3838
import jdk.test.lib.JDKToolLauncher;
39+
import jdk.test.lib.apps.LingeredApp;
3940
import jdk.test.lib.process.OutputAnalyzer;
4041
import jdk.test.lib.process.ProcessTools;
4142
import jdk.test.lib.SA.SATestUtils;
@@ -49,7 +50,9 @@ public class CompressedClassSpaceSizeInJmapHeap {
4950
public static void main(String[] args) throws Exception {
5051
SATestUtils.skipIfCannotAttach(); // throws SkippedException if attach not expected to work.
5152

52-
String pid = Long.toString(ProcessTools.getProcessId());
53+
LingeredApp theApp = new LingeredApp();
54+
LingeredApp.startApp(theApp, "-XX:CompressedClassSpaceSize=48m");
55+
String pid = Long.toString(theApp.getPid());
5356

5457
JDKToolLauncher jmap = JDKToolLauncher.create("jhsdb")
5558
.addToolArg("jmap")
@@ -69,6 +72,8 @@ public static void main(String[] args) throws Exception {
6972
OutputAnalyzer output = new OutputAnalyzer(read(out));
7073
output.shouldContain("CompressedClassSpaceSize = 50331648 (48.0MB)");
7174
out.delete();
75+
76+
LingeredApp.stopApp(theApp);
7277
}
7378

7479
private static void run(ProcessBuilder pb) throws Exception {

0 commit comments

Comments
 (0)