[PATCH] D44960: Prevent llvm-cov from hanging when a symblink doesn't exist.

Yuke Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 27 18:12:16 PDT 2018


liaoyuke added inline comments.


================
Comment at: unittests/Support/Path.cpp:911
+	    ErrorOccured = true;
+      break;
     }
----------------
liaoyuke wrote:
> vsk wrote:
> > Could you keep the checks for what the visited set should be? I think we'd get the behavior we're interested in by changing the 'break' here to a 'continue'.
> This is the part that gets tricky, we can't call i.increment() again because it will hang. We can do what the original test did to help this test pass, however, this won't help us catch real bugs.
> 
> Another option is that we can make make the recursive_directory_iterator more robust that it is capable of skipping broken symlink files by itself.
> 
> WDYT?
With the new behavior, a broken symlink won't prevent other paths from being collected, which actually makes more sense to me.


Repository:
  rL LLVM

https://reviews.llvm.org/D44960





More information about the llvm-commits mailing list