summaryrefslogtreecommitdiff
path: root/tests/du
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-06-21 08:45:19 +0000
committerJim Meyering <jim@meyering.net>2005-06-21 08:45:19 +0000
commitfaae396f212f881c72aef4b604086797c7a5cd69 (patch)
tree441f97a73a24c1aee6bbde3566febf2a6dbc2a0a /tests/du
parent7cb0b72a2c643b4abeeaae011f3e83aa3644ce08 (diff)
downloadcoreutils-faae396f212f881c72aef4b604086797c7a5cd69.tar.xz
Use --apparent-size to avoid the vagaries
of counting blocks. Kevin Mudrick reported that this test would fail on an nfs-mounted directory where attribute-caching is turned on.
Diffstat (limited to 'tests/du')
-rwxr-xr-xtests/du/deref-args8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/du/deref-args b/tests/du/deref-args
index a76ca54ca..05a1448c6 100755
--- a/tests/du/deref-args
+++ b/tests/du/deref-args
@@ -34,10 +34,10 @@ du -D slink | sed 's/^[0-9][0-9]* //' > out
du -D slink/ | sed 's/^[0-9][0-9]* //' >> out
# Ensure that -D makes du dereference even symlinks to non-directories.
-# The sed command maps the 68 I get on an ext3 file system to the 64 I expected.
-# On tmpfs, I get 64. Similarly, on SELinux-enabled systems, file security
-# context labels take up file system space, making du print 72 here.
-du -kD slink-to-64k | sed 's/^[67][0-9]/64/' >> out
+# Be sure to use --apparent-size. Otherwise, we'd get varying block counts
+# depending on file system type (e.g. 68 on ext3 vs. 64 on tmpfs and 72
+# on SELinux-enabled systems).
+du --apparent-size --block-size=1K -D slink-to-64k >> out
cat <<\EOF > exp
slink/a
slink