xfs
[Top] [All Lists]

Re: [PATCH V3] xfstests: use stat not lstat when examining devices

To: aelder@xxxxxxx
Subject: Re: [PATCH V3] xfstests: use stat not lstat when examining devices
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Tue, 08 Jun 2010 11:06:23 -0500
Cc: xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <1275676010.2317.53.camel@doink>
References: <4C091B4E.5030503@xxxxxxxxxxx> <4C0939B9.9000109@xxxxxxxxxxx> <4C093F22.1010006@xxxxxxxxxxx> <1275676010.2317.53.camel@doink>
User-agent: Thunderbird 2.0.0.24 (Macintosh/20100228)
Alex Elder wrote:
> On Fri, 2010-06-04 at 13:00 -0500, Eric Sandeen wrote:
>> If you try running xfstests on lvm volumes which are symlinks,
>> it'll fail to run several tests because our _require_scratch 
>> framework ultimately uses lstat not stat, and does not think 
>> the lvm device (which is usually a symlink to a dm-X device) 
>> is a block device.  Sigh.
>>
>> Just calling stat(1) with -L to follow the link should
>> suffice.
> 
> I wonder whether we'll find stat(1) output ever varies
> enough to affect this.
> 
> But otherwise this looks good to me.
> 
> Reviewed-by: Alex Elder <aelder@xxxxxxx>
> 
>> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxxx>

Sorry, after all that I'm retracting this patch.  mount, /proc/mounts,
/etc/mtab etc just get very confused when using symlinked devices,
at least as xfstests wants to use them.

For now I'll just make my uber-harness resolve symlinks to the real
device (maybe that could be done in xfstests at some point)

-Eric

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