Skip to content

Commit 0a1fdbe

Browse files
authored
[lldb] Fix linux x64 test (#143048)
`TestStopHookScripted.py` Was failing for cases where -I 0 was not passed to stop-hook add calls.
1 parent 93b0bf6 commit 0a1fdbe

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

lldb/test/API/commands/target/stop-hooks/TestStopHookScripted.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,23 @@ def test_stop_hooks_scripted_no_entry(self):
5858

5959
def test_stop_hooks_scripted_right_func(self):
6060
"""Test that a scripted stop hook fires when there is a function match"""
61-
self.stop_hooks_scripted(5, "-n step_out_of_me")
61+
self.stop_hooks_scripted(5, "-I 0 -n step_out_of_me")
6262

6363
def test_stop_hooks_scripted_wrong_func(self):
6464
"""Test that a scripted stop hook doesn't fire when the function does not match"""
65-
self.stop_hooks_scripted(0, "-n main")
65+
self.stop_hooks_scripted(0, "-I 0 -n main")
6666

6767
def test_stop_hooks_scripted_right_lines(self):
6868
"""Test that a scripted stop hook fires when there is a function match"""
69-
self.stop_hooks_scripted(5, "-f main.c -l 1 -e %d" % (self.main_start_line))
69+
self.stop_hooks_scripted(
70+
5, "-I 0 -f main.c -l 1 -e %d" % (self.main_start_line)
71+
)
7072

7173
def test_stop_hooks_scripted_wrong_lines(self):
7274
"""Test that a scripted stop hook doesn't fire when the function does not match"""
73-
self.stop_hooks_scripted(0, "-f main.c -l %d -e 100" % (self.main_start_line))
75+
self.stop_hooks_scripted(
76+
0, "-I 0 -f main.c -l %d -e 100" % (self.main_start_line)
77+
)
7478

7579
def test_stop_hooks_scripted_auto_continue(self):
7680
"""Test that the --auto-continue flag works"""
@@ -89,9 +93,9 @@ def do_test_auto_continue(self, return_true):
8993
result = lldb.SBCommandReturnObject()
9094

9195
if return_true:
92-
command = "target stop-hook add -P stop_hook.stop_handler -k increment -v 5 -k return_false -v 1 -n step_out_of_me"
96+
command = "target stop-hook add -I 0 -P stop_hook.stop_handler -k increment -v 5 -k return_false -v 1 -n step_out_of_me"
9397
else:
94-
command = "target stop-hook add -G 1 -P stop_hook.stop_handler -k increment -v 5 -n step_out_of_me"
98+
command = "target stop-hook add -I 0 -G 1 -P stop_hook.stop_handler -k increment -v 5 -n step_out_of_me"
9599

96100
self.interp.HandleCommand(command, result)
97101
self.assertTrue(result.Succeeded(), "Set the target stop hook")

0 commit comments

Comments
 (0)