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

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 3 07:27:37 PST 2017


#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/ba3beae3/attachment.html>


More information about the llvm-commits mailing list