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

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

XMLWordPrintable

    • b08
    • windows
    • Verified

        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.

              aturbanov Andrey Turbanov
              azeller Arno Zeller
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: