Author: Jonas Devlieghere Date: 2020-01-18T13:15:44-08:00 New Revision: f78f15a60ee42781cbe9fb04b6c40ef0e2cd093c
URL: https://github.com/llvm/llvm-project/commit/f78f15a60ee42781cbe9fb04b6c40ef0e2cd093c DIFF: https://github.com/llvm/llvm-project/commit/f78f15a60ee42781cbe9fb04b6c40ef0e2cd093c.diff LOG: [lldb/Test] XFAIL TestRequireHWBreakpoints when HW BPs are avialable Resolves PR44055 Added: Modified: lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/TestRequireHWBreakpoints.py Removed: ################################################################################ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/TestRequireHWBreakpoints.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/TestRequireHWBreakpoints.py index 0bf82c4a310a..74f2fbb0c1a0 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/TestRequireHWBreakpoints.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/TestRequireHWBreakpoints.py @@ -13,6 +13,17 @@ class BreakpointLocationsTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True mydir = TestBase.compute_mydir(__file__) + def supports_hw_breakpoints(self): + self.build() + self.runCmd("file " + self.getBuildArtifact("a.out"), + CURRENT_EXECUTABLE_SET) + self.runCmd("breakpoint set -b main --hardware") + self.runCmd("run") + print(self.res.GetOutput()) + if 'stopped' in self.res.GetOutput(): + return 'Hardware breakpoints are supported' + return None + def test_breakpoint(self): """Test regular breakpoints when hardware breakpoints are required.""" self.build() @@ -25,8 +36,7 @@ def test_breakpoint(self): self.assertTrue(breakpoint.IsHardware()) @skipIfWindows - @expectedFailureAll(archs="aarch64", oslist="linux", - bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44055") + @expectedFailure(supports_hw_breakpoints) def test_step_range(self): """Test stepping when hardware breakpoints are required.""" self.build() @@ -48,8 +58,7 @@ def test_step_range(self): in error.GetCString()) @skipIfWindows - @expectedFailureAll(archs="aarch64", oslist="linux", - bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44055") + @expectedFailure(supports_hw_breakpoints) def test_step_out(self): """Test stepping out when hardware breakpoints are required.""" self.build() @@ -70,8 +79,7 @@ def test_step_out(self): in error.GetCString()) @skipIfWindows - @expectedFailureAll(archs="aarch64", oslist="linux", - bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44055") + @expectedFailure(supports_hw_breakpoints) def test_step_over(self): """Test stepping over when hardware breakpoints are required.""" self.build() @@ -90,8 +98,7 @@ def test_step_over(self): ]) @skipIfWindows - @expectedFailureAll(archs="aarch64", oslist="linux", - bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44055") + @expectedFailure(supports_hw_breakpoints) def test_step_until(self): """Test stepping until when hardware breakpoints are required.""" self.build() _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits