[Lldb-commits] [lldb] r348186 - Skip TestDriverOptions on Windows

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 3 13:09:26 PST 2018


I will just add that once upon a time, there was a test in LLVM that worked
similar to this, and so it would try to open a file like /foo/foo.txt, and
expect it to fail (meaning that if it succeeded, the test would fail).  I
had once created that file on my hard drive by pure coincidence, and so
this test was failing for me.

So, I think we should try to find a way to specify "inaccessible directory"
that doesn't involve potentially flakiness or system-dependence.

Off the top of my head, we could allow LLDB to recognize a hidden /
undocumented environment variable like LLDB_REPRODUCER_NO_CREATE_DIRECTORY,
and we could set that variable before running the test.  Another option
would be to create the directory beforehand using a certain permission mask
that would not cause this test to fail (e.g. you can't read from it or
write to it but you can still delete it).  We'd need a tool that can do
that though.

On Mon, Dec 3, 2018 at 12:55 PM Jonas Devlieghere <jonas at devlieghere.com>
wrote:

> That wouldn't work because we try to create the directory which would
> succeeded in the temp dir. I'd have to be something you don't have access
> to, like the root or some network drive.
>
> On Mon, Dec 3, 2018 at 12:53 PM Zachary Turner <zturner at google.com> wrote:
>
>> Perhaps use %t.bogus? instead of /bogus?
>>
>> On Mon, Dec 3, 2018 at 12:39 PM Jonas Devlieghere via lldb-commits <
>> lldb-commits at lists.llvm.org> wrote:
>>
>>> Author: jdevlieghere
>>> Date: Mon Dec  3 12:36:21 2018
>>> New Revision: 348186
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=348186&view=rev
>>> Log:
>>> Skip TestDriverOptions on Windows
>>>
>>> It's not clear to me why this is failing on Windows. Maybe it has
>>> something to do with the path?
>>>
>>> Modified:
>>>     lldb/trunk/lit/Reproducer/TestDriverOptions.test
>>>
>>> Modified: lldb/trunk/lit/Reproducer/TestDriverOptions.test
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Reproducer/TestDriverOptions.test?rev=348186&r1=348185&r2=348186&view=diff
>>>
>>> ==============================================================================
>>> --- lldb/trunk/lit/Reproducer/TestDriverOptions.test (original)
>>> +++ lldb/trunk/lit/Reproducer/TestDriverOptions.test Mon Dec  3 12:36:21
>>> 2018
>>> @@ -1,3 +1,6 @@
>>> +# FIXME: Find out why this fails on Windows.
>>> +# UNSUPPORTED: system-windows
>>> +
>>>  # Check that errors are propagated to the driver.
>>>
>>>  # RUN: not %lldb --capture /bogus 2>&1 | FileCheck %s --check-prefix
>>> CAPTURE
>>>
>>>
>>> _______________________________________________
>>> lldb-commits mailing list
>>> lldb-commits at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181203/0339a5d1/attachment.html>


More information about the lldb-commits mailing list