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.
This commit is contained in:
Bernhard Voelker committed 2012-12-06 11:15:34 +01:00
1 parent eac397efff
commit 43a6ccf023
1 file changed
+1 -1
+1 -1
View File
@@ -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 '-')
{