Add a "watchpoint" test category and annotate tests appropriately
authorPavel Labath <labath@google.com>
Tue, 31 Oct 2017 15:27:19 +0000 (15:27 +0000)
committerPavel Labath <labath@google.com>
Tue, 31 Oct 2017 15:27:19 +0000 (15:27 +0000)
Most of the watchpoint tests are organized into subtrees, so we can use the
file-based .categories approach to annotate them. The exception are the
concurrent_events tests, which needed to be annotated on a per-test basis.

The motivation behind this is to provide an easy way to disable watchpoint
tests on systems where the watchpoint functionality is not present/unreliable.

llvm-svn: 317004

24 files changed:
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoint_delay_breakpoint_one_signal/TestConcurrentBreakpointDelayBreakpointOneSignal.py
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint/TestConcurrentCrashWithWatchpoint.py
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint_breakpoint_signal/TestConcurrentCrashWithWatchpointBreakpointSignal.py
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_watch/TestConcurrentDelaySignalWatch.py
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_watch_break/TestConcurrentDelayWatchBreak.py
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_watchpoint/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_watchpoints/TestConcurrentManyWatchpoints.py
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/n_watch_n_break/TestConcurrentNWatchNBreak.py
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_watch/TestConcurrentSignalDelayWatch.py
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_n_watch_n_break/TestConcurrentSignalNWatchNBreak.py
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch/TestConcurrentSignalWatch.py
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch_break/TestConcurrentSignalWatchBreak.py
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_watchpoint/TestConcurrentTwoBreakpointsOneWatchpoint.py
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoint_threads/TestConcurrentTwoWatchpointThreads.py
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_breakpoint/TestConcurrentTwoWatchpointsOneBreakpoint.py
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_delay_breakpoint/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_signal/TestConcurrentTwoWatchpointsOneSignal.py
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break/TestConcurrentWatchBreak.py
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break_delay/TestConcurrentWatchBreakDelay.py
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_delay_watchpoint_one_breakpoint/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py
lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_with_delay_watchpoint_threads/TestConcurrentWatchpointWithDelayWatchpointThreads.py
lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/.categories [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/python_api/watchpoint/.categories [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/test_categories.py

index 2506a82..b4d1c4b 100644 (file)
@@ -15,6 +15,7 @@ class ConcurrentBreakpointDelayBreakpointOneSignal(ConcurrentEventsBase):
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @add_test_categories(["watchpoint"])
     def test(self):
         """Test two threads that trigger a breakpoint (one with a 1 second delay) and one signal thread. """
         self.build(dictionary=self.getBuildFlags())
index 1699038..e14a0b4 100644 (file)
@@ -16,6 +16,7 @@ class ConcurrentCrashWithWatchpoint(ConcurrentEventsBase):
     @skipIfRemoteDueToDeadlock
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @add_test_categories(["watchpoint"])
     def test(self):
         """ Test a thread that crashes while another thread hits a watchpoint."""
         self.build(dictionary=self.getBuildFlags())
index 4a58e7c..df5be36 100644 (file)
@@ -16,6 +16,7 @@ class ConcurrentCrashWithWatchpointBreakpointSignal(ConcurrentEventsBase):
     @skipIfRemoteDueToDeadlock
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @add_test_categories(["watchpoint"])
     def test(self):
         """ Test a thread that crashes while other threads generate a signal and hit a watchpoint and breakpoint. """
         self.build(dictionary=self.getBuildFlags())
index d5d4641..0802581 100644 (file)
@@ -16,6 +16,7 @@ class ConcurrentDelaySignalWatch(ConcurrentEventsBase):
     @skipIfRemoteDueToDeadlock
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @add_test_categories(["watchpoint"])
     def test(self):
         """Test a watchpoint and a (1 second delay) signal in multiple threads."""
         self.build(dictionary=self.getBuildFlags())
index 9cbb40c..197ca9e 100644 (file)
@@ -16,6 +16,7 @@ class ConcurrentDelayWatchBreak(ConcurrentEventsBase):
     @skipIfRemoteDueToDeadlock
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @add_test_categories(["watchpoint"])
     def test(self):
         """Test (1-second delay) watchpoint and a breakpoint in multiple threads."""
         self.build(dictionary=self.getBuildFlags())
index ccbeeb0..d8e3c99 100644 (file)
@@ -16,6 +16,7 @@ class ConcurrentDelayedCrashWithBreakpointWatchpoint(ConcurrentEventsBase):
     @skipIfRemoteDueToDeadlock
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @add_test_categories(["watchpoint"])
     def test(self):
         """ Test a thread with a delayed crash while other threads hit a watchpoint and a breakpoint. """
         self.build(dictionary=self.getBuildFlags())
index 73c1704..96b610f 100644 (file)
@@ -17,6 +17,7 @@ class ConcurrentManyWatchpoints(ConcurrentEventsBase):
         "Skip this long running test")
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @add_test_categories(["watchpoint"])
     def test(self):
         """Test 100 watchpoints from 100 threads."""
         self.build(dictionary=self.getBuildFlags())
index 0c47d7d..d6a342b 100644 (file)
@@ -17,6 +17,7 @@ class ConcurrentNWatchNBreak(ConcurrentEventsBase):
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
     @expectedFailureAll(oslist=["linux"]) # Very flakey
+    @add_test_categories(["watchpoint"])
     def test(self):
         """Test with 5 watchpoint and breakpoint threads."""
         self.build(dictionary=self.getBuildFlags())
index 1282453..b751991 100644 (file)
@@ -16,6 +16,7 @@ class ConcurrentSignalDelayWatch(ConcurrentEventsBase):
     @skipIfRemoteDueToDeadlock
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @add_test_categories(["watchpoint"])
     def test(self):
         """Test a (1 second delay) watchpoint and a signal in multiple threads."""
         self.build(dictionary=self.getBuildFlags())
index 56217e1..17f62a8 100644 (file)
@@ -16,6 +16,7 @@ class ConcurrentSignalNWatchNBreak(ConcurrentEventsBase):
     @skipIfRemoteDueToDeadlock
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @add_test_categories(["watchpoint"])
     def test(self):
         """Test one signal thread with 5 watchpoint and breakpoint threads."""
         self.build(dictionary=self.getBuildFlags())
index 0010628..3674f5e 100644 (file)
@@ -16,6 +16,7 @@ class ConcurrentSignalWatch(ConcurrentEventsBase):
     @skipIfRemoteDueToDeadlock
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @add_test_categories(["watchpoint"])
     def test(self):
         """Test a watchpoint and a signal in multiple threads."""
         self.build(dictionary=self.getBuildFlags())
index d772500..3e8b03f 100644 (file)
@@ -16,6 +16,7 @@ class ConcurrentSignalWatchBreak(ConcurrentEventsBase):
     @skipIfRemoteDueToDeadlock
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @add_test_categories(["watchpoint"])
     def test(self):
         """Test a signal/watchpoint/breakpoint in multiple threads."""
         self.build(dictionary=self.getBuildFlags())
index f26a5dc..77f6317 100644 (file)
@@ -16,6 +16,7 @@ class ConcurrentTwoBreakpointsOneWatchpoint(ConcurrentEventsBase):
     @skipIfRemoteDueToDeadlock
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @add_test_categories(["watchpoint"])
     def test(self):
         """Test two threads that trigger a breakpoint and one watchpoint thread. """
         self.build(dictionary=self.getBuildFlags())
index 059e077..a7fb583 100644 (file)
@@ -16,6 +16,7 @@ class ConcurrentTwoWatchpointThreads(ConcurrentEventsBase):
     @skipIfRemoteDueToDeadlock
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @add_test_categories(["watchpoint"])
     def test(self):
         """Test two threads that trigger a watchpoint. """
         self.build(dictionary=self.getBuildFlags())
index 3b74f16..b4cbd52 100644 (file)
@@ -17,6 +17,7 @@ class ConcurrentTwoWatchpointsOneBreakpoint(ConcurrentEventsBase):
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
     @expectedFlakeyLinux
+    @add_test_categories(["watchpoint"])
     def test(self):
         """Test two threads that trigger a watchpoint and one breakpoint thread. """
         self.build(dictionary=self.getBuildFlags())
index ae6f644..8b219b0 100644 (file)
@@ -16,6 +16,7 @@ class ConcurrentTwoWatchpointsOneDelayBreakpoint(ConcurrentEventsBase):
     @skipIfRemoteDueToDeadlock
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @add_test_categories(["watchpoint"])
     def test(self):
         """Test two threads that trigger a watchpoint and one (1 second delay) breakpoint thread. """
         self.build(dictionary=self.getBuildFlags())
index 78f2dbb..aa7eab9 100644 (file)
@@ -16,6 +16,7 @@ class ConcurrentTwoWatchpointsOneSignal(ConcurrentEventsBase):
     @skipIfRemoteDueToDeadlock
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @add_test_categories(["watchpoint"])
     def test(self):
         """Test two threads that trigger a watchpoint and one signal thread. """
         self.build(dictionary=self.getBuildFlags())
index ffa6909..682d059 100644 (file)
@@ -16,6 +16,7 @@ class ConcurrentWatchBreak(ConcurrentEventsBase):
     @skipIfRemoteDueToDeadlock
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @add_test_categories(["watchpoint"])
     def test(self):
         """Test watchpoint and a breakpoint in multiple threads."""
         self.build(dictionary=self.getBuildFlags())
index 4c8b5b3..9145366 100644 (file)
@@ -16,6 +16,7 @@ class ConcurrentWatchBreakDelay(ConcurrentEventsBase):
     @skipIfRemoteDueToDeadlock
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @add_test_categories(["watchpoint"])
     def test(self):
         """Test watchpoint and a (1 second delay) breakpoint in multiple threads."""
         self.build(dictionary=self.getBuildFlags())
index 0d545b3..674d967 100644 (file)
@@ -16,6 +16,7 @@ class ConcurrentWatchpointDelayWatchpointOneBreakpoint(ConcurrentEventsBase):
     @skipIfRemoteDueToDeadlock
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @add_test_categories(["watchpoint"])
     def test(self):
         """Test two threads that trigger a watchpoint (one with a 1 second delay) and one breakpoint thread. """
         self.build(dictionary=self.getBuildFlags())
index 56cd85d..6d00f8c 100644 (file)
@@ -16,6 +16,7 @@ class ConcurrentWatchpointWithDelayWatchpointThreads(ConcurrentEventsBase):
     @skipIfRemoteDueToDeadlock
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @add_test_categories(["watchpoint"])
     def test(self):
         """Test two threads that trigger a watchpoint where one thread has a 1 second delay. """
         self.build(dictionary=self.getBuildFlags())
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/.categories b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/.categories
new file mode 100644 (file)
index 0000000..50c1613
--- /dev/null
@@ -0,0 +1 @@
+watchpoint
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/.categories b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/.categories
new file mode 100644 (file)
index 0000000..50c1613
--- /dev/null
@@ -0,0 +1 @@
+watchpoint
index ca78eb9..46e3f34 100644 (file)
@@ -34,7 +34,9 @@ all_categories = {
     'stresstest': 'Tests related to stressing lldb limits',
     'flakey': 'Flakey test cases, i.e. tests that do not reliably pass at each execution',
     'lldb-mi': 'lldb-mi tests',
-    'darwin-log': 'Darwin log tests'}
+    'darwin-log': 'Darwin log tests',
+    'watchpoint': 'Watchpoint-related tests',
+}
 
 
 def unique_string_match(yourentry, list):