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

test/java/io/File/GetXSpace.java fails on Windows with mapped network drives.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • OS:
      windows

      Description

      After submit of JDK-6501010 we see the test/java/io/File/GetXSpace.java failing on our Windows test machines. The issue seems to be that the 'df' call produces several lines of output on this machines. The group 1 of the matcher misses the first character in all lines except for the first one.

      In a short test I changed the regex to match $ instead of \n in the end and added the MULTILINE flag.

      Pattern.compile("([^\\s]+)\\s+(\\d+)\\s+\\d+\\s+(\\d+)\\s+\\d+%\\s+([^\\s].*)$", Pattern.MULTILINE);

      This let the test pass in our infrastructure.


      Output of a failing test:
      ----------System.out:(24/869)----------
      --- Testing df
      C:/cygwin64 998257472 664791328 333466144 67% /
      K: 262144000 129993392 132150608 50% /cygdrive/k
      O: 734003200 641218112 92785088 88% /cygdrive/o


      SecurityManager = null
      C:/cygwin64:
        df total= 1022215651328 free = 0 usable = 341469331456
        getX total= 1022215651328 free = 341469323264 usable = 341469323264
      ::
        df total= 268435456000 free = 0 usable = 135322222592
        getX total= 0 free = 0 usable = 0
      FAILED

      The drives K: and O: are mapped network drives.

        Attachments

          Activity

            People

            Assignee:
            bpb Brian Burkhalter
            Reporter:
            azeller Arno Zeller
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: