[PATCH] xfstests: fix modulo-by-zero error in fsx

Alex Elder aelder at sgi.com
Wed Jul 20 18:04:15 CDT 2011


On Tue, 2011-07-19 at 13:49 +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
> 
> The recent fsx fixes has a logic error in the offset trimming code.
> If a read is done when the file size is zero, then the logic error
> causes a offset % 0 opertaion to occur. This causes fsx to get a
> SIGFPE and die.
> 
> This was not discovered during my testing because I was using a
> random seed that didn't trip this condition. Changing the seed to
> that which test 091 uses (the default of 1) causes such an operation
> to occur....
> 
> Signed-off-by: Dave Chinner <dchinner at redhat.com>

I realize you already committed this, but I'm finally
getting around to reviewing it.

I started composing this message, explaining how you
should have done something differently.  But at this
point it'll be more constructive to just send a patch
against what you have already committed.  So that will
be coming shortly...

					-Alex





More information about the xfs mailing list