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

Hahnfeld, Jonas via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 2 23:15:07 PST 2017


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 <http://llvm.org/viewvc/llvm-project?rev=295768&view=rev> &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/034864ba/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170303/034864ba/attachment.bin>


More information about the llvm-commits mailing list