test/gc/metaspace/ClassMetaspaceSizeInJmapHeap.java

Print this page
rev 4276 : 8009408: gc/metaspace/ClassMetaspaceSizeInJmapHeap.java fails with "exit code 1"

*** 28,48 **** * @library /testlibrary * @run main/othervm -XX:ClassMetaspaceSize=50m ClassMetaspaceSizeInJmapHeap */ import com.oracle.java.testlibrary.*; import java.nio.file.*; import java.io.File; import java.nio.charset.Charset; import java.util.List; public class ClassMetaspaceSizeInJmapHeap { public static void main(String[] args) throws Exception { String pid = Integer.toString(ProcessTools.getProcessId()); ! ProcessBuilder pb = new ProcessBuilder(); ! pb.command(JDKToolFinder.getJDKTool("jmap"), "-heap", pid); File out = new File("ClassMetaspaceSizeInJmapHeap.stdout.txt"); pb.redirectOutput(out); File err = new File("ClassMetaspaceSizeInJmapHeap.stderr.txt"); --- 28,51 ---- * @library /testlibrary * @run main/othervm -XX:ClassMetaspaceSize=50m ClassMetaspaceSizeInJmapHeap */ import com.oracle.java.testlibrary.*; + import com.oracle.java.testlibrary.gc.*; import java.nio.file.*; import java.io.File; import java.nio.charset.Charset; import java.util.List; public class ClassMetaspaceSizeInJmapHeap { public static void main(String[] args) throws Exception { String pid = Integer.toString(ProcessTools.getProcessId()); ! JmapLauncher jmap = new JmapLauncher(); ! jmap.setJmapArguments("-heap", pid); ! ! ProcessBuilder pb = new ProcessBuilder(jmap.getCommand()); File out = new File("ClassMetaspaceSizeInJmapHeap.stdout.txt"); pb.redirectOutput(out); File err = new File("ClassMetaspaceSizeInJmapHeap.stderr.txt");