From 99cfd03d8576de6ac760269f66eb37e3c732243f Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 6 Aug 2019 13:21:21 -0700 Subject: find: fix dangling symlink behavior. ENOENT is ignored, but other errors are reported. --- tests/find.test | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/find.test b/tests/find.test index ab84fb07..cbca8e76 100755 --- a/tests/find.test +++ b/tests/find.test @@ -104,6 +104,10 @@ testing "-printf" "find dir -name file -printf '%f %p %P %s'" \ "file dir/file file 0" "" "" testing "-printf .N" "find dir -name file -printf %.2f" "fi" "" "" +ln -s does-not-exist dir/dangler +ln -s looper dir/looper +testing "-L dangling link" "LANG=C find -L dir -name file 2>&1 | sed s/\'//g" \ + "dir/file\nfind: dir/looper: Too many levels of symbolic links\n" "" "" testing "-false" "find dir -false" "" "" "" testing "-true" "find dir/file -true" "dir/file\n" "" "" -- cgit v1.2.3