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

tools/jar/LeadingGarbage.java, introduced in JDK-8058520, fails on Windows

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b36
    • Verification:
      Verified

      Backports

        Description

        TESTFAIL:tools/jar/LeadingGarbage.java

        JDK-8058520 introduced new test tools/jar/LeadingGarbage.java, it fails on Windows.
        Please also note that this test uses internal JDK API sun.tools.jar.Main, this introduced dependency on JDK internal API and such dependency should be eliminated.

        --- ProcessLog ---
        cmd: C:\\Users\\aurora\\CommonData\\jdk\\bin\\jar tf normal.zip
        exitvalue: 0
        stderr:
        stdout: a
        b


        test LeadingGarbage.test_canList(): failure
        java.lang.RuntimeException: 'a
        b
        ' missing from stdout

        at jdk.testlibrary.OutputAnalyzer.stdoutShouldMatch(OutputAnalyzer.java:221)
        at LeadingGarbage.assertCanList(LeadingGarbage.java:115)
        at LeadingGarbage.test_canList(LeadingGarbage.java:99)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
        at org.testng.TestRunner.privateRun(TestRunner.java:767)
        at org.testng.TestRunner.run(TestRunner.java:617)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
        at org.testng.SuiteRunner.run(SuiteRunner.java:240)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
        at org.testng.TestNG.run(TestNG.java:1057)
        at com.sun.javatest.regtest.TestNGAction$TestNGRunner.main(TestNGAction.java:161)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:759)
        at java.lang.Thread.run(Thread.java:745)

        ...

        --- ProcessLog ---
        cmd: C:\\Users\\aurora\\CommonData\\jdk\\bin\\jar tf leadingGarbage.zip
        exitvalue: 0
        stderr:
        stdout: a
        b


        test LeadingGarbage.test_canListWithLeadingGarbage(): failure
        java.lang.RuntimeException: 'a
        b
        ' missing from stdout

        at jdk.testlibrary.OutputAnalyzer.stdoutShouldMatch(OutputAnalyzer.java:221)
        at LeadingGarbage.assertCanList(LeadingGarbage.java:115)
        at LeadingGarbage.test_canListWithLeadingGarbage(LeadingGarbage.java:104)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
        at org.testng.TestRunner.privateRun(TestRunner.java:767)
        at org.testng.TestRunner.run(TestRunner.java:617)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
        at org.testng.SuiteRunner.run(SuiteRunner.java:240)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
        at org.testng.TestNG.run(TestNG.java:1057)
        at com.sun.javatest.regtest.TestNGAction$TestNGRunner.main(TestNGAction.java:161)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:759)
        at java.lang.Thread.run(Thread.java:745)

        ===============================================
        tools/jar/LeadingGarbage.java
        Total tests run: 4, Failures: 2, Skips: 0
        ===============================================

        ----------System.err:(24/734)----------
         stdout: [a
        b
        ];
         stderr: []
         exitValue = 0

         stdout: [a
        b
        ];
         stderr: []
         exitValue = 0

        java.lang.Exception: failures: 2
        at com.sun.javatest.regtest.TestNGAction$TestNGRunner.main(TestNGAction.java:164)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:759)
        at java.lang.Thread.run(Thread.java:745)

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

        result: Failed. Execution failed: `main' threw exception: java.lang.Exception: failures: 2


        test result: Error. failed to clean up files after test

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                amlu Amy Lu (Inactive)
                Reporter:
                amlu Amy Lu (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: