[Lldb-commits] [lldb] 680082a - [lldb/Reproducers] Add a small artificial delay before exiting
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Thu Apr 9 11:05:43 PDT 2020
Author: Jonas Devlieghere
Date: 2020-04-09T11:03:24-07:00
New Revision: 680082a408dd2df7410d77696100eac8ce9d5530
URL: https://github.com/llvm/llvm-project/commit/680082a408dd2df7410d77696100eac8ce9d5530
DIFF: https://github.com/llvm/llvm-project/commit/680082a408dd2df7410d77696100eac8ce9d5530.diff
LOG: [lldb/Reproducers] Add a small artificial delay before exiting
Add a small artificial delay in replay mode before exiting to ensure
that all asynchronous events have completed. This should reduce the
level of replay flakiness on some of the slower bots.
Added:
Modified:
lldb/source/Utility/ReproducerInstrumentation.cpp
Removed:
################################################################################
diff --git a/lldb/source/Utility/ReproducerInstrumentation.cpp b/lldb/source/Utility/ReproducerInstrumentation.cpp
index 4c32d9407830..3bf81286bbe9 100644
--- a/lldb/source/Utility/ReproducerInstrumentation.cpp
+++ b/lldb/source/Utility/ReproducerInstrumentation.cpp
@@ -8,6 +8,7 @@
#include "lldb/Utility/ReproducerInstrumentation.h"
#include "lldb/Utility/Reproducer.h"
+#include <thread>
#include <stdio.h>
#include <stdlib.h>
@@ -94,6 +95,10 @@ bool Registry::Replay(llvm::StringRef buffer) {
GetReplayer(id)->operator()(deserializer);
}
+ // Add a small artificial delay to ensure that all asynchronous events have
+ // completed before we exit.
+ std::this_thread::sleep_for (std::chrono::milliseconds(100));
+
return true;
}
More information about the lldb-commits
mailing list