[Lldb-commits] [PATCH] D50722: Stability improvements for CompletionTest

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 14 10:00:16 PDT 2018


teemperor created this revision.
teemperor added a reviewer: aprantl.
Herald added a subscriber: jfb.

CompletionTest.DirCompletionAbsolute had a random failure on a CI node
(in the failure, the completion count was 0, while we expected it to be 1),
but there seems no good reason for it to fail. The sanitizers don't complain
about the test when it's run, so I think we don't have some uninitialized
memory that we access here.

My best bet is that the unique directory selection randomly failed on the CI
node because maybe the FS there doesn't actually guarantee the atomic fopen
assumptions we make in the LLVM code (or some other funny race condition).
In this case a different test run could get the same directory and clean its contents
which would lead to 0 results.

The other possible explanation is that someone changed the CI configuration
on the node and changed the working dir to something very long, which would
make our PATH_MAX test fail (which also leads to 0 results), but I think that case
is unlikely.

This patch is just a stab in the dark that (hopefully) fixes this random failure by
giving each test a (more) unique working directory by appending the unique
test name to the temp-dir prefix. Also adds one more ASSERT_NO_ERROR to
one of our chdir calls just in case that is the reason for failing.

The good thing is that this refactor gets rid of most of the static variables
and files that we previously had as shared state between the different tests.

Potentially fixes rdar://problem/43150260


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D50722

Files:
  unittests/Interpreter/TestCompletion.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50722.160621.patch
Type: text/x-patch
Size: 4004 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180814/2c38bed7/attachment.bin>


More information about the lldb-commits mailing list