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

TEST_BUG: java/rmi/registry/readTest/readTest.sh failing with Cygwin

    Details

    • Subcomponent:
    • Resolved In Build:
      b55
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        This test doesn't appear to obtain the PID correctly when working in Cygwin environments, thus causing all JDK8 jobs in JPRT that include the RMI tests to fail. Here is a sample failure:

        --------------------------------------------------
        TEST: java/rmi/registry/readTest/readTest.sh
        JDK under test: (C:\temp\jprt\P2\203840~1.ALB\TESTPR~1\WINDOW~1.2-P)
        java version "1.8.0-internal"
        Java(TM) SE Runtime Environment (build 1.8.0-internal-201201212038.albatem.jdk-b00)
        Java HotSpot(TM) 64-Bit Server VM (build 23.0-b10, mixed mode)


        ACTION: shell -- Failed. Execution failed: exit code 1
        REASON: User specified action: run shell readTest.sh
        TIME: 12.797 seconds
        messages:
        command: shell readTest.sh []
        reason: User specified action: run shell readTest.sh
        elapsed time (seconds): 12.797
        STDOUT:
        Test output :
        Error: Could not find or load main class readTest
        ==============
        rmiregistry output :
        ==============
        Failed
        STDERR:
        cp: cannot stat `C:/temp/jprt/P2/203840.albatem/source/test/java/rmi/registry/readTest\\*': No such file or directory
        javac: invalid flag: testPkg\*java
        Usage: javac <options> <source files>
        use -help for a list of possible options
        javac: file not found: readTest.java
        Usage: javac <options> <source files>
        use -help for a list of possible options
        /cygdrive/c/temp/jprt/P2/203840.albatem/source/test/java/rmi/registry/readTest/readTest.sh: line 68: kill: (4648) - No such process
        /cygdrive/c/temp/jprt/P2/203840.albatem/source/test/java/rmi/registry/readTest/readTest.sh: line 69: 5448 Killed ${TESTJAVA}${FS}bin${FS}rmiregistry 7491 > ..${FS}${RMIREG_OUT} 2>&1 (wd: /cygdrive/c/temp/jprt/P2/203840.albatem/source/build/windows-amd64/testoutput/jdk_rmi/JTwork/java/rmi/registry/readTest/readTest/rmi_tmp)

        TEST RESULT: Failed. Execution failed: exit code 1
        --------------------------------------------------

          Activity

          Hide
          olagneau Olivier Lagneau (Inactive) added a comment -
          BT2:SUGGESTED FIX

          Replace the FS variable value by "/".
          Convert the path provided to windows application (java), which is a cygwin path, to a windows path before calling the windows application itself.
          Show
          olagneau Olivier Lagneau (Inactive) added a comment - BT2:SUGGESTED FIX Replace the FS variable value by "/". Convert the path provided to windows application (java), which is a cygwin path, to a windows path before calling the windows application itself.
          Hide
          olagneau Olivier Lagneau (Inactive) added a comment -
          BT2:EVALUATION

          The readTest.sh shell script is not correctly configured in the CYGWIN case:
          FS var is still set to "\" like for MKS while it should be "/"unix-like (CYGWIN uses posix like path naming like "cygdrive/c/mydir/..."

          In addition, since the java executable is a "windows exwcutable", it should be provided a windows-like path
          in the command line, not a cygwin path.
          Show
          olagneau Olivier Lagneau (Inactive) added a comment - BT2:EVALUATION The readTest.sh shell script is not correctly configured in the CYGWIN case: FS var is still set to "\" like for MKS while it should be "/"unix-like (CYGWIN uses posix like path naming like "cygdrive/c/mydir/..." In addition, since the java executable is a "windows exwcutable", it should be provided a windows-like path in the command line, not a cygwin path.
          Hide
          ewang Eric Wang (Inactive) added a comment -
          BT2:EVALUATION

          Root cause of this bug is:
          1. CYGWIN doesn't handle "\\" correctly, if say FS="\\"; echo $FS, in cgywin, will print \\\\ which cause file not found.
          2. Java doesn't recognize CYGWIN style path like "/cygwin/d/...", should use cygpath to convert to Windows native path.

          http://hg.openjdk.java.net/jdk8/tl/jdk/rev/e50a39d011b5
          Show
          ewang Eric Wang (Inactive) added a comment - BT2:EVALUATION Root cause of this bug is: 1. CYGWIN doesn't handle "\\" correctly, if say FS="\\"; echo $FS, in cgywin, will print \\\\ which cause file not found. 2. Java doesn't recognize CYGWIN style path like "/cygwin/d/...", should use cygpath to convert to Windows native path. http://hg.openjdk.java.net/jdk8/tl/jdk/rev/e50a39d011b5
          Hide
          jibiche Jibing Chen (Inactive) added a comment -
          the issue was fixed
          Show
          jibiche Jibing Chen (Inactive) added a comment - the issue was fixed

            People

            • Assignee:
              ewang Eric Wang (Inactive)
              Reporter:
              alanb Alan Bateman
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: