summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-09-07 20:49:34 +0200
committerJim Meyering <meyering@redhat.com>2008-09-07 20:49:34 +0200
commit737461d23fd8e48b597d74d2e30cbb9d1b5a2946 (patch)
tree35bb2a77774335e05160e503890b924342bb1cbc /tests
parent6b22726dd4e51fa7888e384c7d1ee171648c7183 (diff)
downloadcoreutils-737461d23fd8e48b597d74d2e30cbb9d1b5a2946.tar.xz
tests: don't let rounding-to-1KB blocks provoke a failure
* tests/df/total-awk: Use df's --block-size=512 option.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/df/total-awk6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/df/total-awk b/tests/df/total-awk
index 632e945a7..d569f26df 100755
--- a/tests/df/total-awk
+++ b/tests/df/total-awk
@@ -65,12 +65,14 @@ echo '
}
' > parse_total.awk || fail=1
-df --total > tmp || fail=1
+# Use --block-size=512 to keep df from printing rounded-to-kilobyte
+# numbers which wouldn't necessarily add up to the displayed total.
+df --block-size=512 --total |tee tmp || fail=1
$AWK -f compute_sum.awk tmp > out1 || fail=1
$AWK -f parse_total.awk tmp > out2 || fail=1
compare out1 out2 || fail=1
-df -i --total > tmp || fail=1
+df -i --block-size=512 --total |tee tmp || fail=1
$AWK -f compute_sum.awk tmp > out1 || fail=1
$AWK -f parse_total.awk tmp > out2 || fail=1
compare out1 out2 || fail=1