< prev index next >

test/gc/TestNUMAPageSize.java

Print this page
rev 7654 : 8040935: -XX:+AggressiveOpts broken: GC triggered before VM initialization completed on several tests
Summary: Changed test to not be affected by external options.
Reviewed-by:
rev 7655 : [mq]: all-collectors

@@ -19,19 +19,30 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
+import com.oracle.java.testlibrary.OutputAnalyzer;
+import com.oracle.java.testlibrary.ProcessTools;
+
 /**
  * @test TestNUMAPageSize
  * @summary Make sure that start up with NUMA support does not cause problems.
  * @bug 8061467
  * @key gc
  * @key regression
- * @run main/othervm -Xmx8M -XX:+UseNUMA TestNUMAPageSize
+ * @library /testlibrary
+ * @run driver TestNUMAPageSize
  */
 
 public class TestNUMAPageSize {
-  public static void main(String args[]) throws Exception {
-    // nothing to do
+  public static void main(String args[]) throws Throwable {
+    String[] options = {null /* GC-flag placeholder */, "-Xmx8M", "-XX:+UseNUMA", "-version"};
+    String[] gcFlags = {"-XX:+UseSerialGC", "-XX:+UseParallelGC", "-XX:+UseConcMarkSweepGC", "-XX:+UseG1GC"};
+    for (String gc : gcFlags) {
+        // Set GC and verify execution.
+        options[0] = gc;
+        OutputAnalyzer output = ProcessTools.executeTestJvm(options);
+        output.shouldHaveExitValue(0);
+    }
   }
 }
< prev index next >