[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13099: possible test bug in "tests/df/total-verify.sh"
From: |
Assaf Gordon |
Subject: |
bug#13099: 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
- bug#13099: possible test bug in "tests/df/total-verify.sh",
Assaf Gordon <=