jdk/test/java/io/File/MaxPathLength.java
author kvn
Thu, 05 Dec 2013 15:13:12 -0800
changeset 22858 f4a6f0eba875
parent 21611 34085733bead
child 32649 2ee9017c7597
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
19578
2d9b4346f4a4 8023430: Replace File.mkdirs with Files.createDirectories to get MaxPathLength.java failure details
dxu
parents: 14342
diff changeset
     2
 * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
/* @test
19792
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
    25
   @bug 4759207 4403166 4165006 4403166 6182812 6274272 7160013
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
   @summary Test to see if win32 path length can be greater than 260
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.io.*;
19578
2d9b4346f4a4 8023430: Replace File.mkdirs with Files.createDirectories to get MaxPathLength.java failure details
dxu
parents: 14342
diff changeset
    30
import java.nio.file.Files;
21611
34085733bead 8027612: java/io/File/MaxPathLength.java fails intermittently in the clean-up stage
dxu
parents: 19792
diff changeset
    31
import java.nio.file.Path;
34085733bead 8027612: java/io/File/MaxPathLength.java fails intermittently in the clean-up stage
dxu
parents: 19792
diff changeset
    32
import java.nio.file.DirectoryNotEmptyException;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
public class MaxPathLength {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
    private static String sep = File.separator;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
    private static String pathComponent = sep +
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
    private static String fileName =
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
                 "areallylongfilenamethatsforsur";
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
    private static boolean isWindows = false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
19792
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
    42
    private final static int MAX_LENGTH = 256;
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
    43
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
    44
    private static int counter = 0;
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
    45
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
    public static void main(String[] args) throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
        String osName = System.getProperty("os.name");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
        if (osName.startsWith("Windows")) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
            isWindows = true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
        for (int i = 4; i < 7; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
            String name = fileName;
19792
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
    54
            while (name.length() < MAX_LENGTH) {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
                testLongPath (i, name, false);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
                testLongPath (i, name, true);
19792
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
    57
                name = getNextName(name);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
13595
aa1d59f91187 6962637: TEST_BUG: java/io/File/MaxPathLength.java may fail in busy system
alanb
parents: 5506
diff changeset
    61
        // test long paths on windows
19792
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
    62
        // And these long pathes cannot be handled on Solaris and Mac platforms
13595
aa1d59f91187 6962637: TEST_BUG: java/io/File/MaxPathLength.java may fail in busy system
alanb
parents: 5506
diff changeset
    63
        if (isWindows) {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
            String name = fileName;
19792
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
    65
            while (name.length() < MAX_LENGTH) {
13595
aa1d59f91187 6962637: TEST_BUG: java/io/File/MaxPathLength.java may fail in busy system
alanb
parents: 5506
diff changeset
    66
                testLongPath (20, name, false);
aa1d59f91187 6962637: TEST_BUG: java/io/File/MaxPathLength.java may fail in busy system
alanb
parents: 5506
diff changeset
    67
                testLongPath (20, name, true);
19792
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
    68
                name = getNextName(name);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
19792
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
    73
    private static String getNextName(String fName) {
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
    74
        return (fName.length() < MAX_LENGTH/2) ? fName + fName
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
    75
                                               : fName + "A";
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
    76
    }
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
    77
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
    static void testLongPath(int max, String fn,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
                             boolean tryAbsolute) throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
        String[] created = new String[max];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
        String pathString = ".";
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
        for (int i = 0; i < max -1; i++) {
19792
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
    83
            pathString = pathString + pathComponent + (counter++);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
            created[max - 1 -i] = pathString;
19792
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
    85
        }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
        File dirFile = new File(pathString);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
        File f = new File(pathString + sep + fn);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
        String tPath = f.getPath();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
        if (tryAbsolute) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
            tPath = f.getCanonicalPath();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
        created[0] = tPath;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
        //for getCanonicalPath testing on win32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
        File fu = new File(pathString + sep + fn.toUpperCase());
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
        if (dirFile.exists()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
            System.err.println("Warning: Test directory structure exists already!");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
            return;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
        }
19578
2d9b4346f4a4 8023430: Replace File.mkdirs with Files.createDirectories to get MaxPathLength.java failure details
dxu
parents: 14342
diff changeset
   103
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
        try {
19792
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   105
            Files.createDirectories(dirFile.toPath());
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   106
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
            if (tryAbsolute)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
                dirFile = new File(dirFile.getCanonicalPath());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
            if (!dirFile.isDirectory())
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
                throw new RuntimeException ("File.isDirectory() failed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
            f = new File(tPath);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
            if (!f.createNewFile()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
                throw new RuntimeException ("File.createNewFile() failed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
            }
19792
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   115
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
            if (!f.exists())
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
                throw new RuntimeException ("File.exists() failed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
            if (!f.isFile())
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
                throw new RuntimeException ("File.isFile() failed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
            if (!f.canRead())
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
                throw new RuntimeException ("File.canRead() failed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
            if (!f.canWrite())
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
                throw new RuntimeException ("File.canWrite() failed");
19792
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   124
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
            if (!f.delete())
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
                throw new RuntimeException ("File.delete() failed");
19792
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   127
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
            FileOutputStream fos = new FileOutputStream(f);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
            fos.write(1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
            fos.close();
19792
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   131
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
            if (f.length() != 1)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
                throw new RuntimeException ("File.length() failed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
            long time = System.currentTimeMillis();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
            if (!f.setLastModified(time))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
                throw new RuntimeException ("File.setLastModified() failed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
            if (f.lastModified() == 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
                throw new RuntimeException ("File.lastModified() failed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
            String[] list = dirFile.list();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
            if (list == null || !fn.equals(list[0])) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
                throw new RuntimeException ("File.list() failed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
            File[] flist = dirFile.listFiles();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
            if (flist == null || !fn.equals(flist[0].getName()))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
                throw new RuntimeException ("File.listFiles() failed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
            if (isWindows &&
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
                !fu.getCanonicalPath().equals(f.getCanonicalPath()))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
                throw new RuntimeException ("getCanonicalPath() failed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
            char[] cc = tPath.toCharArray();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
            cc[cc.length-1] = 'B';
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
            File nf = new File(new String(cc));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
            if (!f.renameTo(nf)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
                /*there is a known issue that renameTo fails if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
                  (1)the path is a UNC path and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
                  (2)the path length is bigger than 1092
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
                  so don't stop if above are true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
                */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
                String abPath = f.getAbsolutePath();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
                if (!abPath.startsWith("\\\\") ||
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
                    abPath.length() < 1093) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
                    throw new RuntimeException ("File.renameTo() failed for lenth="
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
                                                + abPath.length());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
                }
19792
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   168
            } else {
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   169
                if (!nf.canRead())
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   170
                    throw new RuntimeException ("Renamed file is not readable");
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   171
                if (!nf.canWrite())
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   172
                    throw new RuntimeException ("Renamed file is not writable");
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   173
                if (nf.length() != 1)
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   174
                    throw new RuntimeException ("Renamed file's size is not correct");
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   175
                if (!nf.renameTo(f)) {
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   176
                    created[0] = nf.getPath();
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   177
                }
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   178
                /* add a script to test these two if we got a regression later
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   179
                if (!f.setReadOnly())
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   180
                    throw new RuntimeException ("File.setReadOnly() failed");
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   181
                f.deleteOnExit();
74f9d8ff22d0 8023765: Improve MaxPathLength.java testcase and reduce its test load
dxu
parents: 19578
diff changeset
   182
                */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
        } finally {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
            // Clean up
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
            for (int i = 0; i < max; i++) {
21611
34085733bead 8027612: java/io/File/MaxPathLength.java fails intermittently in the clean-up stage
dxu
parents: 19792
diff changeset
   187
                Path p = (new File(created[i])).toPath();
34085733bead 8027612: java/io/File/MaxPathLength.java fails intermittently in the clean-up stage
dxu
parents: 19792
diff changeset
   188
                try {
34085733bead 8027612: java/io/File/MaxPathLength.java fails intermittently in the clean-up stage
dxu
parents: 19792
diff changeset
   189
                    Files.deleteIfExists(p);
34085733bead 8027612: java/io/File/MaxPathLength.java fails intermittently in the clean-up stage
dxu
parents: 19792
diff changeset
   190
                    // Test if the file is really deleted and wait for 1 second at most
34085733bead 8027612: java/io/File/MaxPathLength.java fails intermittently in the clean-up stage
dxu
parents: 19792
diff changeset
   191
                    for (int j = 0; j < 10 && Files.exists(p); j++) {
34085733bead 8027612: java/io/File/MaxPathLength.java fails intermittently in the clean-up stage
dxu
parents: 19792
diff changeset
   192
                        Thread.sleep(100);
34085733bead 8027612: java/io/File/MaxPathLength.java fails intermittently in the clean-up stage
dxu
parents: 19792
diff changeset
   193
                    }
34085733bead 8027612: java/io/File/MaxPathLength.java fails intermittently in the clean-up stage
dxu
parents: 19792
diff changeset
   194
                } catch (DirectoryNotEmptyException ex) {
34085733bead 8027612: java/io/File/MaxPathLength.java fails intermittently in the clean-up stage
dxu
parents: 19792
diff changeset
   195
                    // Give up the clean-up, let jtreg handle it.
34085733bead 8027612: java/io/File/MaxPathLength.java fails intermittently in the clean-up stage
dxu
parents: 19792
diff changeset
   196
                    System.err.println("Dir, " + p + ", is not empty");
34085733bead 8027612: java/io/File/MaxPathLength.java fails intermittently in the clean-up stage
dxu
parents: 19792
diff changeset
   197
                    break;
34085733bead 8027612: java/io/File/MaxPathLength.java fails intermittently in the clean-up stage
dxu
parents: 19792
diff changeset
   198
                }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
}