< prev index next >

test/hotspot/jtreg/gc/shenandoah/options/TestArgumentRanges.java

Print this page
rev 59823 : 8247751: Shenandoah: options tests should run with smaller heaps
Reviewed-by: XXX

@@ -44,29 +44,35 @@
     }
 
     private static void testHeuristics() throws Exception {
 
         {
-            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions",
+            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+                    "-Xmx128m",
+                    "-XX:+UnlockDiagnosticVMOptions",
                     "-XX:+UnlockExperimentalVMOptions",
                     "-XX:+UseShenandoahGC",
                     "-XX:ShenandoahGCHeuristics=aggressive",
                     "-version");
             OutputAnalyzer output = new OutputAnalyzer(pb.start());
             output.shouldHaveExitValue(0);
         }
         {
-            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions",
+            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+                    "-Xmx128m",
+                    "-XX:+UnlockDiagnosticVMOptions",
                     "-XX:+UnlockExperimentalVMOptions",
                     "-XX:+UseShenandoahGC",
                     "-XX:ShenandoahGCHeuristics=static",
                     "-version");
             OutputAnalyzer output = new OutputAnalyzer(pb.start());
             output.shouldHaveExitValue(0);
         }
         {
-            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions",
+            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+                    "-Xmx128m",
+                    "-XX:+UnlockDiagnosticVMOptions",
                     "-XX:+UnlockExperimentalVMOptions",
                     "-XX:+UseShenandoahGC",
                     "-XX:ShenandoahGCHeuristics=fluff",
                     "-version");
             OutputAnalyzer output = new OutputAnalyzer(pb.start());

@@ -75,38 +81,46 @@
         }
     }
 
     private static void testRange(String option, int min, int max) throws Exception {
         {
-            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions",
+            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+                    "-Xmx128m",
+                    "-XX:+UnlockDiagnosticVMOptions",
                     "-XX:+UnlockExperimentalVMOptions",
                     "-XX:+UseShenandoahGC",
                     "-XX:" + option + "=" + (max + 1),
                     "-version");
             OutputAnalyzer output = new OutputAnalyzer(pb.start());
             output.shouldHaveExitValue(1);
         }
         {
-            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions",
+            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+                    "-Xmx128m",
+                    "-XX:+UnlockDiagnosticVMOptions",
                     "-XX:+UnlockExperimentalVMOptions",
                     "-XX:+UseShenandoahGC",
                     "-XX:" + option + "=" + max,
                     "-version");
             OutputAnalyzer output = new OutputAnalyzer(pb.start());
             output.shouldHaveExitValue(0);
         }
         {
-            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions",
+            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+                    "-Xmx128m",
+                    "-XX:+UnlockDiagnosticVMOptions",
                     "-XX:+UnlockExperimentalVMOptions",
                     "-XX:+UseShenandoahGC",
                     "-XX:" + option + "=" + (min - 1),
                     "-version");
             OutputAnalyzer output = new OutputAnalyzer(pb.start());
             output.shouldHaveExitValue(1);
         }
         {
-            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions",
+            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+                    "-Xmx128m",
+                    "-XX:+UnlockDiagnosticVMOptions",
                     "-XX:+UnlockExperimentalVMOptions",
                     "-XX:+UseShenandoahGC",
                     "-XX:" + option + "=" + min,
                     "-version");
             OutputAnalyzer output = new OutputAnalyzer(pb.start());
< prev index next >