xfstests generic/260: get correct trimmed bytes
authorEryu Guan <eguan@redhat.com>
Fri, 4 Oct 2013 06:32:56 +0000 (06:32 +0000)
committerRich Johnston <rjohnston@sgi.com>
Wed, 16 Oct 2013 20:15:35 +0000 (15:15 -0500)
commit9366fb285e6a2fac935e03c54f6be50f90ab1e64
tree8692ac00fbe98feb4c1670e486197ec5c257d837
parent5956d1dd653decd08dd323a4be8b1c3cc40eb673
xfstests generic/260: get correct trimmed bytes

Starting from util-linux v2.23 fstrim(1) reports trimmed bytes
differently, e.g.

new fstrim: /mnt/ext4: 9.7 GiB (10411118592 bytes) trimmed
old fstrim: /mnt/ext4: 10411118592 bytes were trimmed

generic/260 reports syntax error

    +./tests/generic/260: line 111: [: 9.7: integer expression expected
    +./tests/generic/260: line 121: [: 9.7: integer expression expected
    +./tests/generic/260: line 183: [: 9.7: integer expression expected

Add a new filter called _filter_fstrim in common/filter and get the
correct trimmed bytes in generic/260, so the test passes with both old
and new fstrim.

Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
common/filter
tests/generic/260