# HG changeset patch # User Felix Janda # Date 1411392132 18000 # Node ID f64ca21ed44421c4f8e5c382d4059e2c083000d2 # Parent a2796b4cef49f138fe981ff9c790fab685e9c56b Fix du test: du symlink -> "0\tsymlink" diff -r a2796b4cef49 -r f64ca21ed444 tests/du.test --- a/tests/du.test Mon Sep 22 07:52:15 2014 -0500 +++ b/tests/du.test Mon Sep 22 08:22:12 2014 -0500 @@ -13,13 +13,15 @@ testing "du -s" "du -k -s du_test" "8\tdu_test\n" "" "" ln -s ../du_2 du_test/xyz # "du shall count the size of the symbolic link" -# I assume this means the space used to store the link name -testing "du counts symlinks without following" "du -ks du_test" "12\tdu_test\n" "" "" +# The tests assume that like for most POSIX systems symbolic +# links are stored directly in the inode so that the +# allocated file space is zero. +testing "du counts symlinks without following" "du -ks du_test" "8\tdu_test\n" "" "" testing "du -L follows symlinks" "du -ksL du_test" "16\tdu_test\n" "" "" # if -H and -L are specified, the last takes priority testing "du -HL follows symlinks" "du -ksHL du_test" "16\tdu_test\n" "" "" -testing "du -H does not follow unspecified symlinks" "du -ksH du_test" "12\tdu_test\n" "" "" -testing "du -LH does not follow unspecified symlinks" "du -ksLH du_test" "12\tdu_test\n" "" "" +testing "du -H does not follow unspecified symlinks" "du -ksH du_test" "8\tdu_test\n" "" "" +testing "du -LH does not follow unspecified symlinks" "du -ksLH du_test" "8\tdu_test\n" "" "" testing "du -H follows specified symlinks" "du -ksH du_test/xyz" "8\tdu_test/xyz\n" "" "" rm -rf du_test du_2