8230881: serviceability/sa/TestJmapCore tests fail with java.lang.RuntimeException: Could not find dump file
Reviewed-by: dholmes, cjplummer
--- a/test/hotspot/jtreg/serviceability/sa/TestJmapCore.java Fri Sep 13 11:00:07 2019 +0100
+++ b/test/hotspot/jtreg/serviceability/sa/TestJmapCore.java Fri Sep 13 09:34:13 2019 -0700
@@ -98,8 +98,8 @@
: ProcessTools.executeProcess("sh", "-c", "ulimit -c unlimited && "
+ ProcessTools.getCommandLine(pb));
File core;
- String pattern = Platform.isWindows() ? "mdmp" : "core";
- File[] cores = new File(".").listFiles((dir, name) -> name.contains(pattern));
+ String pattern = Platform.isWindows() ? ".*\\.mdmp" : "core(\\.\\d+)?";
+ File[] cores = new File(".").listFiles((dir, name) -> name.matches(pattern));
if (cores.length == 0) {
// /cores/core.$pid might be generated on macosx by default
String pid = output.firstMatch("^(\\d+)" + pidSeparator, 1);