Subject: 'df/df-output ' test fails due to extra space in header line on large disk
From: Assaf Gordon <[email-masked]>
To: [email-masked]
Date: Fri, 22 May 2015 14:15:46 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

Using the latest coreutils from git, 'tests/df/df-output' fails due to one extra space in the header line, needed to accommodate a large disk.

Log attached, but the problem is likely this:

     # This is a large disk...
     $ ./src/df -hl .
     Filesystem      Size  Used Avail Use% Mounted on
     /dev/sdb1        33T  2.0T   31T   6% /data2

     # The test command results in two spaces before the header
     $ ./src/df -B1K --output=size .
       1K-blocks
     35139364864

possible fix attached.

-assaf

From 027c96eb977241d9c795fee510b51dd7b3013bd1 Mon Sep 17 00:00:00 2001
From: Assaf Gordon <[email-masked]>
Date: Fri, 22 May 2015 14:09:27 -0400
Subject: [PATCH] tests: df-output: accept multiple spaces in header

* tests/df/df-output.sh: allow for multiple spaces in the header line of
'df', resulting from large disks.
---
 tests/df/df-output.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/df/df-output.sh b/tests/df/df-output.sh
index f469d41..d81f0ee 100755
--- a/tests/df/df-output.sh
+++ b/tests/df/df-output.sh
@@ -93,7 +93,7 @@ EOF
 
 df -B1K --output=size '.' >out || fail=1
 sed -e '1 {
-          s/ //
+          s/ *//
           q
         }' out > out2
 compare exp out2 || fail=1
-- 
1.9.1