aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-04-08 17:02:55 -0500
committerRob Landley <rob@landley.net>2018-04-08 17:02:55 -0500
commitbd3a4a0308e1a5e0bb60d9b99aaf547d5d767a53 (patch)
tree0a459eb24493b7eb2094dcc6f0e3e90423ed570b
parentb60eaface3b105b077b70cc9cb02ae729663a715 (diff)
downloadtoybox-bd3a4a0308e1a5e0bb60d9b99aaf547d5d767a53.tar.gz
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.
-rwxr-xr-xtests/readlink.test1
1 files changed, 1 insertions, 0 deletions
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/.." \