xfs
[Top] [All Lists]

Re: [PATCH] xfstests/071 FAIL with pwrite64: Invalid argument

To: Peng Haitao <penght@xxxxxxxxxxxxxx>
Subject: Re: [PATCH] xfstests/071 FAIL with pwrite64: Invalid argument
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 7 Dec 2011 21:07:48 +1100
Cc: hch@xxxxxxxxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <4EDF2133.7030702@xxxxxxxxxxxxxx>
References: <4EDD8F16.4050402@xxxxxxxxxxxxxx> <20111206110533.GD28326@dastard> <4EDF2133.7030702@xxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Dec 07, 2011 at 04:17:55PM +0800, Peng Haitao wrote:
> Hi, 
> 
> Dave Chinner said the following on 2011-12-6 19:05:
> >> When offset + length is overflow of xfs_io builtin pread and pwrite in 
> >> linux,
> >> the error message should be "Invalid argument".
> > 
> > Fixing this just requires an additional filter. The write outpu is
> > already passed through 2 filters to remove ariable numbers from the
> > output, so one more to standardise the error isn't a problem.
> > 
> > Further, filtering of the error stream on the reads to only appear
> > in $seq.full solves the extra error output on reads as well.
> > 
> 
> Thanks for your comments.
> 
> When offset + length is overflow, the case expect:
>   - pwrite output error messages: pwrite64: File too large
>   - pread output right message:   read 0/512 bytes at offset <OFFSET>
> 
> but in linux, the actual results:
>   - pwrite output error messages: pwrite64: Invalid argument
>   - pread output right message:   pread64: Invalid argument
> 
> I can add an additional filter to remove variable messages, 
> but if I remove variable messages, the 071.out will remain echo content:
> Writing 512 bytes, offset is +0 (direct=false)
> Reading 512 bytes (direct=false)
> ...

I think you misunderstand what I was saying - I was not suggesting
removing the error messages at all, just filtering them with sed to
ensure the output is always constant for the error different
messages different platforms dump out.

Have a look at the patch I sent earlier today for test 103 ([PATCH
2/2] xfstests: ln failure output has changed again) as an example of
error message filtering for multi-platform (Irix and Linux are
different) and multiple-version (coreutils v < 6 output is different
to 6 <= v < 8 and the current 8.x is different again) support with a
single golden image.

That is, the output in the golden image does not change, instead we
use a filter to convert the known different error messages to match
the error in the golden image. If the error message is different to
what the filter catches or does not appear, then the test still
fails as desired. Essentially the output filter encodes all the
variants of the valid error messages for the given test....

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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