llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-lldb Author: Ebuka Ezike (da-viper) <details> <summary>Changes</summary> We are waiting for both stopped event at once. We may not get both events within the (0.25 seconds) time interval to fetch more events. Retry with the `DEFAULT TIMEOUT` if we got one of the event. Increase the `EVENT_QUIET_PERIOD`'s value for ASAN mode Fixes #<!-- -->179648 --- Full diff: https://github.com/llvm/llvm-project/pull/179689.diff 2 Files Affected: - (modified) lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py (+1-1) - (modified) lldb/test/API/tools/lldb-dap/stopped-events/TestDAP_stopped_events.py (+5) ``````````diff diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py index 32e37c502e358..8ce6608faa45c 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py @@ -44,7 +44,7 @@ # A quiet period between events, used to determine if we're done receiving # events in a given window, otherwise 'wait_for_stopped' would need to wait # until the DEFAULT_TIMEOUT occurs, slows down tests significantly. -EVENT_QUIET_PERIOD = 0.25 +EVENT_QUIET_PERIOD = 0.25 * (20.0 if ("ASAN_OPTIONS" in os.environ) else 1.0) # See lldbtest.Base.spawnSubprocess, which should help ensure any processes diff --git a/lldb/test/API/tools/lldb-dap/stopped-events/TestDAP_stopped_events.py b/lldb/test/API/tools/lldb-dap/stopped-events/TestDAP_stopped_events.py index 03dff39c82ed9..8b7f612c5f4a7 100644 --- a/lldb/test/API/tools/lldb-dap/stopped-events/TestDAP_stopped_events.py +++ b/lldb/test/API/tools/lldb-dap/stopped-events/TestDAP_stopped_events.py @@ -46,6 +46,11 @@ def test_multiple_threads_sample_breakpoint(self): [bp] = self.set_source_breakpoints("main.cpp", [line]) events = self.continue_to_next_stop() + if len(events) == 1: + # we may not catch both events at the same time if we run with sanitizers + # enabled or on slow or heavily used computer. + events.extend(self.continue_to_next_stop()) + self.assertEqual(len(events), 2, "Expected exactly two 'stopped' events") for event in events: body = event["body"] `````````` </details> https://github.com/llvm/llvm-project/pull/179689 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
