harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Wu (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-2157) [classlib][luni]can not make a directory with long path.
Date Mon, 13 Nov 2006 06:57:38 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-2157?page=all ]

Tony Wu updated HARMONY-2157:
-----------------------------

     Patch Info: [Patch Available]
    Description: 
This testcase passed on RI but failed on harmony    

public void testLongPath() throws IOException {
        File dir = new File(".");
        String longDirName = "abcdefghijklmnopqrstuvwx";// 24 chars
        StringBuilder sb = new StringBuilder(dir + File.separator);
        while (dir.getCanonicalPath().length() < 256 - longDirName.length()) {
            sb.append(longDirName + File.separator);
            dir = new File(sb.toString());
            assertTrue("mkdir failed", dir.mkdir() && dir.exists());
            dir.deleteOnExit();
        }
        while (dir.getCanonicalPath().length() < 256) {
            sb.append(0);
            dir = new File(sb.toString());
            assertTrue("mkdir " + dir.getCanonicalPath().length() + " failed",
                    dir.mkdir() && dir.exists());
            dir.deleteOnExit();
        }
 }

  was:
This testcase passed on RI but failed on harmony    

public void testLongPath() throws IOException {
        String longDirName = "abcdefghijklmnopqrstuvwx"; // 24 chars
        StringBuilder sb = new StringBuilder("." + File.separator);
        File file = new File(sb.toString());
        for (int i = 0; i<9; i++) {
            sb.append(longDirName + File.separator);
            file = new File(sb.toString());
            assertTrue(file.mkdir());
            file.deleteOnExit();
        }
    }


> [classlib][luni]can not make a directory with long path.
> --------------------------------------------------------
>
>                 Key: HARMONY-2157
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2157
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Tony Wu
>         Attachments: portlib.diff
>
>
> This testcase passed on RI but failed on harmony    
> public void testLongPath() throws IOException {
>         File dir = new File(".");
>         String longDirName = "abcdefghijklmnopqrstuvwx";// 24 chars
>         StringBuilder sb = new StringBuilder(dir + File.separator);
>         while (dir.getCanonicalPath().length() < 256 - longDirName.length()) {
>             sb.append(longDirName + File.separator);
>             dir = new File(sb.toString());
>             assertTrue("mkdir failed", dir.mkdir() && dir.exists());
>             dir.deleteOnExit();
>         }
>         while (dir.getCanonicalPath().length() < 256) {
>             sb.append(0);
>             dir = new File(sb.toString());
>             assertTrue("mkdir " + dir.getCanonicalPath().length() + " failed",
>                     dir.mkdir() && dir.exists());
>             dir.deleteOnExit();
>         }
>  }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message