[PATCH v2] xfstests generic/260: get correct trimmed bytes
Dave Chinner
david at fromorbit.com
Mon Oct 7 19:45:28 CDT 2013
On Fri, Oct 04, 2013 at 02:32:56PM +0800, Eryu Guan wrote:
> 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 at redhat.com>
> ---
> v2: add _filter_fstrim to filter the output as Dave suggested
Looks good!
Reviewed-by: Dave Chinner <dchinner at redhat.com>
--
Dave Chinner
david at fromorbit.com
More information about the xfs
mailing list