From bd3a4a0308e1a5e0bb60d9b99aaf547d5d767a53 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 8 Apr 2018 17:02:55 -0500 Subject: Ubuntu's ln -f dies if you do "ln -s link link; ln -sf / link". Toybox's ln -f does the rm and retry if the first attempt fails for any reason. So if you run the readlink test with an ubuntu host $PATH, it fails, but it works with a toybox host path. --- tests/readlink.test | 1 + 1 file changed, 1 insertion(+) (limited to 'tests') diff --git a/tests/readlink.test b/tests/readlink.test index bb259859..48104e58 100755 --- a/tests/readlink.test +++ b/tests/readlink.test @@ -48,6 +48,7 @@ testing "-f link/missing" "readlink -f dir/boing" \ "$APWD/sub/boing\n" "" "" testing "-f /dev/null/file" \ "readlink -f /dev/null/file 2>/dev/null || echo yes" "yes\n" "" "" +rm link ln -sf / link || exit 1 testing "-f link->/" "readlink -e link/dev" "/dev\n" "" "" testing "-f /dev/null/.." \ -- cgit v1.2.3