diff options
-rw-r--r-- | test/hotspot/jtreg/runtime/LoadClass/LongBCP.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/hotspot/jtreg/runtime/LoadClass/LongBCP.java b/test/hotspot/jtreg/runtime/LoadClass/LongBCP.java index 8c0c7808fb7..7731c44544b 100644 --- a/test/hotspot/jtreg/runtime/LoadClass/LongBCP.java +++ b/test/hotspot/jtreg/runtime/LoadClass/LongBCP.java @@ -34,6 +34,8 @@ */ import java.io.File; +import java.nio.file.Files; +import java.nio.file.FileStore; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Arrays; @@ -101,8 +103,15 @@ public class LongBCP { // relative path tests // - // relative path length within the 256 limit - char[] chars = new char[255]; + // relative path length within the file system limit + int fn_max_length = 255; + // In AUFS file system, the maximal file name length is 242 + FileStore store = Files.getFileStore(new File(".").toPath()); + String fs_type = store.type(); + if ("aufs".equals(fs_type)) { + fn_max_length = 242; + } + char[] chars = new char[fn_max_length]; Arrays.fill(chars, 'y'); String subPath = new String(chars); destDir = Paths.get(".", subPath); |