summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-05-05 18:54:16 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-05-05 18:54:16 +0000
commit693551d76779822077b57bf5987f7f67a98ca744 (patch)
treed2b9d8ada9e6dc673dc7222b96afa5eaf897cdd5 /lldb/packages/Python/lldbsuite/test
parent5170c0e5fe979130286bbf2b9a27e124fcd70b28 (diff)
downloadbcm5719-llvm-693551d76779822077b57bf5987f7f67a98ca744.tar.gz
bcm5719-llvm-693551d76779822077b57bf5987f7f67a98ca744.zip
[test] Remove randomness
This particular test fails once every so many runs on GreenDragon. Given that the randomness in the inferior isn't critical to the test, I removed it in the hopes that it is the cause of the flakiness. llvm-svn: 359992
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/main.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/main.cpp b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/main.cpp
index e1542bc1483..f21d2b33ff4 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/main.cpp
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/main.cpp
@@ -9,11 +9,8 @@
#include <chrono>
#include <condition_variable>
#include <cstdio>
-#include <random>
#include <thread>
-std::default_random_engine g_random_engine{std::random_device{}()};
-std::uniform_int_distribution<> g_distribution{0, 3000000};
std::condition_variable g_condition_variable;
std::mutex g_mutex;
int g_count;
@@ -74,17 +71,15 @@ thread_func (uint32_t thread_index)
uint32_t val;
while (count++ < 15)
{
- // random micro second sleep from zero to 3 seconds
- int usec = g_distribution(g_random_engine);
- printf ("%s (thread = %u) doing a usleep (%d)...\n", __FUNCTION__, thread_index, usec);
- std::this_thread::sleep_for(std::chrono::microseconds{usec});
+ printf ("%s (thread = %u) sleeping for 1 second...\n", __FUNCTION__, thread_index);
+ std::this_thread::sleep_for(std::chrono::seconds(1));
if (count < 7)
val = access_pool ();
else
val = access_pool (true);
- printf ("%s (thread = %u) after usleep access_pool returns %d (count=%d)...\n", __FUNCTION__, thread_index, val, count);
+ printf ("%s (thread = %u) after sleep access_pool returns %d (count=%d)...\n", __FUNCTION__, thread_index, val, count);
}
printf ("%s (thread index = %u) exiting...\n", __FUNCTION__, thread_index);
}
OpenPOWER on IntegriCloud