Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8233291

[TESTBUG] tools/jlink/plugins/VendorInfoPluginsTest.java fails with debug or non-server VMs

    XMLWordPrintable

Details

    • b22

    Backports

      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,
        -------------------------------------

        Attachments

          Issue Links

            Activity

              People

                jiefu Jie Fu
                jiefu Jie Fu
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: