xfs
[Top] [All Lists]

Re: [PATCH v2] xfstests generic/260: get correct trimmed bytes

To: Eryu Guan <eguan@xxxxxxxxxx>
Subject: Re: [PATCH v2] xfstests generic/260: get correct trimmed bytes
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 8 Oct 2013 11:45:28 +1100
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1380868376-16783-1-git-send-email-eguan@xxxxxxxxxx>
References: <20131004010737.GE4446@dastard> <1380868376-16783-1-git-send-email-eguan@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
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@xxxxxxxxxx>
> ---
> v2: add _filter_fstrim to filter the output as Dave suggested

Looks good!

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>