https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/143048
>From d1371371fbcfd6f8113e2d04707f80a7c439d287 Mon Sep 17 00:00:00 2001 From: prabhukr <prabh...@google.com> Date: Thu, 5 Jun 2025 22:52:24 +0000 Subject: [PATCH 1/2] [lldb] Fix linux x64 test Test was failing for cases where -I 0 was not passed to stop-hook add calls. --- .../target/stop-hooks/TestStopHookScripted.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lldb/test/API/commands/target/stop-hooks/TestStopHookScripted.py b/lldb/test/API/commands/target/stop-hooks/TestStopHookScripted.py index b71f3421f9834..71f805e7f296b 100644 --- a/lldb/test/API/commands/target/stop-hooks/TestStopHookScripted.py +++ b/lldb/test/API/commands/target/stop-hooks/TestStopHookScripted.py @@ -58,19 +58,19 @@ def test_stop_hooks_scripted_no_entry(self): def test_stop_hooks_scripted_right_func(self): """Test that a scripted stop hook fires when there is a function match""" - self.stop_hooks_scripted(5, "-n step_out_of_me") + self.stop_hooks_scripted(5, "-I 0 -n step_out_of_me") def test_stop_hooks_scripted_wrong_func(self): """Test that a scripted stop hook doesn't fire when the function does not match""" - self.stop_hooks_scripted(0, "-n main") + self.stop_hooks_scripted(0, "-I 0 -n main") def test_stop_hooks_scripted_right_lines(self): """Test that a scripted stop hook fires when there is a function match""" - self.stop_hooks_scripted(5, "-f main.c -l 1 -e %d" % (self.main_start_line)) + self.stop_hooks_scripted(5, "-I 0 -f main.c -l 1 -e %d" % (self.main_start_line)) def test_stop_hooks_scripted_wrong_lines(self): """Test that a scripted stop hook doesn't fire when the function does not match""" - self.stop_hooks_scripted(0, "-f main.c -l %d -e 100" % (self.main_start_line)) + self.stop_hooks_scripted(0, "-I 0 -f main.c -l %d -e 100" % (self.main_start_line)) def test_stop_hooks_scripted_auto_continue(self): """Test that the --auto-continue flag works""" @@ -89,9 +89,9 @@ def do_test_auto_continue(self, return_true): result = lldb.SBCommandReturnObject() if return_true: - command = "target stop-hook add -P stop_hook.stop_handler -k increment -v 5 -k return_false -v 1 -n step_out_of_me" + 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" else: - command = "target stop-hook add -G 1 -P stop_hook.stop_handler -k increment -v 5 -n step_out_of_me" + command = "target stop-hook add -I 0 -G 1 -P stop_hook.stop_handler -k increment -v 5 -n step_out_of_me" self.interp.HandleCommand(command, result) self.assertTrue(result.Succeeded(), "Set the target stop hook") >From 9b257aa18e05d0d305c0b5b983827872268f9a03 Mon Sep 17 00:00:00 2001 From: prabhukr <prabh...@google.com> Date: Fri, 6 Jun 2025 01:59:11 +0000 Subject: [PATCH 2/2] Format python file. --- .../commands/target/stop-hooks/TestStopHookScripted.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lldb/test/API/commands/target/stop-hooks/TestStopHookScripted.py b/lldb/test/API/commands/target/stop-hooks/TestStopHookScripted.py index 71f805e7f296b..954cac1592435 100644 --- a/lldb/test/API/commands/target/stop-hooks/TestStopHookScripted.py +++ b/lldb/test/API/commands/target/stop-hooks/TestStopHookScripted.py @@ -66,11 +66,15 @@ def test_stop_hooks_scripted_wrong_func(self): def test_stop_hooks_scripted_right_lines(self): """Test that a scripted stop hook fires when there is a function match""" - self.stop_hooks_scripted(5, "-I 0 -f main.c -l 1 -e %d" % (self.main_start_line)) + self.stop_hooks_scripted( + 5, "-I 0 -f main.c -l 1 -e %d" % (self.main_start_line) + ) def test_stop_hooks_scripted_wrong_lines(self): """Test that a scripted stop hook doesn't fire when the function does not match""" - self.stop_hooks_scripted(0, "-I 0 -f main.c -l %d -e 100" % (self.main_start_line)) + self.stop_hooks_scripted( + 0, "-I 0 -f main.c -l %d -e 100" % (self.main_start_line) + ) def test_stop_hooks_scripted_auto_continue(self): """Test that the --auto-continue flag works""" _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits