xfs
[Top] [All Lists]

Re: [PATCH] xfstests: fsck scratch device if it got used

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfstests: fsck scratch device if it got used
From: Eric Sandeen <sandeen@xxxxxxxxxx>
Date: Fri, 30 Nov 2012 16:29:47 -0600
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <20121130222750.GC12955@dastard>
References: <50B7B0AB.6040406@xxxxxxxxxx> <20121130160616.GD5667@xxxxxxxxxxxxx> <50B8DA0E.4000605@xxxxxxxxxx> <20121130222750.GC12955@dastard>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/17.0 Thunderbird/17.0
On 11/30/12 4:27 PM, Dave Chinner wrote:
> On Fri, Nov 30, 2012 at 10:08:46AM -0600, Eric Sandeen wrote:
>> On 11/30/12 10:06 AM, Christoph Hellwig wrote:
>>> On Thu, Nov 29, 2012 at 12:59:55PM -0600, Eric Sandeen wrote:
>>>> This will cause the $SCRATCH_DEV to be fscked if it was used in
>>>> the prior test.  Without this I don't think it gets done unless
>>>> specifically requested by the test.
>>>
>>> This one looks good.
>>
>> Hm now that I think of it perhaps I should remove the explicit
>> _check_scratch-es if they happen at the end of the run, just to
>> try to speed things up.
> 
> *nod*

I'll send as another patch; I don't think there are really very
many TBH.

>>>> Also recreate lost+found/ in one test so that e2fsck doesn't
>>>> complain.
>>>
>>> This one I can't make any sense of.  Care to send it separately
>>> with a good explanation?
>>>
>>
>> Ok, sure.
>>
>> Basically, test does an rm -rf of the scrach mnt, but e2fsck
>> thinks that a missing lost+found/ is cause for complaint and a
>> failure exit code, which then stops the tests :(
> 
> Shouldn't e2fsck be fixed? i.e. if you have a corrupted filesystem
> and it's missing lost+found, how are you expected to create it? by
> mounting your corrupted filesystem and modifying it and potentially
> making the corruption worse?

No, e2fsck fixes it, but reports that as an exit error condition
even if nothing else is found.

>> (hum, now that I think about it, maybe a broken scratch device
>> shouldn't stop the test series, but should just log a test
>> failure?  What do you think?)
> 
> Stop it - we should be leaving a corpse that we can dissect to find
> out what went wrong. For a corrupted scratch filesystem, running
> another test will eat the slowly rotting corpse and leave nothing
> useful behind for diagnosing the failure...

True, in most cases you could re-run the test, but maybe not.
Ok, will leave that as-is.

-Eric

> Cheers,
> 
> Dave.
> 

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