diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
22 files changed, 149 insertions, 24 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/TestWatchLocation.py b/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/TestWatchLocation.py index 7a8b07b0425..33127bf51e2 100644 --- a/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/TestWatchLocation.py +++ b/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/TestWatchLocation.py @@ -36,7 +36,6 @@ class HelloWatchLocationTestCase(TestBase): @expectedFailureAll(triple=re.compile('^mips')) # SystemZ and PowerPC also currently supports only one H/W watchpoint @expectedFailureAll(archs=['powerpc64le', 's390x']) - @expectedFailureNetBSD @skipIfDarwin def test_hello_watchlocation(self): """Test watching a location with '-s size' option.""" diff --git a/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.py b/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.py index b69736bb30b..7953dabebfd 100644 --- a/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.py +++ b/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.py @@ -34,7 +34,6 @@ class WatchLocationUsingWatchpointSetTestCase(TestBase): 'aarch64', 'arm'], bugnumber="llvm.org/pr26031") - @expectedFailureNetBSD def test_watchlocation_using_watchpoint_set(self): """Test watching a location with 'watchpoint set expression -w write -s size' option.""" self.build() diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointOneDelayBreakpointThreads.py b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointOneDelayBreakpointThreads.py index fd62edbf43e..8712342e581 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointOneDelayBreakpointThreads.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointOneDelayBreakpointThreads.py @@ -15,7 +15,6 @@ class ConcurrentBreakpointOneDelayBreakpointThreads(ConcurrentEventsBase): @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @expectedFailureNetBSD def test(self): """Test threads that trigger a breakpoint where one thread has a 1 second delay. """ self.build(dictionary=self.getBuildFlags()) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithBreak.py b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithBreak.py index 9ce89e8947e..33d1074211e 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithBreak.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithBreak.py @@ -15,7 +15,6 @@ class ConcurrentCrashWithBreak(ConcurrentEventsBase): @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @expectedFailureNetBSD def test(self): """ Test a thread that crashes while another thread hits a breakpoint.""" self.build(dictionary=self.getBuildFlags()) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithSignal.py b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithSignal.py index 715c55da163..560c79ed8a8 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithSignal.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithSignal.py @@ -15,7 +15,6 @@ class ConcurrentCrashWithSignal(ConcurrentEventsBase): @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @expectedFailureNetBSD def test(self): """ Test a thread that crashes while another thread generates a signal.""" self.build(dictionary=self.getBuildFlags()) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpoint.py b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpoint.py index bf92488babc..c9cc6db9600 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpoint.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpoint.py @@ -15,7 +15,6 @@ class ConcurrentCrashWithWatchpoint(ConcurrentEventsBase): @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @expectedFailureNetBSD @add_test_categories(["watchpoint"]) def test(self): """ Test a thread that crashes while another thread hits a watchpoint.""" diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpointBreakpointSignal.py b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpointBreakpointSignal.py index 5f4a19c161d..d99107b6e9b 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpointBreakpointSignal.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpointBreakpointSignal.py @@ -15,7 +15,6 @@ class ConcurrentCrashWithWatchpointBreakpointSignal(ConcurrentEventsBase): @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @expectedFailureNetBSD @add_test_categories(["watchpoint"]) def test(self): """ Test a thread that crashes while other threads generate a signal and hit a watchpoint and breakpoint. """ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelaySignalBreak.py b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelaySignalBreak.py index 3c5249a388e..442134f4a0c 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelaySignalBreak.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelaySignalBreak.py @@ -15,7 +15,6 @@ class ConcurrentDelaySignalBreak(ConcurrentEventsBase): @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @expectedFailureNetBSD def test(self): """Test (1-second delay) signal and a breakpoint in multiple threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointSignal.py b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointSignal.py index 7461cd60b04..2b7e1b45726 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointSignal.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointSignal.py @@ -15,7 +15,6 @@ class ConcurrentDelayedCrashWithBreakpointSignal(ConcurrentEventsBase): @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @expectedFailureNetBSD def test(self): """ Test a thread with a delayed crash while other threads generate a signal and hit a breakpoint. """ self.build(dictionary=self.getBuildFlags()) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py index 504e757ac90..0564c86dfcb 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py @@ -15,7 +15,6 @@ class ConcurrentDelayedCrashWithBreakpointWatchpoint(ConcurrentEventsBase): @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @expectedFailureNetBSD @add_test_categories(["watchpoint"]) def test(self): """ Test a thread with a delayed crash while other threads hit a watchpoint and a breakpoint. """ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyBreakpoints.py b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyBreakpoints.py index 0ceaed937a9..18379f16872 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyBreakpoints.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyBreakpoints.py @@ -14,7 +14,6 @@ class ConcurrentManyBreakpoints(ConcurrentEventsBase): # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @expectedFailureNetBSD @skipIfOutOfTreeDebugserver def test(self): """Test 100 breakpoints from 100 threads.""" diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyCrash.py b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyCrash.py index 945b1b9a340..8d16267acb4 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyCrash.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyCrash.py @@ -14,7 +14,6 @@ class ConcurrentManyCrash(ConcurrentEventsBase): # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @expectedFailureNetBSD @skipIfOutOfTreeDebugserver def test(self): """Test 100 threads that cause a segfault.""" diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalBreak.py b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalBreak.py index 9af391851bb..b8819f28698 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalBreak.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalBreak.py @@ -15,7 +15,6 @@ class ConcurrentSignalBreak(ConcurrentEventsBase): @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @expectedFailureNetBSD def test(self): """Test signal and a breakpoint in multiple threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointThreads.py b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointThreads.py index 10316a36927..4e6bed2d5cb 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointThreads.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointThreads.py @@ -15,7 +15,6 @@ class ConcurrentTwoBreakpointThreads(ConcurrentEventsBase): @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @expectedFailureNetBSD def test(self): """Test two threads that trigger a breakpoint. """ self.build(dictionary=self.getBuildFlags()) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py b/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py index 585c2ea2a53..279eec8c404 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py @@ -21,7 +21,6 @@ class ExitDuringBreakpointTestCase(TestBase): # Find the line number for our breakpoint. self.breakpoint = line_number('main.cpp', '// Set breakpoint here') - @expectedFailureNetBSD def test(self): """Test thread exit during breakpoint handling.""" self.build(dictionary=self.getBuildFlags()) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py b/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py index 23b5a29a9a1..c7e66bd7726 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py @@ -17,7 +17,6 @@ class ExitDuringStepTestCase(TestBase): @skipIfFreeBSD # llvm.org/pr21411: test is hanging @skipIfWindows # This is flakey on Windows: llvm.org/pr38373 - @expectedFailureNetBSD def test(self): """Test thread exit during step handling.""" self.build(dictionary=self.getBuildFlags()) @@ -28,7 +27,6 @@ class ExitDuringStepTestCase(TestBase): @skipIfFreeBSD # llvm.org/pr21411: test is hanging @skipIfWindows # This is flakey on Windows: llvm.org/pr38373 - @expectedFailureNetBSD def test_step_over(self): """Test thread exit during step-over handling.""" self.build(dictionary=self.getBuildFlags()) @@ -39,7 +37,6 @@ class ExitDuringStepTestCase(TestBase): @skipIfFreeBSD # llvm.org/pr21411: test is hanging @skipIfWindows # This is flakey on Windows: llvm.org/pr38373 - @expectedFailureNetBSD def test_step_in(self): """Test thread exit during step-in handling.""" self.build(dictionary=self.getBuildFlags()) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py b/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py index 2913f891d76..a6f05337716 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py @@ -23,7 +23,6 @@ class NumberOfThreadsTestCase(TestBase): self.thread3_notify_all_line = line_number('main.cpp', '// Set thread3 break point on notify_all at this line.') self.thread3_before_lock_line = line_number('main.cpp', '// thread3-before-lock') - @expectedFailureNetBSD def test_number_of_threads(self): """Test number of threads.""" self.build() diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py b/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py index 8eb8b22e54e..5ad379d6a79 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py @@ -25,7 +25,6 @@ class ThreadExitTestCase(TestBase): self.break_4 = line_number('main.cpp', '// Set fourth breakpoint here') @skipIfWindows # This is flakey on Windows: llvm.org/pr38373 - @expectedFailureNetBSD def test(self): """Test thread exit handling.""" self.build(dictionary=self.getBuildFlags()) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py b/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py index 236f8cc9640..66811c2573c 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py @@ -25,13 +25,11 @@ class ThreadSpecificBreakTestCase(TestBase): @add_test_categories(['pyapi']) @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], archs=['armv7', 'armv7k'], bugnumber='rdar://problem/34563920') # armv7 ios problem - breakpoint with tid qualifier isn't working - @expectedFailureNetBSD def test_thread_id(self): self.do_test(set_thread_id) @skipUnlessDarwin @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], archs=['armv7', 'armv7k'], bugnumber='rdar://problem/34563920') # armv7 ios problem - breakpoint with tid qualifier isn't working - @expectedFailureNetBSD def test_thread_name(self): self.do_test(set_thread_name) diff --git a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py index 52daaf5dc58..050ec87fb2b 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py @@ -91,7 +91,6 @@ class LLDBIteratorTestCase(TestBase): self.assertTrue(yours[i] == mine[i], "ID of yours[{0}] and mine[{0}] matches".format(i)) - @expectedFailureNetBSD @add_test_categories(['pyapi']) def test_lldb_iter_frame(self): """Test iterator works correctly for SBProcess->SBThread->SBFrame.""" diff --git a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py index 6d4ccf0db4b..b963768ae6b 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py @@ -27,7 +27,6 @@ class TargetWatchAddressAPITestCase(TestBase): self.violating_func = "do_bad_thing_with_location" @add_test_categories(['pyapi']) - @expectedFailureNetBSD def test_watch_address(self): """Exercise SBTarget.WatchAddress() API to set a watchpoint.""" self.build() diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vContThreads.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vContThreads.py new file mode 100644 index 00000000000..48b1bb089a1 --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vContThreads.py @@ -0,0 +1,149 @@ +from __future__ import print_function + +import json +import re + +import gdbremote_testcase +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + +class TestGdbRemote_vContThreads(gdbremote_testcase.GdbRemoteTestCaseBase): + mydir = TestBase.compute_mydir(__file__) + + def start_threads(self, num): + procs = self.prep_debug_monitor_and_inferior( + inferior_args=['thread:new'] * num + ['@started']) + # start the process and wait for output + self.test_sequence.add_log_lines([ + "read packet: $c#63", + {"type": "output_match", "regex": self.maybe_strict_output_regex( + r"@started\r\n")}, + ], True) + # then interrupt it + self.add_interrupt_packets() + self.add_threadinfo_collection_packets() + + context = self.expect_gdbremote_sequence() + self.assertIsNotNone(context) + threads = self.parse_threadinfo_packets(context) + self.assertIsNotNone(threads) + self.assertEqual(len(threads), num + 1) + + self.reset_test_sequence() + return threads + + def signal_one_thread(self): + threads = self.start_threads(1) + # try sending a signal to one of the two threads + self.test_sequence.add_log_lines([ + "read packet: $vCont;C{0:x}:{1:x};c#00".format( + lldbutil.get_signal_number('SIGUSR1'), threads[0]), + {"direction": "send", "regex": r"^\$W00#b7$"}, + ], True) + + context = self.expect_gdbremote_sequence() + self.assertIsNotNone(context) + + @skipUnlessPlatform(["netbsd"]) + @debugserver_test + def test_signal_one_thread_debugserver(self): + self.init_debugserver_test() + self.build() + self.set_inferior_startup_launch() + self.signal_one_thread() + + @skipUnlessPlatform(["netbsd"]) + @llgs_test + def test_signal_one_thread_llgs(self): + self.init_llgs_test() + self.build() + self.set_inferior_startup_launch() + self.signal_one_thread() + + def signal_all_threads(self): + threads = self.start_threads(1) + # try sending a signal to two threads (= the process) + self.test_sequence.add_log_lines([ + "read packet: $vCont;C{0:x}:{1:x};C{0:x}:{2:x}#00".format( + lldbutil.get_signal_number('SIGUSR1'), + threads[0], threads[1]), + {"direction": "send", "regex": r"^\$W00#b7$"}, + ], True) + + context = self.expect_gdbremote_sequence() + self.assertIsNotNone(context) + + @skipUnlessPlatform(["netbsd"]) + @debugserver_test + def test_signal_all_threads_debugserver(self): + self.init_debugserver_test() + self.build() + self.set_inferior_startup_launch() + self.signal_all_threads() + + @skipUnlessPlatform(["netbsd"]) + @llgs_test + def test_signal_all_threads_llgs(self): + self.init_llgs_test() + self.build() + self.set_inferior_startup_launch() + self.signal_all_threads() + + def signal_two_of_three_threads(self): + threads = self.start_threads(2) + # try sending a signal to 2 out of 3 threads + self.test_sequence.add_log_lines([ + "read packet: $vCont;C{0:x}:{1:x};C{0:x}:{2:x};c#00".format( + lldbutil.get_signal_number('SIGUSR1'), + threads[1], threads[2]), + {"direction": "send", "regex": r"^\$E1e#db$"}, + ], True) + + context = self.expect_gdbremote_sequence() + self.assertIsNotNone(context) + + @skipUnlessPlatform(["netbsd"]) + @debugserver_test + def test_signal_two_of_three_threads_debugserver(self): + self.init_debugserver_test() + self.build() + self.set_inferior_startup_launch() + self.signal_two_of_three_threads() + + @skipUnlessPlatform(["netbsd"]) + @llgs_test + def test_signal_two_of_three_threads_llgs(self): + self.init_llgs_test() + self.build() + self.set_inferior_startup_launch() + self.signal_two_of_three_threads() + + def signal_two_signals(self): + threads = self.start_threads(1) + # try sending two different signals to two threads + self.test_sequence.add_log_lines([ + "read packet: $vCont;C{0:x}:{1:x};C{2:x}:{3:x}#00".format( + lldbutil.get_signal_number('SIGUSR1'), threads[0], + lldbutil.get_signal_number('SIGUSR2'), threads[1]), + {"direction": "send", "regex": r"^\$E1e#db$"}, + ], True) + + context = self.expect_gdbremote_sequence() + self.assertIsNotNone(context) + + @skipUnlessPlatform(["netbsd"]) + @debugserver_test + def test_signal_two_signals_debugserver(self): + self.init_debugserver_test() + self.build() + self.set_inferior_startup_launch() + self.signal_two_signals() + + @skipUnlessPlatform(["netbsd"]) + @llgs_test + def test_signal_two_signals_llgs(self): + self.init_llgs_test() + self.build() + self.set_inferior_startup_launch() + self.signal_two_signals() |