summaryrefslogtreecommitdiff
path: root/tests/du
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-12-17 16:55:39 +0100
committerJim Meyering <meyering@redhat.com>2010-12-18 08:04:46 +0100
commit6d488ca041eedbc833c2f73247c4deea380a0382 (patch)
tree9c89b54c7bcb4dbd45545de35cacd562825f8748 /tests/du
parentc67a96c4c15a738e7b1ab28c652f5f511e121cdb (diff)
downloadcoreutils-6d488ca041eedbc833c2f73247c4deea380a0382.tar.xz
tests: avoid spurious du/bigtime failure
* tests/du/bigtime: Map nonzero block count to 0. Reported by Assaf Gordon. * THANKS: Update.
Diffstat (limited to 'tests/du')
-rwxr-xr-xtests/du/bigtime5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/du/bigtime b/tests/du/bigtime
index 0a7f32b6b..d515947d4 100755
--- a/tests/du/bigtime
+++ b/tests/du/bigtime
@@ -39,6 +39,11 @@ printf "0\t$bignum\tfuture\n" > exp || framework_failure_
printf "du: time $bignum is out of range\n" > err_ok || framework_failure_
du --time future >out 2>err || fail=1
+
+# On some systems an empty file occupies 4 blocks.
+# Map the number of blocks to 0.
+sed 's/^[0-9][0-9]*/0/' out > k && mv k out
+
compare out exp || fail=1
compare err err_ok || fail=1