Skip to content

Conversation

@daniilavdeev
Copy link
Contributor

Currently lldb testsuite requires some interactive input:

test_artificial_source_location (TestSourceManager.SourceManagerTestCase)
There is a running process, kill it and restart?: [Y/n]

This patch sets lldb auto-confirm flag to true before SourceManagerTestCase start, so the test doesn't freeze now.

Currently lldb testsuite requires some interactive input:
```
test_artificial_source_location (TestSourceManager.SourceManagerTestCase)
There is a running process, kill it and restart?: [Y/n]
```

This patch sets lldb auto-confirm flag to true before SourceManagerTestCase
start, so this test doesn't freeze now.
@llvmbot
Copy link
Member

llvmbot commented Nov 29, 2024

@llvm/pr-subscribers-lldb

Author: None (dlav-sc)

Changes

Currently lldb testsuite requires some interactive input:

test_artificial_source_location (TestSourceManager.SourceManagerTestCase)
There is a running process, kill it and restart?: [Y/n]

This patch sets lldb auto-confirm flag to true before SourceManagerTestCase start, so the test doesn't freeze now.


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

1 Files Affected:

  • (modified) lldb/test/API/source-manager/TestSourceManager.py (+3)
diff --git a/lldb/test/API/source-manager/TestSourceManager.py b/lldb/test/API/source-manager/TestSourceManager.py
index ad7c85aac70eaf..6c15f69118a194 100644
--- a/lldb/test/API/source-manager/TestSourceManager.py
+++ b/lldb/test/API/source-manager/TestSourceManager.py
@@ -37,6 +37,9 @@ def setUp(self):
         # Find the line number to break inside main().
         self.file = self.getBuildArtifact("main-copy.c")
         self.line = line_number("main.c", "// Set break point at this line.")
+        # disable "There is a running process, kill it and restart?" prompt
+        self.runCmd("settings set auto-confirm true")
+        self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))
 
     def modify_content(self):
         # Read the main.c file content.

@DavidSpickett
Copy link
Collaborator

On what platform are you seeing this problem? None of Linaro's bots have an issue with the test.

Is it because you're using remote debugging and only in that case it prompts for this?

@daniilavdeev
Copy link
Contributor Author

On what platform are you seeing this problem?

I've encountered with the problem using remote debugging at first, but then I was able to reproduce it on x86 host platform with command looks like this (I don't remember exactly):

python3 lldb/test/API/dotest.py -A x86-64 -C build/bin/clang --executable build/bin/lldb -f SourceManagerTestCase lldb/test/API

@DavidSpickett
Copy link
Collaborator

Please dig into why it's failing, remotely or locally whatever you can reproduce. I doubt the reason is anything sinister but I'd like to know what it is before approving anything.

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.

3 participants