|
From: | GNU bug Tracking System |
Subject: | [debbugs-tracker] bug#13099: closed (possible test bug in "tests/df/total-verify.sh") |
Date: | Thu, 06 Dec 2012 10:13:02 +0000 |
Your message dated Thu, 06 Dec 2012 09:55:02 +0000 with message-id <address@hidden> and subject line Re: bug#13099: possible test bug in "tests/df/total-verify.sh" has caused the debbugs.gnu.org bug report #13099, regarding possible test bug in "tests/df/total-verify.sh" to be marked as done. (If you believe you have received this mail in error, please contact address@hidden) -- 13099: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13099 GNU Bug Tracking System Contact address@hidden with problems
--- Begin Message ---Subject: possible test bug in "tests/df/total-verify.sh" Date: Wed, 05 Dec 2012 22:33:46 -0500 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.7) Gecko/20120922 Icedove/10.0.7 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
--- End Message ---
--- Begin Message ---Subject: Re: bug#13099: possible test bug in "tests/df/total-verify.sh" Date: Thu, 06 Dec 2012 09:55:02 +0000 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 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, BernyFrom d597168b25d58dbd29cf04222608eef262a7d08a Mon Sep 17 00:00:00 2001From: Bernhard Voelker <address@hidden> 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.
--- End Message ---
[Prev in Thread] | Current Thread | [Next in Thread] |