Subject: bug#20631: closed (Re: bug#20631: 'df/df-output ' test fails due to extra space in header line on large disk)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 22 May 2015 19:48:03 +0000

Your bug report

#20631: 'df/df-output ' test fails due to extra space in header line on large disk

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
20631: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20631
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#20631: 'df/df-output ' test fails due to extra space in header line on large disk
From: Pádraig Brady <[email-masked]>
To: Assaf Gordon <[email-masked]>, [email-masked]
Date: Fri, 22 May 2015 20:47:10 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

On 22/05/15 19:15, Assaf Gordon wrote:
> 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

Pushed.

thanks!
Pádraig

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