You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[lldb] Give more time to test/API/multiple-debuggers
This test occasionally fails on two of the busiest CI bots (asan and
matrix), and we can't reproduce it locally. This leads to the
hypothesis that the test is timing out (in the sense of the number of
"join attempts" performed by this test's driver).
This commit doubles the number of iterations performed and also does
an NFC refactor of the main test loop so that it can be more easily
understood.
(cherry picked from commit 869f551)
for (uint64_t i = 0; i < NUMBER_OF_SIMULTANEOUS_DEBUG_SESSIONS; i++)
253
-
{
254
-
if (successful_threads_array[i] == true)
255
-
successful_threads++;
256
-
if (completed_threads_array[i] == true)
257
-
total_completed_threads++;
258
-
if (completed_threads_array[i] == false)
259
-
{
260
-
all_done = false;
261
-
}
262
-
}
263
-
if (all_done)
265
+
int successful_threads = count_successful_threads(NUMBER_OF_SIMULTANEOUS_DEBUG_SESSIONS);
266
+
int total_completed_threads = count_completed_threads(NUMBER_OF_SIMULTANEOUS_DEBUG_SESSIONS);
267
+
268
+
if (total_completed_threads == NUMBER_OF_SIMULTANEOUS_DEBUG_SESSIONS)
264
269
{
265
270
#if DEBUG == 1
266
271
printf ("All threads completed.\n");
@@ -275,14 +280,14 @@ int main (int argc, char **argv)
275
280
printf ("%d threads completed so far (%d successfully), out of %d\n", total_completed_threads, successful_threads, NUMBER_OF_SIMULTANEOUS_DEBUG_SESSIONS);
276
281
#endif
277
282
}
278
-
if (iter++ == max_time_to_wait)
279
-
{
280
-
printf ("reached maximum timeout but only %d threads have completed so far (%d successfully), out of %d. Exiting.\n", total_completed_threads, successful_threads, NUMBER_OF_SIMULTANEOUS_DEBUG_SESSIONS);
281
-
break;
282
-
}
283
+
if (iter == max_time_to_wait)
284
+
printf("reached maximum timeout but only %d threads have completed "
0 commit comments