File tree 1 file changed +11
-2
lines changed
test/hotspot/jtreg/runtime/LoadClass
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 34
34
*/
35
35
36
36
import java .io .File ;
37
+ import java .nio .file .Files ;
38
+ import java .nio .file .FileStore ;
37
39
import java .nio .file .Path ;
38
40
import java .nio .file .Paths ;
39
41
import java .util .Arrays ;
@@ -103,8 +105,15 @@ public static void main(String args[]) throws Exception {
103
105
// We currently cannot handle relative path specified in the
104
106
// -Xbootclasspath/a on windows.
105
107
//
106
- // relative path length within the 256 limit
107
- char [] chars = new char [255 ];
108
+ // relative path length within the file system limit
109
+ int fn_max_length = 255 ;
110
+ // In AUFS file system, the maximal file name length is 242
111
+ FileStore store = Files .getFileStore (new File ("." ).toPath ());
112
+ String fs_type = store .type ();
113
+ if ("aufs" .equals (fs_type )) {
114
+ fn_max_length = 242 ;
115
+ }
116
+ char [] chars = new char [fn_max_length ];
108
117
Arrays .fill (chars , 'y' );
109
118
String subPath = new String (chars );
110
119
destDir = Paths .get ("." , subPath );
You can’t perform that action at this time.
0 commit comments