# HG changeset patch # User duke # Date 1499286481 -7200 # Node ID 40ad5a030c2ffc4cd330d4b720557ba98633412e # Parent 296b6f1ad81e76e36d254598014c175a48c3b331# Parent 89406c257bc9e0a872e6b08e816222bf68a80359 Merge diff -r 296b6f1ad81e -r 40ad5a030c2f .hgtags-top-repo --- a/.hgtags-top-repo Mon Nov 21 18:47:57 2016 +0000 +++ b/.hgtags-top-repo Wed Jul 05 22:28:01 2017 +0200 @@ -387,3 +387,4 @@ 2b3e5caafe3594ea507c37675c4d3086f415dc64 jdk-9+142 1fc62b1c629fb80fdaa639d3b59452a184f0d705 jdk-9+143 8d337fd6333e28c48aa87880144b840aad82baaf jdk-9+144 +ff98aa9ec9fae991e426ce5926fc9036d25f5562 jdk-9+145 diff -r 296b6f1ad81e -r 40ad5a030c2f make/jprt.properties --- a/make/jprt.properties Mon Nov 21 18:47:57 2016 +0000 +++ b/make/jprt.properties Wed Jul 05 22:28:01 2017 +0200 @@ -334,11 +334,7 @@ solaris_sparcv9_5.11-{product|fastdebug}-c2-jvm98, \ solaris_sparcv9_5.11-{product|fastdebug}-c2-jvm98_nontiered, \ solaris_sparcv9_5.11-{product|fastdebug}-c2-scimark, \ - solaris_sparcv9_5.11-product-c2-runThese8, \ - solaris_sparcv9_5.11-{product|fastdebug}-c2-GCBasher_SerialGC, \ - solaris_sparcv9_5.11-{product|fastdebug}-c2-GCBasher_ParallelGC, \ - solaris_sparcv9_5.11-{product|fastdebug}-c2-GCBasher_CMS, \ - solaris_sparcv9_5.11-{product|fastdebug}-c2-GCBasher_G1 + solaris_sparcv9_5.11-product-c2-runThese8, my.test.targets.hotspot.solaris.x64= \ solaris_x64_5.11-{product|fastdebug}-c2-jvm98, \ @@ -346,40 +342,24 @@ solaris_x64_5.11-{product|fastdebug}-c2-scimark, \ solaris_x64_5.11-product-c2-runThese8, \ solaris_x64_5.11-product-c2-runThese8_Xcomp_lang, \ - solaris_x64_5.11-product-c2-runThese8_Xcomp_vm, \ - solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_SerialGC, \ - solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_ParallelGC, \ - solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_CMS, \ - solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_G1 + solaris_x64_5.11-product-c2-runThese8_Xcomp_vm, my.test.targets.hotspot.linux.i586= \ linux_i586_3.8-{product|fastdebug}-c2-jvm98, \ linux_i586_3.8-{product|fastdebug}-c2-jvm98_nontiered, \ linux_i586_3.8-{product|fastdebug}-c2-scimark, \ linux_i586_3.8-fastdebug-c2-runThese8_Xcomp_lang, \ - linux_i586_3.8-fastdebug-c2-runThese8_Xcomp_vm, \ - linux_i586_3.8-{product|fastdebug}-c2-GCBasher_SerialGC, \ - linux_i586_3.8-{product|fastdebug}-c2-GCBasher_ParallelGC, \ - linux_i586_3.8-{product|fastdebug}-c2-GCBasher_CMS, \ - linux_i586_3.8-{product|fastdebug}-c2-GCBasher_G1 + linux_i586_3.8-fastdebug-c2-runThese8_Xcomp_vm my.test.targets.hotspot.linux.x64= \ linux_x64_3.8-{product|fastdebug}-c2-jvm98, \ linux_x64_3.8-{product|fastdebug}-c2-jvm98_nontiered, \ - linux_x64_3.8-{product|fastdebug}-c2-scimark, \ - linux_x64_3.8-{product|fastdebug}-c2-GCBasher_SerialGC, \ - linux_x64_3.8-{product|fastdebug}-c2-GCBasher_ParallelGC, \ - linux_x64_3.8-{product|fastdebug}-c2-GCBasher_CMS, \ - linux_x64_3.8-{product|fastdebug}-c2-GCBasher_G1 + linux_x64_3.8-{product|fastdebug}-c2-scimark my.test.targets.hotspot.macosx.x64= \ macosx_x64_10.9-{product|fastdebug}-c2-jvm98, \ macosx_x64_10.9-{product|fastdebug}-c2-jvm98_nontiered, \ - macosx_x64_10.9-{product|fastdebug}-c2-scimark, \ - macosx_x64_10.9-{product|fastdebug}-c2-GCBasher_SerialGC, \ - macosx_x64_10.9-{product|fastdebug}-c2-GCBasher_ParallelGC, \ - macosx_x64_10.9-{product|fastdebug}-c2-GCBasher_CMS, \ - macosx_x64_10.9-{product|fastdebug}-c2-GCBasher_G1 + macosx_x64_10.9-{product|fastdebug}-c2-scimark my.test.targets.hotspot.windows.i586= \ windows_i586_6.3-{product|fastdebug}-c2-jvm98, \ @@ -387,11 +367,7 @@ windows_i586_6.3-{product|fastdebug}-c2-scimark, \ windows_i586_6.3-product-c2-runThese8, \ windows_i586_6.3-product-c2-runThese8_Xcomp_lang, \ - windows_i586_6.3-product-c2-runThese8_Xcomp_vm, \ - windows_i586_6.3-{product|fastdebug}-c2-GCBasher_SerialGC, \ - windows_i586_6.3-{product|fastdebug}-c2-GCBasher_ParallelGC, \ - windows_i586_6.3-{product|fastdebug}-c2-GCBasher_CMS, \ - windows_i586_6.3-{product|fastdebug}-c2-GCBasher_G1 + windows_i586_6.3-product-c2-runThese8_Xcomp_vm, my.test.targets.hotspot.windows.x64= \ windows_x64_6.3-{product|fastdebug}-c2-jvm98, \ @@ -399,11 +375,7 @@ windows_x64_6.3-{product|fastdebug}-c2-scimark, \ windows_x64_6.3-product-c2-runThese8, \ windows_x64_6.3-product-c2-runThese8_Xcomp_lang, \ - windows_x64_6.3-product-c2-runThese8_Xcomp_vm, \ - windows_x64_6.3-{product|fastdebug}-c2-GCBasher_SerialGC, \ - windows_x64_6.3-{product|fastdebug}-c2-GCBasher_ParallelGC, \ - windows_x64_6.3-{product|fastdebug}-c2-GCBasher_CMS, \ - windows_x64_6.3-{product|fastdebug}-c2-GCBasher_G1 + windows_x64_6.3-product-c2-runThese8_Xcomp_vm, # Some basic "smoke" tests for OpenJDK builds my.test.targets.hotspot.open= \ @@ -468,9 +440,17 @@ ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_gc_2}, \ ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_gc_closed}, \ ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_gc_gcold}, \ + ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_gc_gcbasher}, \ ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_runtime}, \ ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_serviceability}, \ ${my.make.rule.test.targets.hotspot.reg.group:GROUP=jdk_svc_sanity}, \ + solaris_sparcv9_5.11-product-c2-hotspot_fast_gc_gcbasher, \ + solaris_x64_5.11-product-c2-hotspot_fast_gc_gcbasher, \ + linux_i586_3.8-product-c2-hotspot_fast_gc_gcbasher, \ + linux_x64_3.8-product-c2-hotspot_fast_gc_gcbasher, \ + macosx_x64_10.9-product-c2-hotspot_fast_gc_gcbasher, \ + windows_i586_6.3-product-c2-hotspot_fast_gc_gcbasher, \ + windows_x64_6.3-product-c2-hotspot_fast_gc_gcbasher, \ ${my.additional.make.rule.test.targets.hotspot.reg} # Other Makefile based Hotspot tests diff -r 296b6f1ad81e -r 40ad5a030c2f test/failure_handler/Makefile --- a/test/failure_handler/Makefile Mon Nov 21 18:47:57 2016 +0000 +++ b/test/failure_handler/Makefile Wed Jul 05 22:28:01 2017 +0200 @@ -86,7 +86,7 @@ test: require_env build rm -rf "${RUN_DIR}" mkdir -p "${RUN_DIR}" - "${JTREG_HOME}"/bin/jtreg \ + "${JTREG_HOME}"/bin/jtreg \ -jdk:"${JAVA_HOME}" \ ${JTREG_TEST_OPTS} \ -timeout:0.1 -va -retain:all \ @@ -94,6 +94,7 @@ -agentvm \ -thd:"${TARGET_JAR}" \ -th:jdk.test.failurehandler.jtreg.GatherProcessInfoTimeoutHandler \ + -thtimeout:0 \ -od:"${TARGET_JAR}" \ -o:jdk.test.failurehandler.jtreg.GatherDiagnosticInfoObserver \ -w:"${RUN_DIR}/JTwork" \ diff -r 296b6f1ad81e -r 40ad5a030c2f test/failure_handler/src/share/classes/jdk/test/failurehandler/HtmlSection.java --- a/test/failure_handler/src/share/classes/jdk/test/failurehandler/HtmlSection.java Mon Nov 21 18:47:57 2016 +0000 +++ b/test/failure_handler/src/share/classes/jdk/test/failurehandler/HtmlSection.java Wed Jul 05 22:28:01 2017 +0200 @@ -49,7 +49,7 @@ private HtmlSection(PrintWriter pw, String id, String name, HtmlSection rootSection) { this.pw = pw; - textWriter = new PrintWriter(new HtmlFilterWriter(pw)); + textWriter = new PrintWriter(new HtmlFilterWriter(pw), true); this.id = id; this.name = name; child = null; diff -r 296b6f1ad81e -r 40ad5a030c2f test/failure_handler/src/share/classes/jdk/test/failurehandler/action/ActionHelper.java --- a/test/failure_handler/src/share/classes/jdk/test/failurehandler/action/ActionHelper.java Mon Nov 21 18:47:57 2016 +0000 +++ b/test/failure_handler/src/share/classes/jdk/test/failurehandler/action/ActionHelper.java Wed Jul 05 22:28:01 2017 +0200 @@ -164,7 +164,8 @@ Stopwatch stopwatch = new Stopwatch(); stopwatch.start(); - log.printf("%s%n[%tF % storedAppOutput; - private final String lockFileName; - private long lockCreationTime; - private Process appProcess; - private final ArrayList storedAppOutput; + protected Process appProcess; + protected static final int appWaitTime = 100; + protected final String lockFileName; /* * Drain child process output, store it into string array @@ -255,14 +256,10 @@ } /** - * Run the app - * - * @param vmArguments - * @throws IOException + * Analyze an environment and prepare a command line to + * run the app, app name should be added explicitly */ - public void runApp(List vmArguments) - throws IOException { - + public List runAppPrepare(List vmArguments) { // We should always use testjava or throw an exception, // so we can't use JDKToolFinder.getJDKTool("java"); // that falls back to compile java on error @@ -303,28 +300,52 @@ String classpath = System.getProperty("test.class.path"); cmd.add((classpath == null) ? "." : classpath); - cmd.add(this.getAppName()); - cmd.add(lockFileName); + return cmd; + } - // Reporting + /** + * Assemble command line to a printable string + */ + public void printCommandLine(List cmd) { + // A bit of verbosity StringBuilder cmdLine = new StringBuilder(); for (String strCmd : cmd) { cmdLine.append("'").append(strCmd).append("' "); } - // A bit of verbosity System.out.println("Command line: [" + cmdLine.toString() + "]"); + } + + public void startGobblerPipe() { + // Create pipe reader for process, and read stdin and stderr to array of strings + InputGobbler gb = new InputGobbler(appProcess.getInputStream(), storedAppOutput); + gb.start(); + } + + /** + * Run the app. + * + * @param vmArguments + * @throws IOException + */ + public void runApp(List vmArguments) + throws IOException { + + List cmd = runAppPrepare(vmArguments); + + cmd.add(this.getAppName()); + cmd.add(lockFileName); + + printCommandLine(cmd); ProcessBuilder pb = new ProcessBuilder(cmd); // we don't expect any error output but make sure we are not stuck on pipe // pb.redirectErrorStream(false); + // ProcessBuilder.start can throw IOException pb.redirectError(ProcessBuilder.Redirect.INHERIT); - appProcess = pb.start(); - // Create pipe reader for process, and read stdin and stderr to array of strings - InputGobbler gb = new InputGobbler(appProcess.getInputStream(), storedAppOutput); - gb.start(); + startGobblerPipe(); } /** @@ -334,10 +355,14 @@ */ public void stopApp() throws IOException { deleteLock(); - waitAppTerminate(); - int exitcode = appProcess.exitValue(); - if (exitcode != 0) { - throw new IOException("LingeredApp terminated with non-zero exit code " + exitcode); + // The startApp() of the derived app can throw + // an exception before the LA actually starts + if (appProcess != null) { + waitAppTerminate(); + int exitcode = appProcess.exitValue(); + if (exitcode != 0) { + throw new IOException("LingeredApp terminated with non-zero exit code " + exitcode); + } } }