8217332: JTREG: Clean up, use generics instead of raw types
22
23 package gc;
24
25 /* @test TestAllocateHeapAt.java
26 * @key gc
27 * @summary Test to check allocation of Java Heap with AllocateHeapAt option
28 * @requires vm.gc != "Z" & os.family != "aix"
29 * @library /test/lib
30 * @modules java.base/jdk.internal.misc
31 * @run main gc.TestAllocateHeapAt
32 */
33
34 import jdk.test.lib.JDKToolFinder;
35 import jdk.test.lib.process.ProcessTools;
36 import jdk.test.lib.process.OutputAnalyzer;
37 import java.util.ArrayList;
38 import java.util.Collections;
39
40 public class TestAllocateHeapAt {
41 public static void main(String args[]) throws Exception {
42 ArrayList<String> vmOpts = new ArrayList();
43
44 String testVmOptsStr = System.getProperty("test.java.opts");
45 if (!testVmOptsStr.isEmpty()) {
46 String[] testVmOpts = testVmOptsStr.split(" ");
47 Collections.addAll(vmOpts, testVmOpts);
48 }
49 String test_dir = System.getProperty("test.dir", ".");
50 Collections.addAll(vmOpts, new String[] {"-XX:AllocateHeapAt=" + test_dir,
51 "-Xlog:gc+heap=info",
52 "-Xmx32m",
53 "-Xms32m",
54 "-version"});
55
56 System.out.print("Testing:\n" + JDKToolFinder.getJDKTool("java"));
57 for (int i = 0; i < vmOpts.size(); i += 1) {
58 System.out.print(" " + vmOpts.get(i));
59 }
60 System.out.println();
61
|
22
23 package gc;
24
25 /* @test TestAllocateHeapAt.java
26 * @key gc
27 * @summary Test to check allocation of Java Heap with AllocateHeapAt option
28 * @requires vm.gc != "Z" & os.family != "aix"
29 * @library /test/lib
30 * @modules java.base/jdk.internal.misc
31 * @run main gc.TestAllocateHeapAt
32 */
33
34 import jdk.test.lib.JDKToolFinder;
35 import jdk.test.lib.process.ProcessTools;
36 import jdk.test.lib.process.OutputAnalyzer;
37 import java.util.ArrayList;
38 import java.util.Collections;
39
40 public class TestAllocateHeapAt {
41 public static void main(String args[]) throws Exception {
42 ArrayList<String> vmOpts = new ArrayList<>();
43
44 String testVmOptsStr = System.getProperty("test.java.opts");
45 if (!testVmOptsStr.isEmpty()) {
46 String[] testVmOpts = testVmOptsStr.split(" ");
47 Collections.addAll(vmOpts, testVmOpts);
48 }
49 String test_dir = System.getProperty("test.dir", ".");
50 Collections.addAll(vmOpts, new String[] {"-XX:AllocateHeapAt=" + test_dir,
51 "-Xlog:gc+heap=info",
52 "-Xmx32m",
53 "-Xms32m",
54 "-version"});
55
56 System.out.print("Testing:\n" + JDKToolFinder.getJDKTool("java"));
57 for (int i = 0; i < vmOpts.size(); i += 1) {
58 System.out.print(" " + vmOpts.get(i));
59 }
60 System.out.println();
61
|