summaryrefslogtreecommitdiff
path: root/tests/du/slink
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-10-04 11:24:12 +0000
committerJim Meyering <jim@meyering.net>2002-10-04 11:24:12 +0000
commit314c0eaa97082f391524d284e5f5b0dc3d5d2bbc (patch)
tree20dad79a2a58baf26381f5ed305f2ac2fb9793c9 /tests/du/slink
parent4adcccbf487bdb8a27e26913aa8964c9df1e46cf (diff)
downloadcoreutils-314c0eaa97082f391524d284e5f5b0dc3d5d2bbc.tar.xz
Undo last change.
Instead, run du only on the symlinks that were successfully created.
Diffstat (limited to 'tests/du/slink')
-rwxr-xr-xtests/du/slink5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/du/slink b/tests/du/slink
index 462e8e911..05b1df7f7 100755
--- a/tests/du/slink
+++ b/tests/du/slink
@@ -25,11 +25,10 @@ symlink_name_lengths='1 15 16 31 32 59 60 63 64 127 128 255 256 511 512 1024'
for len in $symlink_name_lengths; do
name=`yes|tr '\n' y|head -c$len`
# Ignore failures.
- ln -fs $name $len > /dev/null 2>&1
+ ln -fs $name $len > /dev/null 2>&1 && symlinks="$symlinks $len"
done
-# Redirect errors (e.g. missing file) to /dev/null.
-du -a $symlink_name_lengths > out 2> /dev/null || fail=1
+du -a $symlinks > out || fail=1
# Require that at least one of these symlinks has a non-zero size.
grep '^[1-9]' out > /dev/null || fail=1