JDK-8233291 : [TESTBUG] tools/jlink/plugins/VendorInfoPluginsTest.java fails with debug or non-server VMs
  • Type: Bug
  • Component: tools
  • Sub-Component: jlink
  • Affected Version: 11,14
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-10-31
  • Updated: 2020-06-01
  • Resolved: 2019-11-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 14
11.0.7-oracleFixed 13.0.4Fixed 14 b22Fixed
Related Reports
Relates :  
Description
* Reproduce
-------------------------------------
make test TEST="tools/jlink/plugins/VendorInfoPluginsTest.java" CONF=fastdebug
make test TEST="tools/jlink/plugins/VendorInfoPluginsTest.java" CONF=minimal
-------------------------------------

* Symptom
-------------------------------------
 stdout: [openjdk 14-internal 2020-03-17
OpenJDK Runtime Environment XyzzyVM 3.14.15 (fastdebug build 14-internal+0-adhoc.fool.jdk-dev)
OpenJDK 64-Bit Server VM XyzzyVM 3.14.15 (fastdebug build 14-internal+0-adhoc.fool.jdk-dev, mixed mode)
];

...

java.lang.RuntimeException: '^.*Runtime Environment XyzzyVM 3.14.15 \(build.*$' missing from stdout

        at jdk.test.lib.process.OutputAnalyzer.stdoutShouldMatch(OutputAnalyzer.java:324)
        at VendorInfoPluginsTest.main(VendorInfoPluginsTest.java:90)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
        at java.base/java.lang.Thread.run(Thread.java:830)

JavaTest Message: Test threw exception: java.lang.RuntimeException
JavaTest Message: shutting down test
-------------------------------------

* Fix
-------------------------------------
diff -r 0c671290204c test/jdk/tools/jlink/plugins/VendorInfoPluginsTest.java
--- a/test/jdk/tools/jlink/plugins/VendorInfoPluginsTest.java   Thu Oct 31 04:17:41 2019 +0100
+++ b/test/jdk/tools/jlink/plugins/VendorInfoPluginsTest.java   Thu Oct 31 13:39:55 2019 +0800
@@ -87,8 +87,8 @@
                                              "--version");
         oa.stderrShouldMatch("^ +java.vendor.url.bug = " + BUG_URL + "$");
         oa.stderrShouldMatch("^ +java.vendor.version = " + VERSION + "$");
-        oa.stdoutShouldMatch("^.*Runtime Environment " + VERSION + " \\(build.*$");
-        oa.stdoutShouldMatch("^.*Server VM " + VERSION + " \\(build.*$");
+        oa.stdoutShouldMatch("^.*Runtime Environment " + VERSION + " \\(.*build.*$");
+        oa.stdoutShouldMatch("^.*Server VM " + VERSION + " \\(.*build.*$");

         // VM error log
         oa = ProcessTools.executeProcess(launcher,
-------------------------------------

Comments
Fix request (13u) Need to port it as well, after JDK-8232080 . Patch applies cleanly, tier1 tests pass.
29-05-2020

Fix request (11u) This is a follow-up regression fix to JDK-8232080. As I'm planning to get this into jdk11u, I'll push this one right after it. Patch applies cleanly.
05-04-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/02ae223a11dc User: mchung Date: 2019-11-04 18:03:54 +0000
04-11-2019

RFR: https://mail.openjdk.java.net/pipermail/core-libs-dev/2019-October/063217.html
31-10-2019