xfs
[Top] [All Lists]

Re: xfstests test case 032 fails for wrong reason

To: sekharan@xxxxxxxxxx
Subject: Re: xfstests test case 032 fails for wrong reason
From: Eric Sandeen <sandeen@xxxxxxxxxx>
Date: Thu, 16 Jun 2011 11:32:28 -0500
Cc: XFS Mailing List <xfs@xxxxxxxxxxx>
In-reply-to: <1308241896.5505.0.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <1308185652.7661.492.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4DF955CE.6090108@xxxxxxxxxx> <1308241896.5505.0.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10
On 6/16/11 11:31 AM, Chandra Seetharaman wrote:
> On Wed, 2011-06-15 at 20:01 -0500, Eric Sandeen wrote:
>> On 6/15/11 7:54 PM, Chandra Seetharaman wrote:
>>> Hello All,
>>>
>>> xfstests test case 032 creates different filesystems on the scratch
>>> partition and tries mkfs.xfs on the same filesystem expecting it to
>>> fail.
>>>
>>> In my system, for whatever reason, mkfs of btrfs fails which leads to
>>> the test case failure like this:
>>> ----------------
>>> FSTYP         -- xfs (non-debug)
>>> PLATFORM      -- Linux/x86_64 elm3c201 2.6.39-rc4-xfs.git.p2+
>>> MKFS_OPTIONS  -- -f -bsize=4096 /dev/sdd2
>>> MOUNT_OPTIONS -- -o
>>> context=system_u:object_r:nfs_t:s0 /dev/sdd2 /mnt/xfsScratchMntPt
>>>
>>> 032 20s ... - output mismatch (see 032.out.bad)
>>> --- 032.out 2011-06-10 17:25:22.000000000 -0700
>>> +++ 032.out.bad     2011-06-15 17:47:23.000000000 -0700
>>> @@ -1,2 +1,3 @@
>>>  QA output created by 032
>>>  Silence is golden.
>>> +Failed - overwrote fs type btrfs!
>>> Ran: 032
>>> Failures: 032
>>> Failed 1 of 1 tests
>>> ---------------------
>>>
>>> which is incorrect. I am thinking of submitting the following change (to
>>> run mkfs.xfs only if the preceding mkfs.$fs succeeds). Anybody has any
>>> opinions or better suggestions ?
>>
>> Sounds like the right approach.  Would be good to know why mkfs.btrfs
>> failed too, though, just for informational reasons :)
> 
> It is saved in $seq.full. Is that sufficient ?

sure.  Why -did- it fail, out of curiosity?

-Eric

>>
>> -Eric
>>
>>> ---------------
>>> diff --git a/032 b/032
>>> index 839b913..4261ca2 100755
>>> --- a/032
>>> +++ b/032
>>> @@ -75,11 +75,15 @@ do
>>>         echo "    ( $preop mkfs -t $fs $preargs $SCRATCH_DEV $postargs )" 
>>> >>$seq.full
>>>         eval $preop mkfs -t $fs $preargs $SCRATCH_DEV $postargs >>$seq.full 
>>> 2>&1
>>>  
>>> -       # next, ensure we don't overwrite it
>>> -       echo "=== Attempting XFS overwrite of $fs..." >>$seq.full
>>> -       /sbin/mkfs.xfs $SCRATCH_DEV >>$seq.full 2>&1
>>> +       if [ $? -eq 0 ] ; then
>>> +               # next, ensure we don't overwrite it
>>> +               echo "=== Attempting XFS overwrite of $fs..." >>$seq.full
>>> +               /sbin/mkfs.xfs $SCRATCH_DEV >>$seq.full 2>&1
>>>  
>>> -       [ $? -eq 0 ] && echo "Failed - overwrote fs type ${fs}!"
>>> +               [ $? -eq 0 ] && echo "Failed - overwrote fs type ${fs}!"
>>> +       else
>>> +               echo "mkfs of type ${fs} failed" >>$seq.full
>>> +       fi
>>> ------------------
>>>
>>> regards,
>>>
>>> chandra
>>>
>>
> 
> 

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