< prev index next >

test/gc/shenandoah/EvilSyncBug.java

Print this page
rev 10636 : [backport] EvilSyncBug test is too slow


  22  */
  23 
  24 /*
  25  * @test EvilSyncBug
  26  * @summary Tests for crash/assert when attaching init thread during shutdown
  27  * @key gc
  28  * @library /testlibrary
  29  * @modules java.base/jdk.internal.misc
  30  *          java.management
  31  * @run driver/timeout=480 EvilSyncBug
  32  */
  33 
  34 import java.util.*;
  35 import java.util.concurrent.*;
  36 import java.util.concurrent.locks.*;
  37 
  38 import com.oracle.java.testlibrary.*;
  39 
  40 public class EvilSyncBug {
  41 
  42     private static final int NUM_RUNS = 100;
  43 
  44     static Thread[] hooks = new MyHook[10000];
  45 
  46     public static void main(String[] args) throws Exception {
  47         if (args.length > 0) {
  48             test();
  49         } else {
  50             for (int i = 0; i < NUM_RUNS; i++) {
  51                 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xms128m",
  52                                                                           "-Xmx128m",
  53                                                                           "-XX:+UseShenandoahGC",
  54                                                                           "-XX:+UnlockDiagnosticVMOptions",
  55                                                                           "-XX:ShenandoahGCHeuristics=aggressive",
  56                                                                           "-XX:+ShenandoahStoreCheck",
  57                                                                           "EvilSyncBug", "test");
  58                 OutputAnalyzer output = new OutputAnalyzer(pb.start());
  59                 output.shouldHaveExitValue(0);
  60             }
  61         }
  62     }




  22  */
  23 
  24 /*
  25  * @test EvilSyncBug
  26  * @summary Tests for crash/assert when attaching init thread during shutdown
  27  * @key gc
  28  * @library /testlibrary
  29  * @modules java.base/jdk.internal.misc
  30  *          java.management
  31  * @run driver/timeout=480 EvilSyncBug
  32  */
  33 
  34 import java.util.*;
  35 import java.util.concurrent.*;
  36 import java.util.concurrent.locks.*;
  37 
  38 import com.oracle.java.testlibrary.*;
  39 
  40 public class EvilSyncBug {
  41 
  42     private static final int NUM_RUNS = 20;
  43 
  44     static Thread[] hooks = new MyHook[10000];
  45 
  46     public static void main(String[] args) throws Exception {
  47         if (args.length > 0) {
  48             test();
  49         } else {
  50             for (int i = 0; i < NUM_RUNS; i++) {
  51                 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xms128m",
  52                                                                           "-Xmx128m",
  53                                                                           "-XX:+UseShenandoahGC",
  54                                                                           "-XX:+UnlockDiagnosticVMOptions",
  55                                                                           "-XX:ShenandoahGCHeuristics=aggressive",
  56                                                                           "-XX:+ShenandoahStoreCheck",
  57                                                                           "EvilSyncBug", "test");
  58                 OutputAnalyzer output = new OutputAnalyzer(pb.start());
  59                 output.shouldHaveExitValue(0);
  60             }
  61         }
  62     }


< prev index next >