GNU bug report logs -
#13099
possible test bug in "tests/df/total-verify.sh"
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13099 in the body.
You can then email your comments to 13099 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#13099
; Package
coreutils
.
(Thu, 06 Dec 2012 03:26:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Assaf Gordon <assafgordon <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Thu, 06 Dec 2012 03:26:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello,
(properly reporting a bug I mentioned in another email).
The test "df/total-verify.sh" fails on my system, due to a wrong(?) regex to verify the output of "df --total -i -P".
To make a long story short, my "df" produces the following line:
===
$ df --total -i -P
Filesystem Inodes IUsed IFree IUse% Mounted on
< snip >
//bluearctitan3/foobar 0 0 0 - /media/foobar
===
The filesystem is mounted with fuse/sshfs (not sure if that makes a difference).
The test error is:
===
check-df: invalid input line
: //bluearctitan3/foobar 0 0 0 - /media/foobar
===
The 'bug' is that "check-df" script (in 'total-verify.sh') assumes that there are two (2) spaces following the dash, whereas on my system there's only one space.
A possible fix (not sure about the side-effects, though);
====
diff --git a/tests/df/total-verify.sh b/tests/df/total-verify.sh
index 18d215f..c36a7a7 100755
--- a/tests/df/total-verify.sh
+++ b/tests/df/total-verify.sh
@@ -32,7 +32,7 @@ while (<>)
# /dev/sdc1 0 0 0 - /c
# tmpfs 1536000 12965 1523035 1% /tmp
# total 5285932 787409 4498523 15% -
- /^(.*?) +(-?\d+|-) +(-?\d+|-) +(-?\d+|-) +(?:- |[0-9]+%) (.*)$/
+ /^(.*?) +(-?\d+|-) +(-?\d+|-) +(-?\d+|-) +(?:-|[0-9]+%) +(.*)$/
or die "$0: invalid input line\n: $_";
if ($1 eq 'total' && $5 eq '-')
{
====
Regards,
-gordon
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#13099
; Package
coreutils
.
(Thu, 06 Dec 2012 03:31:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 13099 <at> debbugs.gnu.org (full text, mbox):
Correction:
On 12/05/12 22:33, Assaf Gordon wrote:
> ===
> $ df --total -i -P
> Filesystem Inodes IUsed IFree IUse% Mounted on
> < snip >
> //bluearctitan3/foobar 0 0 0 - /media/foobar
> ===
>
> The filesystem is mounted with fuse/sshfs (not sure if that makes a difference).
The filesystem is mounted with CIFS, not sshfs.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#13099
; Package
coreutils
.
(Thu, 06 Dec 2012 09:23:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 13099 <at> debbugs.gnu.org (full text, mbox):
On 12/06/2012 04:39 AM, Assaf Gordon wrote:
> Correction:
>
> On 12/05/12 22:33, Assaf Gordon wrote:
>> ===
>> $ df --total -i -P
>> Filesystem Inodes IUsed IFree IUse% Mounted on
>> < snip >
>> //bluearctitan3/foobar 0 0 0 - /media/foobar
>> ===
>>
>> The filesystem is mounted with fuse/sshfs (not sure if that makes a difference).
>
> The filesystem is mounted with CIFS, not sshfs.
Thanks for reporting.
Actually the culprit is not CIFS but the underlying (remote) file system,
i.e. CIFS exposes the inode statistics of e.g. an ext4 file system
properly, while it can not do the same for vfat.
The bug was introduced with my implementation of "df --output" where
the "total" line now also has a "-" in the target ("Mounted on") field.
Well, it seems that none of us had a vfat file system mounted while
running the tests yet.
I wrapped your fix in the following patch.
As there's no official coreutils release yet with that bug, I didn't
add a NEWS entry.
Have a nice day,
Berny
From d597168b25d58dbd29cf04222608eef262a7d08a Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail <at> bernhard-voelker.de>
Date: Thu, 6 Dec 2012 10:11:42 +0100
Subject: [PATCH] tests: fix regex to match "-" in ipcent field in
df/total-verify.sh
The regular expression failed to match for file systems that
do not provide inode statistics, e.g. VFAT or CIFS (depending
on the underlying peer file system).
* tests/df/total-verify.sh: Fix the regular expression to match
a dash in the ipcent field again.
Reported by Assaf Gordon in http://bugs.gnu.org/13099.
Bug introduced in commit v8.20-18-gdae8d22.
---
tests/df/total-verify.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tests/df/total-verify.sh b/tests/df/total-verify.sh
index 18d215f..5f375bb 100755
--- a/tests/df/total-verify.sh
+++ b/tests/df/total-verify.sh
@@ -32,7 +32,7 @@ while (<>)
# /dev/sdc1 0 0 0 - /c
# tmpfs 1536000 12965 1523035 1% /tmp
# total 5285932 787409 4498523 15% -
- /^(.*?) +(-?\d+|-) +(-?\d+|-) +(-?\d+|-) +(?:- |[0-9]+%) (.*)$/
+ /^(.*?) +(-?\d+|-) +(-?\d+|-) +(-?\d+|-) +(?:-|[0-9]+%) (.*)$/
or die "$0: invalid input line\n: $_";
if ($1 eq 'total' && $5 eq '-')
{
--
1.7.7
Reply sent
to
Pádraig Brady <P <at> draigBrady.com>
:
You have taken responsibility.
(Thu, 06 Dec 2012 10:13:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Assaf Gordon <assafgordon <at> gmail.com>
:
bug acknowledged by developer.
(Thu, 06 Dec 2012 10:13:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 13099-done <at> debbugs.gnu.org (full text, mbox):
On 12/06/2012 09:22 AM, Bernhard Voelker wrote:
> On 12/06/2012 04:39 AM, Assaf Gordon wrote:
>> Correction:
>>
>> On 12/05/12 22:33, Assaf Gordon wrote:
>>> ===
>>> $ df --total -i -P
>>> Filesystem Inodes IUsed IFree IUse% Mounted on
>>> < snip >
>>> //bluearctitan3/foobar 0 0 0 - /media/foobar
>>> ===
>>>
>>> The filesystem is mounted with fuse/sshfs (not sure if that makes a difference).
>>
>> The filesystem is mounted with CIFS, not sshfs.
>
> Thanks for reporting.
>
> Actually the culprit is not CIFS but the underlying (remote) file system,
> i.e. CIFS exposes the inode statistics of e.g. an ext4 file system
> properly, while it can not do the same for vfat.
>
> The bug was introduced with my implementation of "df --output" where
> the "total" line now also has a "-" in the target ("Mounted on") field.
> Well, it seems that none of us had a vfat file system mounted while
> running the tests yet.
>
> I wrapped your fix in the following patch.
>
> As there's no official coreutils release yet with that bug, I didn't
> add a NEWS entry.
>
> Have a nice day,
> Berny
>
>>From d597168b25d58dbd29cf04222608eef262a7d08a Mon Sep 17 00:00:00 2001
> From: Bernhard Voelker <mail <at> bernhard-voelker.de>
> Date: Thu, 6 Dec 2012 10:11:42 +0100
> Subject: [PATCH] tests: fix regex to match "-" in ipcent field in
> df/total-verify.sh
>
> The regular expression failed to match for file systems that
> do not provide inode statistics, e.g. VFAT or CIFS (depending
> on the underlying peer file system).
>
> * tests/df/total-verify.sh: Fix the regular expression to match
> a dash in the ipcent field again.
>
> Reported by Assaf Gordon in http://bugs.gnu.org/13099.
> Bug introduced in commit v8.20-18-gdae8d22.
> ---
> tests/df/total-verify.sh | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tests/df/total-verify.sh b/tests/df/total-verify.sh
> index 18d215f..5f375bb 100755
> --- a/tests/df/total-verify.sh
> +++ b/tests/df/total-verify.sh
> @@ -32,7 +32,7 @@ while (<>)
> # /dev/sdc1 0 0 0 - /c
> # tmpfs 1536000 12965 1523035 1% /tmp
> # total 5285932 787409 4498523 15% -
> - /^(.*?) +(-?\d+|-) +(-?\d+|-) +(-?\d+|-) +(?:- |[0-9]+%) (.*)$/
> + /^(.*?) +(-?\d+|-) +(-?\d+|-) +(-?\d+|-) +(?:-|[0-9]+%) (.*)$/
> or die "$0: invalid input line\n: $_";
> if ($1 eq 'total' && $5 eq '-')
> {
>
That still passes here with a "standard" file system at least.
Please push.
I'm marking this issue as "done" now.
thanks,
Pádraig.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#13099
; Package
coreutils
.
(Thu, 06 Dec 2012 10:25:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 13099 <at> debbugs.gnu.org (full text, mbox):
On 12/06/2012 10:55 AM, Pádraig Brady wrote:
> That still passes here with a "standard" file system at least.
> Please push.
I could reproduce the failure with a loop-mounted vfat image.
Thanks for the review, pushed:
http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=43a6ccf0
Have a nice day,
Berny
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 03 Jan 2013 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 109 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.