bug#13099: possible test bug in "tests/df/total-verify.sh"
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/foobar0 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/foobar0 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 # tmpfs1536000 12965 15230351% /tmp # total5285932 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
bug#13099: possible test bug in "tests/df/total-verify.sh"
Correction: On 12/05/12 22:33, Assaf Gordon wrote: === $ df --total -i -P Filesystem Inodes IUsed IFree IUse% Mounted on < snip > //bluearctitan3/foobar0 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.
bug#13099: possible test bug in "tests/df/total-verify.sh"
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/foobar0 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 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 # tmpfs1536000 12965 15230351% /tmp # total5285932 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
bug#13099: possible test bug in "tests/df/total-verify.sh"
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/foobar0 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 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 # tmpfs1536000 12965 15230351% /tmp # total5285932 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.
bug#13099: possible test bug in "tests/df/total-verify.sh"
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