llvm-project/lldb/unittests
Raphael Isemann ffa7010b8c Stability improvements for CompletionTest
Summary:
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

Reviewers: aprantl

Reviewed By: aprantl

Subscribers: jfb, lldb-commits

Differential Revision: https://reviews.llvm.org/D50722

llvm-svn: 339715
2018-08-14 19:36:58 +00:00
..
Breakpoint Rename Error -> Status. 2017-05-12 04:51:55 +00:00
Core Added test for Core/Range class. 2018-08-13 20:43:06 +00:00
Editline Move PseudoTerminal to the lldb_private namespace 2017-12-11 10:09:14 +00:00
Expression Really fix ClangParserTest 2018-06-05 10:29:48 +00:00
Host [FileSpec] Make style argument mandatory for SetFile. NFC 2018-06-13 22:54:52 +00:00
Interpreter Stability improvements for CompletionTest 2018-08-14 19:36:58 +00:00
Language Straight forward FastDemangle replacement in SubsPrimitiveParmItanium 2018-08-13 16:45:06 +00:00
ObjectFile ELF: Replace the header-extension unit test with a lit one 2018-07-19 14:38:30 +00:00
Platform Use llvm::VersionTuple instead of manual version marshalling 2018-06-18 15:02:23 +00:00
Process Add support for parsing Breakpad minidump files that can have extra padding in the module, thread and memory lists. 2018-07-23 14:16:08 +00:00
ScriptInterpreter Added new API to SBStructuredData class 2017-05-29 08:25:46 +00:00
Signals Make LLDB skip server-client roundtrip for signals that don't require any actions 2017-03-07 21:34:40 +00:00
Symbol Refactor ExecuteAndWait to take StringRefs. 2018-06-12 17:43:52 +00:00
SymbolFile Revert "PDB support of function-level linking and splitted functions" 2018-06-06 09:16:00 +00:00
Target Remove UUID::SetFromCString 2018-06-21 15:24:39 +00:00
TestingSupport cmake + xcode: prevent gtests from using includes from project root 2017-10-03 21:20:18 +00:00
UnwindAssembly [LLDB] Initial version of PPC64 InstEmulation 2018-02-27 18:42:46 +00:00
Utility Fix: ConstString::GetConstCStringAndSetMangledCounterPart() should update the value if the key exists already 2018-08-14 11:07:18 +00:00
debugserver [CMake] Need to set WITH_LOCKDOWN on debugserver target 2017-09-06 20:15:43 +00:00
tools Move RegisterValue,Scalar,State from Core to Utility 2018-08-07 11:07:21 +00:00
CMakeLists.txt [cmake, unittests] Fix the CMake file for the LLDB unittests to support multiple configurations 2018-05-09 19:58:51 +00:00
gtest_common.h [Windows] Remove the #include <eh.h> hack. 2017-03-03 20:21:59 +00:00