7016704: TEST_BUG: java/nio/file/Files/walk_file_tree.sh fails with new version of find (lnx)

Alan Bateman Alan.Bateman at oracle.com
Mon Feb 14 02:33:48 PST 2011


One of the tests for Files.walkFileTree is failing on some (newer) Linux 
distributions. The test checks the behavior in the presence of cycles by 
comparing the files visited by the method with the files printed by the 
find(1) utility. There are different versions of the find utility, some 
print cycles to stdout, other versions report errors to stderr. The test 
is intended to work with either version but it seems that I didn't 
properly tested it with both versions when we added 
FileSystemLoopException a few months back [1].  The bug is that the 
PrintFileTree class, used by the test to print the file tree, aborts 
with an exception when not involved with -reportCycles. The result is 
that the output doesn't match when running on distributions that have 
the version of find(1) that doesn't print cycles to stdout. The webrev 
with the update to the test is here:
  http://cr.openjdk.java.net/~alanb/7016704/webrev/

Thanks,
Alan.

[1] http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/81b0c1e3d5a7


More information about the nio-dev mailing list