test/hotspot/jtreg/serviceability/sa/TestJmapCore.java
changeset 58127 41082cd965cc
parent 53817 784537ff9c4e
child 58384 9a3a700ca571
equal deleted inserted replaced
58126:1def54255e93 58127:41082cd965cc
    96         OutputAnalyzer output = useDefaultUlimit
    96         OutputAnalyzer output = useDefaultUlimit
    97             ? ProcessTools.executeProcess(pb)
    97             ? ProcessTools.executeProcess(pb)
    98             : ProcessTools.executeProcess("sh", "-c", "ulimit -c unlimited && "
    98             : ProcessTools.executeProcess("sh", "-c", "ulimit -c unlimited && "
    99                     + ProcessTools.getCommandLine(pb));
    99                     + ProcessTools.getCommandLine(pb));
   100         File core;
   100         File core;
   101         String pattern = Platform.isWindows() ? "mdmp" : "core";
   101         String pattern = Platform.isWindows() ? ".*\\.mdmp" : "core(\\.\\d+)?";
   102         File[] cores = new File(".").listFiles((dir, name) -> name.contains(pattern));
   102         File[] cores = new File(".").listFiles((dir, name) -> name.matches(pattern));
   103         if (cores.length == 0) {
   103         if (cores.length == 0) {
   104             // /cores/core.$pid might be generated on macosx by default
   104             // /cores/core.$pid might be generated on macosx by default
   105             String pid = output.firstMatch("^(\\d+)" + pidSeparator, 1);
   105             String pid = output.firstMatch("^(\\d+)" + pidSeparator, 1);
   106             core = new File("cores/core." + pid);
   106             core = new File("cores/core." + pid);
   107             if (!core.exists()) {
   107             if (!core.exists()) {