提交 da9acc97 编写于 作者: M mindless

remove workaround to rerun testSymlink with shorter link for S10,

and instead add (char) cast so original test uses right length for name.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@29990 71c3de6d-444a-0410-be80-ed276b4c234a
上级 42b7360b
......@@ -158,20 +158,12 @@ public class UtilTest extends TestCase {
// test a long name
StringBuilder buf = new StringBuilder(768);
for( int i=0; i<768; i++)
buf.append('0'+(i%10));
buf.append((char)('0'+(i%10)));
Util.createSymlink(d,buf.toString(),"x", l);
String log = baos.toString();
if (log.length() > 0) {
if (log.length() > 0)
System.err.println("log output: " + log);
if (log.contains("ln failed: 78" /*ENAMETOOLONG*/)) {
buf.setLength(0);
// Try again with shorter name for this system
for( int i=0; i<254; i++)
buf.append('0'+(i%10));
Util.createSymlink(d,buf.toString(),"x", l);
}
}
assertEquals(buf.toString(),Util.resolveSymlink(new File(d,"x"),l));
} finally {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册