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

[TESTBUG] sun/tools/native2ascii/NativeErrors.java fails: Process exit code was 0, but error was expected.

    Details

    • Resolved In Build:
      b17

      Backports

        Description

        sun/tools/native2ascii/NativeErrors.java fails in jdk9 PIT on all platforms

        java.lang.Exception: Process exit code was 0, but error was expected.
        at NativeErrors.executeCmd(NativeErrors.java:89)
        at NativeErrors.main(NativeErrors.java:76)
        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:484)
        at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
        at java.lang.Thread.run(Thread.java:744)

        jtr attached.

          Activity

          Hide
          mfang Michael Fang (Inactive) added a comment -
          Staffan, could you please help to evaluate this bug? You updated jdk/test/sun/tools/native2ascii/NativeErrors.java a few weeks before this bug was submitted.

          changeset: 9297:efeab0eae50f
          user: sla
          date: Tue Jan 21 15:17:57 2014 +0100
          summary: 6545422: [TESTBUG] NativeErrors.java uses wrong path name in exec
          Show
          mfang Michael Fang (Inactive) added a comment - Staffan, could you please help to evaluate this bug? You updated jdk/test/sun/tools/native2ascii/NativeErrors.java a few weeks before this bug was submitted. changeset: 9297:efeab0eae50f user: sla date: Tue Jan 21 15:17:57 2014 +0100 summary: 6545422: [TESTBUG] NativeErrors.java uses wrong path name in exec
          Hide
          sla Staffan Larsen (Inactive) added a comment -
          changeset: 9297:efeab0eae50f
          user: sla
          date: Tue Jan 21 15:17:57 2014 +0100
          files: test/sun/tools/native2ascii/NativeErrors.java
          description:
          6545422: [TESTBUG] NativeErrors.java uses wrong path name in exec
          Summary: Uses common testlibrary to find executable. Removed NullPointerExceptions. Log more.
          Reviewed-by: sla
          Contributed-by: mattias.tobiasson@oracle.com
          Show
          sla Staffan Larsen (Inactive) added a comment - changeset: 9297:efeab0eae50f user: sla date: Tue Jan 21 15:17:57 2014 +0100 files: test/sun/tools/native2ascii/NativeErrors.java description: 6545422: [TESTBUG] NativeErrors.java uses wrong path name in exec Summary: Uses common testlibrary to find executable. Removed NullPointerExceptions. Log more. Reviewed-by: sla Contributed-by: mattias.tobiasson@oracle.com
          Hide
          mtobiass Mattias Tobiasson (Inactive) added a comment -
          The test sets a file to read-only (file.setWritable(false)) and then expects native2ascii to fail when writing to that file.
          But native2ascii does not fail.
          I do not know if it is because setwritable(false) does not work or if native2ascii does not work as expected.
          I will add more checks to the test.
          Show
          mtobiass Mattias Tobiasson (Inactive) added a comment - The test sets a file to read-only (file.setWritable(false)) and then expects native2ascii to fail when writing to that file. But native2ascii does not fail. I do not know if it is because setwritable(false) does not work or if native2ascii does not work as expected. I will add more checks to the test.
          Hide
          mtobiass Mattias Tobiasson (Inactive) added a comment -
          By the way, this test have been failing long before the latest change. Previously it failed with NullPointerException, but I believe it was the same cause (make file read-only does not work as expected).
          See JDK-6545422
          Show
          mtobiass Mattias Tobiasson (Inactive) added a comment - By the way, this test have been failing long before the latest change. Previously it failed with NullPointerException, but I believe it was the same cause (make file read-only does not work as expected). See JDK-6545422
          Hide
          mtobiass Mattias Tobiasson (Inactive) added a comment -
          The problem is probably that the test is run as root. As root you can still write to a file even if it is read-only. I will add a check to file.canWrite(). If that returns true we can not test read-only, and we will skip that part of the test.
          Show
          mtobiass Mattias Tobiasson (Inactive) added a comment - The problem is probably that the test is run as root. As root you can still write to a file even if it is read-only. I will add a check to file.canWrite(). If that returns true we can not test read-only, and we will skip that part of the test.
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/c5a2fc3ec942
          User: sla
          Date: 2014-06-04 12:30:27 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/c5a2fc3ec942 User: sla Date: 2014-06-04 12:30:27 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/c5a2fc3ec942
          User: lana
          Date: 2014-06-11 18:26:09 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/c5a2fc3ec942 User: lana Date: 2014-06-11 18:26:09 +0000

            People

            • Assignee:
              mtobiass Mattias Tobiasson (Inactive)
              Reporter:
              dfazunen Dmitry Fazunenko (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: