From: Jim Meyering Date: Sun, 7 Sep 2008 18:49:34 +0000 (+0200) Subject: tests: don't let rounding-to-1KB blocks provoke a failure X-Git-Tag: v7.0~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=737461d23fd8e48b597d74d2e30cbb9d1b5a2946;p=platform%2Fupstream%2Fcoreutils.git tests: don't let rounding-to-1KB blocks provoke a failure * tests/df/total-awk: Use df's --block-size=512 option. --- diff --git a/tests/df/total-awk b/tests/df/total-awk index 632e945..d569f26 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