<div dir="ltr">I tried that locally but it succeeded for some reason. But yes, in general, probably writing to /dev/null or nul was not a good idea. Let me change the path so that it always guaranteed to fail.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 3, 2016 at 9:19 AM, George Rimar <span dir="ltr"><<a href="mailto:grimar@accesssoftek.com" target="_blank">grimar@accesssoftek.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">+# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t<br>
+# RUN: not ld.lld %t -o /dev/null 2>&1 | FileCheck -check-prefix=CHECK2 %s<br>
+<br>
+# CHECK2: failed to open<br>
<br>
Hello Rui,<br>
<br>
This test fails for me (under windows).<br>
<br>
I attached debugger to see what happens during lld call when test runs and saw<br>
that instead of "/dev/null" Writer<ELFT>::openFile() => FileOutputBuffer::create(StringRef FilePath, size_t Size, unsigned Flags)<br>
method is called with "c:\\users\\anon\\appdata\\local\\temp\\tmplzmikp" FilePath argument.<br>
<br>
And I traced to entrypoint main(int argc, const char *argv[]) and that temporary file was already in argv,<br>
and after some investigation I found that llvm\utils\lit\lit\TestRunner.py has next line:<br>
<br>
# Use temporary files to replace /dev/null on Windows.<br>
kAvoidDevNull = kIsWindows<br>
<br>
If I put kAvoidDevNull = 0 instead then test runs successfuly.<br>
I am not sure why windows buildbots are not failing now though.<br>
<br>
If I rename "/dev/null" to "/dev/null/dontreplacemeplz" in test thats also helps.<br>
Do you think this approach can be used as fix or there can be better solution ?<br>
<br>
<br>
Best regards,<br>
George.</blockquote></div><br></div>