GNU bug report logs - #13099
possible test bug in "tests/df/total-verify.sh"

Previous Next

Package: coreutils;

Reported by: Assaf Gordon <assafgordon <at> gmail.com>

Date: Thu, 6 Dec 2012 03:26:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 13099-done <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Bernhard Voelker <mail <at> bernhard-voelker.de>
Cc: Assaf Gordon <assafgordon <at> gmail.com>, 13099-done <at> debbugs.gnu.org
Subject: Re: bug#13099: possible test bug in "tests/df/total-verify.sh"
Date: Thu, 06 Dec 2012 09:55:02 +0000
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.




This bug report was last modified 12 years and 228 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.