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

Rémi Forax forax at univ-mlv.fr
Mon Feb 14 06:03:28 PST 2011


  Le 14/02/2011 11:33, Alan Bateman a écrit :
>
> 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

Alan,
I don't understand

   assert exc != null;

Unlike in postVisitDirectory(), in visitFileFailed() the exception 
should be never null.
I think the assert should be move before the if.

Rémi






More information about the nio-dev mailing list