"Kevin Mudrick" <[EMAIL PROTECTED]> wrote:
> The make check "deref-args" test seems to fail on an nfs-mounted
> directory where attribute-caching is turned on, due to the
> block size including some extra information besides the file.
> Using "du -bkD slink-to-64k" instead, to rely on the file size
> rather than number of blocks, seems to work fine though.

Thanks for the report!

I've made this change:

2005-06-21  Jim Meyering  <[EMAIL PROTECTED]>

        * tests/du/deref-args: 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.

Index: tests/du/deref-args
===================================================================
RCS file: /fetish/cu/tests/du/deref-args,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -u -r1.6 -r1.7
--- tests/du/deref-args 30 Jun 2004 22:51:11 -0000      1.6
+++ tests/du/deref-args 21 Jun 2005 08:45:19 -0000      1.7
@@ -34,10 +34,10 @@ du -D slink | sed 's/^[0-9][0-9]*   //' >
 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


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to