[llvm] r295768 - [Support] Add a function to check if a file resides locally.

Hahnfeld, Jonas via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 3 08:20:12 PST 2017


In the latter case, #1 doesn't work either. We could introduce an option or a variable in the environment to enable this specific test and set it on a few build bots, but that seems a bit overkill...
Am Freitag, den 03.03.2017, 15:27 +0000 schrieb Zachary Turner:
> #2 would introduce enough additional file system code into the test that the code building up to the important part is more likely to fail than the important part.
> 
> I could also imagine someone installing their entire os on an NFS so perhaps there is just nothing we can do
> 
> On Thu, Mar 2, 2017 at 11:15 PM Hahnfeld, Jonas <Hahnfeld at itc.rwth-aachen.de> wrote:
> > Two more ideas after thinking about the problem a bit more:
> > 1)      We could test with a file in $TMP and hope that it is local.
> > 2)      On *nix systems, we could parse all mounted paths and blacklist certain filesystems, namely NFS to begin with.
> > I think both methods may be error prone in some cases. The only other solution is removing the test which I also quite don’t like that much.
> >  
> > From: Zachary Turner [mailto:zturner at google.com] 
> > Sent: Friday, March 03, 2017 7:56 AM
> > To: Hahnfeld, Jonas
> > Cc: Simon Dardis; llvm-commits at lists.llvm.org
> > Subject: Re: [llvm] r295768 - [Support] Add a function to check if a file resides locally. 
> > My only idea in that case is to just delete the test sadly :-/
> > 
> > I can't think of a way to reliably test this if we can't assume we're on a local filesystem
> > On Thu, Mar 2, 2017 at 2:04 AM Hahnfeld, Jonas <Hahnfeld at itc.rwth-aachen.de> wrote:
> > Hi Zachary,
> > 
> > This change essentially breaks tests when anyone is building on NFS as I do.
> > Simon XFAIL'd the test for the mips buildbots in r295840 but that leaves the
> > problem for anyone else.
> > 
> > Do you have a clever solution for that?
> > 
> > Regards,
> > Jonas
> > 
> > > -----Original Message-----
> > > From: llvm-commits [mailto:llvm-commits-bounces at lists.llvm.org] On Behalf
> > > Of Zachary Turner via llvm-commits
> > > Sent: Tuesday, February 21, 2017 9:56 PM
> > > To: llvm-commits at lists.llvm.org
> > > Subject: [llvm] r295768 - [Support] Add a function to check if a file
> > > resides
> > > locally.
> > >
> > > Author: zturner
> > > Date: Tue Feb 21 14:55:47 2017
> > > New Revision: 295768
> > >
> > > URL: http://llvm.org/viewvc/llvm-project?rev=295768&view=rev
> > > Log:
> > > [Support] Add a function to check if a file resides locally.
> > >
> > > Differential Revision: https://reviews.llvm.org/D30010
> > >
> > > Modified:
> > >     llvm/trunk/include/llvm/Support/FileSystem.h
> > >     llvm/trunk/include/llvm/Support/MemoryBuffer.h
> > >     llvm/trunk/lib/Support/MemoryBuffer.cpp
> > >     llvm/trunk/lib/Support/Unix/Path.inc
> > >     llvm/trunk/lib/Support/Windows/Path.inc
> > >     llvm/trunk/unittests/Support/Path.cpp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170303/2456bad6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6055 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170303/2456bad6/attachment.bin>


More information about the llvm-commits mailing list