[Lldb-commits] [lldb] r297743 - Fix flakyness in TestCompletion

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 14 07:58:32 PDT 2017

Author: labath
Date: Tue Mar 14 09:58:31 2017
New Revision: 297743

URL: http://llvm.org/viewvc/llvm-project?rev=297743&view=rev
Fix flakyness in TestCompletion

One of the file name templates was occasionally generating the name
"fooa***", which conflicted with the one of the tests expectation that
there is only one item beginning with "fooa".

There doesn't seem to be a good reason for using random file templates
here, so just switch to a fixed set of files to increase


Modified: lldb/trunk/unittests/Interpreter/TestCompletion.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Interpreter/TestCompletion.cpp?rev=297743&r1=297742&r2=297743&view=diff
--- lldb/trunk/unittests/Interpreter/TestCompletion.cpp (original)
+++ lldb/trunk/unittests/Interpreter/TestCompletion.cpp Tue Mar 14 09:58:31 2017
@@ -127,8 +127,8 @@ protected:
     ASSERT_NO_ERROR(fs::createUniqueDirectory("FsCompletion", BaseDir));
     const char *DirNames[] = {"foo", "fooa", "foob",       "fooc",
                               "bar", "baz",  "test_folder"};
-    const char *FileNames[] = {"aa%%%%.tmp",  "ab%%%%.tmp",  "ac%%%%.tmp",
-                               "foo%%%%.tmp", "bar%%%%.tmp", "baz%%%%.tmp"};
+    const char *FileNames[] = {"aa1234.tmp",  "ab1234.tmp",  "ac1234.tmp",
+                               "foo1234.tmp", "bar1234.tmp", "baz1234.tmp"};
     SmallString<128> *Dirs[] = {&DirFoo, &DirFooA, &DirFooB,      &DirFooC,
                                 &DirBar, &DirBaz,  &DirTestFolder};
     for (auto Dir : llvm::zip(DirNames, Dirs)) {

More information about the lldb-commits mailing list