Honestly i think it may just be better to delete the test.  I knew this test had the chance of breaking when I originally added it but didn't think it would occur.<br><br>There are plenty of examples of untested functions for low level system functions whose results can't be predicted.  Imagine getting the system page size or system temp directory for example.  <br><div class="gmail_quote"><div dir="ltr">On Fri, Mar 3, 2017 at 8:49 AM Simon Dardis <<a href="mailto:Simon.Dardis@imgtec.com">Simon.Dardis@imgtec.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I was considering the option of using an environmental variable as well. In our case, half our<br class="gmail_msg">
buildbots are configured to use remote storage due to the nature of the machines themselves.<br class="gmail_msg">
<br class="gmail_msg">
I think the environment variable route is the only cross platform way to retain the test in a<br class="gmail_msg">
useful fashion.<br class="gmail_msg">
<br class="gmail_msg">
It would also help dealing with tests (in the future) which are by their nature sensitive to the<br class="gmail_msg">
environment they're running it. Given the majority of buildbots (and developers I presume)<br class="gmail_msg">
build and test in a 'regular' environment, we wouldn't lose test coverage for the small minority<br class="gmail_msg">
with more exotic environments.<br class="gmail_msg">
<br class="gmail_msg">
I do agree it's quite the sledgehammer approach.<br class="gmail_msg">
<br class="gmail_msg">
Thanks,<br class="gmail_msg">
Simon<br class="gmail_msg">
<br class="gmail_msg">
From: Hahnfeld, Jonas [mailto:<a href="mailto:Hahnfeld@itc.rwth-aachen.de" class="gmail_msg" target="_blank">Hahnfeld@itc.rwth-aachen.de</a>]<br class="gmail_msg">
Sent: 03 March 2017 16:20<br class="gmail_msg">
To: <a href="mailto:zturner@google.com" class="gmail_msg" target="_blank">zturner@google.com</a><br class="gmail_msg">
Cc: Simon Dardis; <a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a><br class="gmail_msg">
Subject: Re: [llvm] r295768 - [Support] Add a function to check if a file resides locally.<br class="gmail_msg">
<br class="gmail_msg">
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...<br class="gmail_msg">
<br class="gmail_msg">
Am Freitag, den 03.03.2017, 15:27 +0000 schrieb Zachary Turner:<br class="gmail_msg">
#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.<br class="gmail_msg">
<br class="gmail_msg">
I could also imagine someone installing their entire os on an NFS so perhaps there is just nothing we can do<br class="gmail_msg">
On Thu, Mar 2, 2017 at 11:15 PM Hahnfeld, Jonas <<a href="mailto:Hahnfeld@itc.rwth-aachen.de" class="gmail_msg" target="_blank">Hahnfeld@itc.rwth-aachen.de</a>> wrote:<br class="gmail_msg">
Two more ideas after thinking about the problem a bit more:<br class="gmail_msg">
1)      We could test with a file in $TMP and hope that it is local.<br class="gmail_msg">
2)      On *nix systems, we could parse all mounted paths and blacklist certain filesystems, namely NFS to begin with.<br class="gmail_msg">
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.<br class="gmail_msg">
 <br class="gmail_msg">
From: Zachary Turner [mailto:<a href="mailto:zturner@google.com" class="gmail_msg" target="_blank">zturner@google.com</a>]<br class="gmail_msg">
Sent: Friday, March 03, 2017 7:56 AM<br class="gmail_msg">
To: Hahnfeld, Jonas<br class="gmail_msg">
Cc: Simon Dardis; <a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a><br class="gmail_msg">
Subject: Re: [llvm] r295768 - [Support] Add a function to check if a file resides locally.<br class="gmail_msg">
 <br class="gmail_msg">
My only idea in that case is to just delete the test sadly :-/<br class="gmail_msg">
<br class="gmail_msg">
I can't think of a way to reliably test this if we can't assume we're on a local filesystem<br class="gmail_msg">
On Thu, Mar 2, 2017 at 2:04 AM Hahnfeld, Jonas <<a href="mailto:Hahnfeld@itc.rwth-aachen.de" class="gmail_msg" target="_blank">Hahnfeld@itc.rwth-aachen.de</a>> wrote:<br class="gmail_msg">
Hi Zachary,<br class="gmail_msg">
<br class="gmail_msg">
This change essentially breaks tests when anyone is building on NFS as I do.<br class="gmail_msg">
Simon XFAIL'd the test for the mips buildbots in r295840 but that leaves the<br class="gmail_msg">
problem for anyone else.<br class="gmail_msg">
<br class="gmail_msg">
Do you have a clever solution for that?<br class="gmail_msg">
<br class="gmail_msg">
Regards,<br class="gmail_msg">
Jonas<br class="gmail_msg">
<br class="gmail_msg">
> -----Original Message-----<br class="gmail_msg">
> From: llvm-commits [mailto:<a href="mailto:llvm-commits-bounces@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits-bounces@lists.llvm.org</a>] On Behalf<br class="gmail_msg">
> Of Zachary Turner via llvm-commits<br class="gmail_msg">
> Sent: Tuesday, February 21, 2017 9:56 PM<br class="gmail_msg">
> To: <a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a><br class="gmail_msg">
> Subject: [llvm] r295768 - [Support] Add a function to check if a file<br class="gmail_msg">
> resides<br class="gmail_msg">
> locally.<br class="gmail_msg">
><br class="gmail_msg">
> Author: zturner<br class="gmail_msg">
> Date: Tue Feb 21 14:55:47 2017<br class="gmail_msg">
> New Revision: 295768<br class="gmail_msg">
><br class="gmail_msg">
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=295768&view=rev" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project?rev=295768&view=rev</a><br class="gmail_msg">
> Log:<br class="gmail_msg">
> [Support] Add a function to check if a file resides locally.<br class="gmail_msg">
><br class="gmail_msg">
> Differential Revision: <a href="https://reviews.llvm.org/D30010" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D30010</a><br class="gmail_msg">
><br class="gmail_msg">
> Modified:<br class="gmail_msg">
>     llvm/trunk/include/llvm/Support/FileSystem.h<br class="gmail_msg">
>     llvm/trunk/include/llvm/Support/MemoryBuffer.h<br class="gmail_msg">
>     llvm/trunk/lib/Support/MemoryBuffer.cpp<br class="gmail_msg">
>     llvm/trunk/lib/Support/Unix/Path.inc<br class="gmail_msg">
>     llvm/trunk/lib/Support/Windows/Path.inc<br class="gmail_msg">
>     llvm/trunk/unittests/Support/Path.cpp<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div>