[Lldb-commits] [lldb] Fix flaky TestDAP_console test. (PR #94494)

Miro Bucko via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 5 09:06:02 PDT 2024


https://github.com/mbucko created https://github.com/llvm/llvm-project/pull/94494

Test Plan:
llvm-lit llvm-project/lldb/test/API/tools/lldb-dap/console/TestDAP_console.py

>From 0d1eb164ab12773cb574de6066b717fd4c4c9e31 Mon Sep 17 00:00:00 2001
From: Miro Bucko <mbucko at meta.com>
Date: Wed, 5 Jun 2024 09:03:38 -0700
Subject: [PATCH] Fix flaky TestDAP_console test.

Test Plan:
llvm-lit llvm-project/lldb/test/API/tools/lldb-dap/console/TestDAP_console.py
---
 lldb/test/API/tools/lldb-dap/console/TestDAP_console.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lldb/test/API/tools/lldb-dap/console/TestDAP_console.py b/lldb/test/API/tools/lldb-dap/console/TestDAP_console.py
index e6345818bf087..fad4c31bb7658 100644
--- a/lldb/test/API/tools/lldb-dap/console/TestDAP_console.py
+++ b/lldb/test/API/tools/lldb-dap/console/TestDAP_console.py
@@ -141,6 +141,10 @@ def test_exit_status_message_sigterm(self):
 
         # Get the console output
         console_output = self.collect_console(1.0)
+        n_reads = 0
+        while n_reads < 10 and "exited with status" not in console_output:
+            console_output += self.collect_console(1.0)
+            n_reads += 1
 
         # Verify the exit status message is printed.
         self.assertIn(



More information about the lldb-commits mailing list