xfs
[Top] [All Lists]

Re: [PATCH] xfstests 273: Create lost+found to pass _check_scratch_fs

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfstests 273: Create lost+found to pass _check_scratch_fs
From: Eryu Guan <guaneryu@xxxxxxxxx>
Date: Fri, 13 Jan 2012 01:24:37 +0800
Cc: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=7KQk/cjFlaXJ1r6OsVpsy0bW7pqUBAqdwkCHRdMVuV0=; b=r7GKK6zUdS8fdKpWEffH4+Qv813j9ryLn2HxNjiCYoKbewgOvNQWqiApWFx6iJEMbD c7Dd7Rzl3SP+EgOuOwccGIloh8RyDU0DBdkKHJy8zMwXWqqXu18MQX/phcpfpASbmXlV MzC5jPTi47yAPguMB0GVJcR4GGAHc/OffRXkM=
In-reply-to: <20120110220242.GB24410@dastard>
References: <1326213469-22687-1-git-send-email-guaneryu@xxxxxxxxx> <1326213469-22687-2-git-send-email-guaneryu@xxxxxxxxx> <20120110220242.GB24410@dastard>
Reply-to: guaneryu@xxxxxxxxx
On Wed, Jan 11, 2012 at 6:02 AM, Dave Chinner <david@xxxxxxxxxxxxx> wrote:
> On Wed, Jan 11, 2012 at 12:37:49AM +0800, Eryu Guan wrote:
>> fsck.extN will complain lost+found is missing and fail 273.
>> So create lost+found explicitly after removing everything in
>> $SCRATCH_MNT.
>
> I'd consider that a bug in e2fsck. Other filesystems handle missing
> lost+found directories without failing, but then again it's only
> these new tests that do this so fixing the tests is probably the
> right thing to do here.
>
>> Signed-off-by: Eryu Guan <guaneryu@xxxxxxxxx>
>> ---
>>  273 |    2 ++
>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/273 b/273
>> index 2965132..9ecb2d3 100755
>> --- a/273
>> +++ b/273
>> @@ -36,6 +36,7 @@ _cleanup()
>>  {
>>       cd /
>>       rm -rf $SCRATCH_MNT/* $tmp.*
>> +     mkdir -p $SCRATCH_MNT/lost+found
>>       _scratch_unmount
>>  }
>
> We shouldn't be removing files from the scratch device  in the
> _cleanup function - if the test exits or fails, we need the corpse
> to be intact for debugging. Remving $SCRATCH_MNT/* from the rm
> command is what should be done here.
>
>>
>> @@ -107,6 +108,7 @@ _do_workload()
>>       _pid=1
>>
>>       rm -rf $SCRATCH_MNT/*
>> +     mkdir -p $SCRATCH_MNT/lost+found
>
> And rather than doing this, the test should put all it's files in a
> known location on the $SCRATCH_MNT and just remove that. e.g:
>
> WORK_DIR="$SCRATCH_MNT/$seq"
>
> ....
>
>        rm -rf $WORKDIR
>
> ....
>
> The same fixes are required for 274 and 275 as well.

Thanks for the review, I just sent a new patch to fix 273 274 and 275
[PATCH] xfstests 273 274 275: do test in dedicated dir and leave test
files in it

Please help review.

Thanks,
Eryu Guan
>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@xxxxxxxxxxxxx

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