From bb391a9ce6f485d77445487fbbe57fdd690b8ca8 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 22 Nov 2019 12:37:19 -0800 Subject: du.test: skip on Mac. None of the current tests are relevant on the Mac because small symlinks are inlined into inodes, as are empty directories, so everything's using zero blocks. --- tests/du.test | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/du.test b/tests/du.test index ae610256..d7e58b43 100755 --- a/tests/du.test +++ b/tests/du.test @@ -11,6 +11,14 @@ if [ "$(stat --format %C . 2>/dev/null)" != "?" ]; then exit fi +# darwin stores empty directories in the inode itself, making all the numbers +# in the tests below 0. (TODO this is not the right fix.) +if [ "$(uname)" == "Darwin" ]; then + echo "$SHOWSKIP: du (Darwin stores empty directories in inode)" + return 2>/dev/null + exit +fi + #testing "name" "command" "result" "infile" "stdin" # we only test with -k since getting POSIX version is variable @@ -37,4 +45,3 @@ testing "-LH does not follow unspecified symlinks" "du -ksLH du_test" "8\tdu_tes testing "-H follows specified symlinks" "du -ksH du_test/xyz" "8\tdu_test/xyz\n" "" "" rm -rf du_test du_2 - -- cgit v1.2.3