Skip to content

[lldb] Fixed the test TestThreadStates when run with a remote target #92086

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2024

Conversation

slydiman
Copy link
Contributor

self.wait_for_running_event(process) is always called after self.runCmd("continue"). It is strange to expect eStateConnected here. This test failed in case of a remote target. The correct state is eStateRunning. Removed incorrect checking.

self.wait_for_running_event(process) is always called after self.runCmd("continue").
It is strange to expect eStateConnected here. This test failed in case of a remote target.
The correct state is eStateRunning. Removed incorrect checking.
@slydiman slydiman requested a review from JDevlieghere as a code owner May 14, 2024 08:52
@llvmbot llvmbot added the lldb label May 14, 2024
@llvmbot
Copy link
Member

llvmbot commented May 14, 2024

@llvm/pr-subscribers-lldb

Author: Dmitry Vasilyev (slydiman)

Changes

self.wait_for_running_event(process) is always called after self.runCmd("continue"). It is strange to expect eStateConnected here. This test failed in case of a remote target. The correct state is eStateRunning. Removed incorrect checking.


Full diff: https://github.com/llvm/llvm-project/pull/92086.diff

1 Files Affected:

  • (modified) lldb/test/API/functionalities/thread/state/TestThreadStates.py (-4)
diff --git a/lldb/test/API/functionalities/thread/state/TestThreadStates.py b/lldb/test/API/functionalities/thread/state/TestThreadStates.py
index f4c17df523382..4dbe230c0ce85 100644
--- a/lldb/test/API/functionalities/thread/state/TestThreadStates.py
+++ b/lldb/test/API/functionalities/thread/state/TestThreadStates.py
@@ -102,10 +102,6 @@ def thread_state_after_breakpoint_test(self):
 
     def wait_for_running_event(self, process):
         listener = self.dbg.GetListener()
-        if lldb.remote_platform:
-            lldbutil.expect_state_changes(
-                self, listener, process, [lldb.eStateConnected]
-            )
         lldbutil.expect_state_changes(self, listener, process, [lldb.eStateRunning])
 
     def thread_state_after_continue_test(self):

@slydiman slydiman requested review from DavidSpickett and labath May 14, 2024 08:53
@labath
Copy link
Collaborator

labath commented May 14, 2024

I'm pretty sure lldb was sending these events at some point, but that could have change since then. I slightly surprised that this wasn't caught before as that would mean noone is running these tests remotely.

Jonas, are you running lldb tests in remote configurations?

@JDevlieghere
Copy link
Member

I'm pretty sure lldb was sending these events at some point, but that could have change since then. I slightly surprised that this wasn't caught before as that would mean noone is running these tests remotely.

Jonas, are you running lldb tests in remote configurations?

Yup, I am. Looks like all these tests are marked as @skipIfDarwin so that would explain why it wasn't caught before.

@labath
Copy link
Collaborator

labath commented May 14, 2024

Ah, that explains it. Ship it then.

@slydiman slydiman merged commit 0f17d9a into llvm:main May 14, 2024
6 checks passed
@slydiman slydiman deleted the fix-lldb-test-TestThreadStates branch July 25, 2024 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants