Need reviewer for 6926800: TEST_BUG: java/nio/file/Files/walk_file_tree.sh fails with newer versions of find(1)
Alan Bateman
Alan.Bateman at Sun.COM
Sat Feb 20 10:15:05 PST 2010
The test test/java/nio/file/Files/walk_file_tree.sh is failing on some
Linux distributions. The test walks a file tree and checks that it
visits directories and files in the same order as the find(1) utility.
To make things interesting the test creates a file tree with cycles (sym
links to ancestor directories) and checks behavior for the case where
sym links are followed and not followed. When comparing the output with
the output of find(1), the test assumes that when a cycle is encountered
that find will print the sym link and continue (the warning to stderr is
ignored). This assumption turns out to be no longer true on some
distributions where find now just prints a warning. The fix proposed
changes the test so that it works with either behavior - it first walks
the file tree without reporting cycles. If that doesn't match the output
of find then it walks the file tree again with an option to print
cycles. I've put the webrev with the proposed change here:
http://cr.openjdk.java.net/~alanb/6926800/webrev.00/
Thanks,
Alan.
More information about the nio-dev
mailing list