xfs
[Top] [All Lists]

Re: [PATCH] xfstests: add test 215: c/mtime updates through mapped write

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH] xfstests: add test 215: c/mtime updates through mapped writes
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Tue, 7 Jul 2009 06:17:37 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <4A52C88C.2040600@xxxxxxxxxxx>
References: <20090704182742.GA11083@xxxxxxxxxxxxx> <4A52C88C.2040600@xxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Mon, Jul 06, 2009 at 11:01:16PM -0500, Eric Sandeen wrote:
> Christoph Hellwig wrote:
> > Check that we correctly update the timestamps when writing to a file
> > through an mmap mapping.  Currently fails for XFS due a VFS bug but
> > succeeds for many other filesystems.
> > 
> > 
> > Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> 
> Test seems mostly ok, but aren't you missing 215.out in the patch?

Yeah, looks like it.  It's in my local tree, though :)

> > +sleep 1
> 
> Is there any slight chance a sleep 1 won't catch it?  Would sleep 2 do
> better to be sure?

A one second sleep should always increase the wall time by one second,
shouldn't it?  We can do the sleep 2 to be double safe in case of
rounging issues, though.

> > +   echo "FAIL: mtime not update after mapped write"
> > +   status=1
> > +fi
> > +
> > +if [ "$ctime_diff" -eq "0" ]; then
> > +   echo "FAIL: ctime not update after mapped write"
> > +   status=1
> > +fi
> 
> Should these just be _fail calls?  Otherwise...
> 
> > +# success, all done
> > +echo "*** done"
> > +rm -f $seq.full
> > +status=0
> 
> don't you always exit w/ status 0 and remove the full output?
> 
> I guess i'm not sure when to use _fail and when to let the golden output
> difference kill the test, I suppose it doesn't much matter, it should
> pass & fail correctly either way.

You're right, the status=1 is overrident currently and it only fails
due to the golden output difference.  I'll respin it to just kill the
superflous status assignment.

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