diff options
author | Tamas Berghammer <tberghammer@google.com> | 2015-09-30 10:12:40 +0000 |
---|---|---|
committer | Tamas Berghammer <tberghammer@google.com> | 2015-09-30 10:12:40 +0000 |
commit | c8fd130a2cbf7ade53d05e597f9d48e8c2f37442 (patch) | |
tree | 3c9cfb6d1674ee147e83fb80c6ab25e0444ad958 /lldb/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py | |
parent | ebfd72493cc68b085d3feac59f032acb518f4163 (diff) | |
download | bcm5719-llvm-c8fd130a2cbf7ade53d05e597f9d48e8c2f37442.tar.gz bcm5719-llvm-c8fd130a2cbf7ade53d05e597f9d48e8c2f37442.zip |
Merge dwarf and dsym tests
Currently most of the test files have a separate dwarf and a separate
dsym test with almost identical content (only the build step is
different). With adding dwo symbol file handling to the test suit it
would increase this to a 3-way duplication. The purpose of this change
is to eliminate this redundancy with generating 2 test case (one dwarf
and one dsym) for each test function specified (dwo handling will be
added at a later commit).
Main design goals:
* There should be no boilerplate code in each test file to support the
multiple debug info in most of the tests (custom scenarios are
acceptable in special cases) so adding a new test case is easier and
we can't miss one of the debug info type.
* In case of a test failure, the debug symbols used during the test run
have to be cleanly visible from the output of dotest.py to make
debugging easier both from build bot logs and from local test runs
* Each test case should have a unique, fully qualified name so we can
run exactly 1 test with "-f <test-case>.<test-function>" syntax
* Test output should be grouped based on test files the same way as it
happens now (displaying dwarf/dsym results separately isn't
preferable)
Proposed solution (main logic in lldbtest.py, rest of them are test
cases fixed up for the new style):
* Have only 1 test fuction in the test files what will run for all
debug info separately and this test function should call just
"self.build(...)" to build an inferior with the right debug info
* When a class is created by python (the class object, not the class
instance), we will generate a new test method for each debug info
format in the test class with the name "<test-function>_<debug-info>"
and remove the original test method. This way unittest2 see multiple
test methods (1 for each debug info, pretty much as of now) and will
handle the test selection and the failure reporting correctly (the
debug info will be visible from the end of the test name)
* Add new annotation @no_debug_info_test to disable the generation of
multiple tests for each debug info format when the test don't have an
inferior
Differential revision: http://reviews.llvm.org/D13028
llvm-svn: 248883
Diffstat (limited to 'lldb/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py')
-rw-r--r-- | lldb/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py | 175 |
1 files changed, 70 insertions, 105 deletions
diff --git a/lldb/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py b/lldb/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py index ae073f08fe2..149d6a22bc8 100644 --- a/lldb/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py +++ b/lldb/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py @@ -25,170 +25,150 @@ class ConcurrentEventsTestCase(TestBase): ## Tests for multiple threads that generate a single event. # @unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test") - @dwarf_test - def test_many_breakpoints_dwarf(self): + def test_many_breakpoints(self): """Test 100 breakpoints from 100 threads.""" - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_breakpoint_threads=100) @unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test") - @dwarf_test - def test_many_watchpoints_dwarf(self): + def test_many_watchpoints(self): """Test 100 watchpoints from 100 threads.""" - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_watchpoint_threads=100) @unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test") - @dwarf_test - def test_many_signals_dwarf(self): + def test_many_signals(self): """Test 100 signals from 100 threads.""" - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_signal_threads=100) @unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test") - @dwarf_test - def test_many_crash_dwarf(self): + def test_many_crash(self): """Test 100 threads that cause a segfault.""" - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_crash_threads=100) # ## Tests for concurrent signal and breakpoint # - @dwarf_test @skipIfFreeBSD # timing out on buildbot - def test_signal_break_dwarf(self): + def test_signal_break(self): """Test signal and a breakpoint in multiple threads.""" - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_breakpoint_threads=1, num_signal_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot - def test_delay_signal_break_dwarf(self): + def test_delay_signal_break(self): """Test (1-second delay) signal and a breakpoint in multiple threads.""" - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_breakpoint_threads=1, num_delay_signal_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot - def test_signal_delay_break_dwarf(self): + def test_signal_delay_break(self): """Test signal and a (1 second delay) breakpoint in multiple threads.""" - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_delay_breakpoint_threads=1, num_signal_threads=1) # ## Tests for concurrent watchpoint and breakpoint # - @dwarf_test @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock - def test_watch_break_dwarf(self): + def test_watch_break(self): """Test watchpoint and a breakpoint in multiple threads.""" - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_breakpoint_threads=1, num_watchpoint_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock - def test_delay_watch_break_dwarf(self): + def test_delay_watch_break(self): """Test (1-second delay) watchpoint and a breakpoint in multiple threads.""" - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_breakpoint_threads=1, num_delay_watchpoint_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock - def test_watch_break_dwarf_delay(self): + def test_watch_break_delay(self): """Test watchpoint and a (1 second delay) breakpoint in multiple threads.""" - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_delay_breakpoint_threads=1, num_watchpoint_threads=1) # ## Tests for concurrent signal and watchpoint # - @dwarf_test @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock - def test_signal_watch_dwarf(self): + def test_signal_watch(self): """Test a watchpoint and a signal in multiple threads.""" - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_signal_threads=1, num_watchpoint_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock - def test_delay_signal_watch_dwarf(self): + def test_delay_signal_watch(self): """Test a watchpoint and a (1 second delay) signal in multiple threads.""" - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_delay_signal_threads=1, num_watchpoint_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock @expectedFailureAll("llvm.org/pr16714", oslist=["linux"], archs=["i386"]) - def test_signal_delay_watch_dwarf(self): + def test_signal_delay_watch(self): """Test a (1 second delay) watchpoint and a signal in multiple threads.""" - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_signal_threads=1, num_delay_watchpoint_threads=1) # ## Tests for multiple breakpoint threads # - @dwarf_test @skipIfFreeBSD # timing out on buildbot - def test_two_breakpoint_threads_dwarf(self): + def test_two_breakpoint_threads(self): """Test two threads that trigger a breakpoint. """ - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_breakpoint_threads=2) - @dwarf_test @skipIfFreeBSD # timing out on buildbot - def test_breakpoint_one_delay_breakpoint_threads_dwarf(self): + def test_breakpoint_one_delay_breakpoint_threads(self): """Test threads that trigger a breakpoint where one thread has a 1 second delay. """ - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_breakpoint_threads=1, num_delay_breakpoint_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot - def test_two_breakpoints_one_signal_dwarf(self): + def test_two_breakpoints_one_signal(self): """Test two threads that trigger a breakpoint and one signal thread. """ - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_breakpoint_threads=2, num_signal_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot - def test_breakpoint_delay_breakpoint_one_signal_dwarf(self): + def test_breakpoint_delay_breakpoint_one_signal(self): """Test two threads that trigger a breakpoint (one with a 1 second delay) and one signal thread. """ - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_breakpoint_threads=1, num_delay_breakpoint_threads=1, num_signal_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot - def test_two_breakpoints_one_delay_signal_dwarf(self): + def test_two_breakpoints_one_delay_signal(self): """Test two threads that trigger a breakpoint and one (1 second delay) signal thread. """ - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_breakpoint_threads=2, num_delay_signal_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock - def test_two_breakpoints_one_watchpoint_dwarf(self): + def test_two_breakpoints_one_watchpoint(self): """Test two threads that trigger a breakpoint and one watchpoint thread. """ - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_breakpoint_threads=2, num_watchpoint_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock - def test_breakpoints_delayed_breakpoint_one_watchpoint_dwarf(self): + def test_breakpoints_delayed_breakpoint_one_watchpoint(self): """Test a breakpoint, a delayed breakpoint, and one watchpoint thread. """ - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_breakpoint_threads=1, num_delay_breakpoint_threads=1, num_watchpoint_threads=1) @@ -196,86 +176,77 @@ class ConcurrentEventsTestCase(TestBase): # ## Tests for multiple watchpoint threads # - @dwarf_test @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock - def test_two_watchpoint_threads_dwarf(self): + def test_two_watchpoint_threads(self): """Test two threads that trigger a watchpoint. """ - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_watchpoint_threads=2) - @dwarf_test @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock - def test_watchpoint_with_delay_watchpoint_threads_dwarf(self): + def test_watchpoint_with_delay_watchpoint_threads(self): """Test two threads that trigger a watchpoint where one thread has a 1 second delay. """ - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_watchpoint_threads=1, num_delay_watchpoint_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock - def test_two_watchpoints_one_breakpoint_dwarf(self): + def test_two_watchpoints_one_breakpoint(self): """Test two threads that trigger a watchpoint and one breakpoint thread. """ - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_watchpoint_threads=2, num_breakpoint_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock - def test_two_watchpoints_one_delay_breakpoint_dwarf(self): + def test_two_watchpoints_one_delay_breakpoint(self): """Test two threads that trigger a watchpoint and one (1 second delay) breakpoint thread. """ - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_watchpoint_threads=2, num_delay_breakpoint_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock - def test_watchpoint_delay_watchpoint_one_breakpoint_dwarf(self): + def test_watchpoint_delay_watchpoint_one_breakpoint(self): """Test two threads that trigger a watchpoint (one with a 1 second delay) and one breakpoint thread. """ - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_watchpoint_threads=1, num_delay_watchpoint_threads=1, num_breakpoint_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock - def test_two_watchpoints_one_signal_dwarf(self): + def test_two_watchpoints_one_signal(self): """Test two threads that trigger a watchpoint and one signal thread. """ - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_watchpoint_threads=2, num_signal_threads=1) # ## Test for watchpoint, signal and breakpoint happening concurrently # - @dwarf_test @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock - def test_signal_watch_break_dwarf(self): + def test_signal_watch_break(self): """Test a signal/watchpoint/breakpoint in multiple threads.""" - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_signal_threads=1, num_watchpoint_threads=1, num_breakpoint_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock - def test_signal_watch_break_dwarf(self): + def test_signal_watch_break(self): """Test one signal thread with 5 watchpoint and breakpoint threads.""" - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_signal_threads=1, num_watchpoint_threads=5, num_breakpoint_threads=5) - @dwarf_test @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock - def test_signal_watch_break_dwarf(self): + def test_signal_watch_break(self): """Test with 5 watchpoint and breakpoint threads.""" - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_watchpoint_threads=5, num_breakpoint_threads=5) @@ -283,54 +254,48 @@ class ConcurrentEventsTestCase(TestBase): # ## Test for crashing threads happening concurrently with other events # - @dwarf_test @skipIfFreeBSD # timing out on buildbot - def test_crash_with_break_dwarf(self): + def test_crash_with_break(self): """ Test a thread that crashes while another thread hits a breakpoint.""" - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_crash_threads=1, num_breakpoint_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock - def test_crash_with_watchpoint_dwarf(self): + def test_crash_with_watchpoint(self): """ Test a thread that crashes while another thread hits a watchpoint.""" - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_crash_threads=1, num_watchpoint_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot - def test_crash_with_signal_dwarf(self): + def test_crash_with_signal(self): """ Test a thread that crashes while another thread generates a signal.""" - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_crash_threads=1, num_signal_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock - def test_crash_with_watchpoint_breakpoint_signal_dwarf(self): + def test_crash_with_watchpoint_breakpoint_signal(self): """ Test a thread that crashes while other threads generate a signal and hit a watchpoint and breakpoint. """ - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_crash_threads=1, num_breakpoint_threads=1, num_signal_threads=1, num_watchpoint_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock - def test_delayed_crash_with_breakpoint_watchpoint_dwarf(self): + def test_delayed_crash_with_breakpoint_watchpoint(self): """ Test a thread with a delayed crash while other threads hit a watchpoint and a breakpoint. """ - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_delay_crash_threads=1, num_breakpoint_threads=1, num_watchpoint_threads=1) - @dwarf_test @skipIfFreeBSD # timing out on buildbot - def test_delayed_crash_with_breakpoint_signal_dwarf(self): + def test_delayed_crash_with_breakpoint_signal(self): """ Test a thread with a delayed crash while other threads generate a signal and hit a breakpoint. """ - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_delay_crash_threads=1, num_breakpoint_threads=1, num_signal_threads=1) |