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 | |
| 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')
159 files changed, 833 insertions, 2912 deletions
diff --git a/lldb/test/functionalities/abbreviation/TestAbbreviations.py b/lldb/test/functionalities/abbreviation/TestAbbreviations.py index 69208475ab3..d0bbd15b749 100644 --- a/lldb/test/functionalities/abbreviation/TestAbbreviations.py +++ b/lldb/test/functionalities/abbreviation/TestAbbreviations.py @@ -13,6 +13,7 @@ class AbbreviationsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @expectedFlakeyFreeBSD("llvm.org/pr22611 thread race condition breaks prompt setting") + @no_debug_info_test def test_command_abbreviations_and_aliases (self): command_interpreter = self.dbg.GetCommandInterpreter() self.assertTrue(command_interpreter, VALID_COMMAND_INTERPRETER) diff --git a/lldb/test/functionalities/abbreviation/TestCommonShortSpellings.py b/lldb/test/functionalities/abbreviation/TestCommonShortSpellings.py index c01a0314a5c..5f7e84df40c 100644 --- a/lldb/test/functionalities/abbreviation/TestCommonShortSpellings.py +++ b/lldb/test/functionalities/abbreviation/TestCommonShortSpellings.py @@ -13,6 +13,7 @@ class CommonShortSpellingsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) + @no_debug_info_test def test_abbrevs2 (self): command_interpreter = self.dbg.GetCommandInterpreter() self.assertTrue(command_interpreter, VALID_COMMAND_INTERPRETER) diff --git a/lldb/test/functionalities/archives/TestBSDArchives.py b/lldb/test/functionalities/archives/TestBSDArchives.py index b04a9055955..0404e25a39e 100644 --- a/lldb/test/functionalities/archives/TestBSDArchives.py +++ b/lldb/test/functionalities/archives/TestBSDArchives.py @@ -10,20 +10,17 @@ class BSDArchivesTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @expectedFailureWindows("llvm.org/pr24527") # Makefile.rules doesn't know how to build static libs on Windows. - def test_with_dwarf(self): - """Break inside a() and b() defined within libfoo.a.""" - self.buildDwarf() - self.break_inside_bsd_archives() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number in a(int) to break at. self.line = line_number('a.c', '// Set file and line breakpoint inside a().') - def break_inside_bsd_archives(self): + @expectedFailureWindows("llvm.org/pr24527") # Makefile.rules doesn't know how to build static libs on Windows. + def test(self): """Break inside a() and b() defined within libfoo.a.""" + self.build() + exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) diff --git a/lldb/test/functionalities/asan/TestMemoryHistory.py b/lldb/test/functionalities/asan/TestMemoryHistory.py index 9c5c3e70785..541c1c5fa14 100644 --- a/lldb/test/functionalities/asan/TestMemoryHistory.py +++ b/lldb/test/functionalities/asan/TestMemoryHistory.py @@ -16,23 +16,13 @@ class AsanTestCase(TestBase): # may not have the debugging API which was recently added, so we're calling # self.useBuiltClang() to use clang from the llvm-build directory instead - @dsym_test - @skipIfRemote - @skipUnlessCompilerRt - @skipUnlessDarwin - def test_with_dsym (self): - compiler = self.findBuiltClang () - self.buildDsym (None, compiler) - self.asan_tests () - - @dwarf_test @expectedFailureLinux # non-core functionality, need to reenable and fix later (DES 2014.11.07) @skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default @skipIfRemote @skipUnlessCompilerRt - def test_with_dwarf (self): + def test (self): compiler = self.findBuiltClang () - self.buildDwarf (None, compiler) + self.build (None, compiler) self.asan_tests () def setUp(self): diff --git a/lldb/test/functionalities/asan/TestReportData.py b/lldb/test/functionalities/asan/TestReportData.py index 235ba037d69..cfa0141dd36 100644 --- a/lldb/test/functionalities/asan/TestReportData.py +++ b/lldb/test/functionalities/asan/TestReportData.py @@ -17,23 +17,13 @@ class AsanTestReportDataCase(TestBase): # may not have the debugging API which was recently added, so we're calling # self.useBuiltClang() to use clang from the llvm-build directory instead - @dsym_test - @skipIfRemote - @skipUnlessCompilerRt - @skipUnlessDarwin - def test_with_dsym (self): - compiler = self.findBuiltClang () - self.buildDsym (None, compiler) - self.asan_tests () - - @dwarf_test @expectedFailureLinux # non-core functionality, need to reenable and fix later (DES 2014.11.07) @skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default @skipIfRemote @skipUnlessCompilerRt - def test_with_dwarf (self): + def test(self): compiler = self.findBuiltClang () - self.buildDwarf (None, compiler) + self.build (None, compiler) self.asan_tests () def setUp(self): diff --git a/lldb/test/functionalities/attach_resume/TestAttachResume.py b/lldb/test/functionalities/attach_resume/TestAttachResume.py index ec6e626ac1c..88df25bae78 100644 --- a/lldb/test/functionalities/attach_resume/TestAttachResume.py +++ b/lldb/test/functionalities/attach_resume/TestAttachResume.py @@ -14,17 +14,15 @@ class AttachResumeTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) + @skipIfRemote @expectedFailureFreeBSD('llvm.org/pr19310') @expectedFlakeyLinux('llvm.org/pr19310') @expectedFailureWindows("llvm.org/pr24778") - @skipIfRemote - @dwarf_test def test_attach_continue_interrupt_detach(self): """Test attach/continue/interrupt/detach""" - self.buildDwarf() + self.build() self.process_attach_continue_interrupt_detach() - @skipIfRemote def process_attach_continue_interrupt_detach(self): """Test attach/continue/interrupt/detach""" diff --git a/lldb/test/functionalities/avoids-fd-leak/TestFdLeak.py b/lldb/test/functionalities/avoids-fd-leak/TestFdLeak.py index c56c1adf034..c28221a7f90 100644 --- a/lldb/test/functionalities/avoids-fd-leak/TestFdLeak.py +++ b/lldb/test/functionalities/avoids-fd-leak/TestFdLeak.py @@ -32,7 +32,7 @@ class AvoidsFdLeakTestCase(TestBase): self.do_test(["log enable -f '/dev/null' lldb commands"]) def do_test (self, commands): - self.buildDefault() + self.build() exe = os.path.join (os.getcwd(), "a.out") for c in commands: @@ -52,7 +52,7 @@ class AvoidsFdLeakTestCase(TestBase): @skipIfWindows # The check for descriptor leakage needs to be implemented differently here. @skipIfTargetAndroid() # Android have some other file descriptors open by the shell def test_fd_leak_multitarget (self): - self.buildDefault() + self.build() exe = os.path.join (os.getcwd(), "a.out") target = self.dbg.CreateTarget(exe) diff --git a/lldb/test/functionalities/backticks/TestBackticksWithoutATarget.py b/lldb/test/functionalities/backticks/TestBackticksWithoutATarget.py index 7c8cf86341f..7d9be675292 100644 --- a/lldb/test/functionalities/backticks/TestBackticksWithoutATarget.py +++ b/lldb/test/functionalities/backticks/TestBackticksWithoutATarget.py @@ -11,6 +11,7 @@ class BackticksWithNoTargetTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) + @no_debug_info_test def test_backticks_no_target(self): """A simple test of backticks without a target.""" self.expect("print `1+2-3`", diff --git a/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py b/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py index 80bf487c274..d6a9f70baa9 100644 --- a/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py +++ b/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py @@ -18,19 +18,10 @@ class BreakpointCommandTestCase(TestBase): cls.RemoveTempFile("output.txt") cls.RemoveTempFile("output2.txt") - @skipUnlessDarwin - @dsym_test - def test_with_dsym(self): - """Test a sequence of breakpoint command add, list, and delete.""" - self.buildDsym() - self.breakpoint_command_sequence() - self.breakpoint_command_script_parameters () - - @dwarf_test @expectedFailureWindows("llvm.org/pr24528") - def test_with_dwarf(self): + def test(self): """Test a sequence of breakpoint command add, list, and delete.""" - self.buildDwarf() + self.build() self.breakpoint_command_sequence() self.breakpoint_command_script_parameters () diff --git a/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py b/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py index 7fab045bfe5..c7bc773d4d5 100644 --- a/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py +++ b/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py @@ -14,19 +14,10 @@ class PythonBreakpointCommandSettingTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) my_var = 10 - @skipUnlessDarwin @python_api_test - @dsym_test - def test_step_out_with_dsym_python(self): + def test_step_out_python(self): """Test stepping out using avoid-no-debug with dsyms.""" - self.buildDsym() - self.do_set_python_command_from_python() - - @python_api_test - @dwarf_test - def test_step_out_with_dwarf_python(self): - """Test stepping out using avoid-no-debug with dsyms.""" - self.buildDwarf() + self.build() self.do_set_python_command_from_python () def setUp (self): diff --git a/lldb/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py b/lldb/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py index ca95f36e838..e5fda67c212 100644 --- a/lldb/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py +++ b/lldb/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py @@ -12,17 +12,9 @@ class RegexpBreakCommandTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym(self): + def test(self): """Test _regexp-break command.""" - self.buildDsym() - self.regexp_break_command() - - @dwarf_test - def test_with_dwarf(self): - """Test _regexp-break command.""" - self.buildDwarf() + self.build() self.regexp_break_command() def setUp(self): diff --git a/lldb/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py b/lldb/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py index a60a917e8af..1aa01542075 100644 --- a/lldb/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py +++ b/lldb/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py @@ -12,48 +12,23 @@ class BreakpointConditionsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_breakpoint_condition_with_dsym_and_run_command(self): - """Exercise breakpoint condition with 'breakpoint modify -c <expr> id'.""" - self.buildDsym() - self.breakpoint_conditions() - - @skipUnlessDarwin - @dsym_test - def test_breakpoint_condition_inline_with_dsym_and_run_command(self): - """Exercise breakpoint condition inline with 'breakpoint set'.""" - self.buildDsym() - self.breakpoint_conditions(inline=True) - - @skipUnlessDarwin - @python_api_test - @dsym_test - def test_breakpoint_condition_with_dsym_and_python_api(self): - """Use Python APIs to set breakpoint conditions.""" - self.buildDsym() - self.breakpoint_conditions_python() - - @dwarf_test @skipIfWindows # Requires EE to support COFF on Windows (http://llvm.org/pr22232) - def test_breakpoint_condition_with_dwarf_and_run_command(self): + def test_breakpoint_condition_and_run_command(self): """Exercise breakpoint condition with 'breakpoint modify -c <expr> id'.""" - self.buildDwarf() + self.build() self.breakpoint_conditions() - @dwarf_test @skipIfWindows # Requires EE to support COFF on Windows (http://llvm.org/pr22232) - def test_breakpoint_condition_inline_with_dwarf_and_run_command(self): + def test_breakpoint_condition_inline_and_run_command(self): """Exercise breakpoint condition inline with 'breakpoint set'.""" - self.buildDwarf() + self.build() self.breakpoint_conditions(inline=True) - @python_api_test - @dwarf_test @skipIfWindows # Requires EE to support COFF on Windows (http://llvm.org/pr22232) - def test_breakpoint_condition_with_dwarf_and_python_api(self): + @python_api_test + def test_breakpoint_condition_and_python_api(self): """Use Python APIs to set breakpoint conditions.""" - self.buildDwarf() + self.build() self.breakpoint_conditions_python() def setUp(self): diff --git a/lldb/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py b/lldb/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py index 23d7e8a8884..efab6fba918 100644 --- a/lldb/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py +++ b/lldb/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py @@ -12,18 +12,9 @@ class BreakpointIDTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym (self): - self.buildDsym () - self.breakpoint_id_tests () + def test (self): + self.build() - @dwarf_test - def test_with_dwarf (self): - self.buildDwarf () - self.breakpoint_id_tests () - - def breakpoint_id_tests (self): exe = os.path.join (os.getcwd(), "a.out") self.expect("file " + exe, patterns = [ "Current executable set to .*a.out" ]) diff --git a/lldb/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py b/lldb/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py index 7655af396ab..6daa68d8a45 100644 --- a/lldb/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py +++ b/lldb/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py @@ -12,32 +12,15 @@ class BreakpointIgnoreCountTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): + def test_with_run_command(self): """Exercise breakpoint ignore count with 'breakpoint set -i <count>'.""" - self.buildDsym() + self.build() self.breakpoint_ignore_count() - @skipUnlessDarwin @python_api_test - @dsym_test - def test_with_dsym_and_python_api(self): + def test_with_python_api(self): """Use Python APIs to set breakpoint ignore count.""" - self.buildDsym() - self.breakpoint_ignore_count_python() - - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Exercise breakpoint ignore count with 'breakpoint set -i <count>'.""" - self.buildDwarf() - self.breakpoint_ignore_count() - - @python_api_test - @dwarf_test - def test_with_dwarf_and_python_api(self): - """Use Python APIs to set breakpoint ignore count.""" - self.buildDwarf() + self.build() self.breakpoint_ignore_count_python() def setUp(self): diff --git a/lldb/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py b/lldb/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py index 27d91adccdc..4e957111221 100644 --- a/lldb/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py +++ b/lldb/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py @@ -12,18 +12,10 @@ class BreakpointLocationsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym(self): - """Test breakpoint enable/disable for a breakpoint ID with multiple locations.""" - self.buildDsym() - self.breakpoint_locations_test() - - @dwarf_test @expectedFailureWindows("llvm.org/pr24528") - def test_with_dwarf(self): + def test(self): """Test breakpoint enable/disable for a breakpoint ID with multiple locations.""" - self.buildDwarf() + self.build() self.breakpoint_locations_test() def setUp(self): diff --git a/lldb/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py b/lldb/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py index 2efa53aae5a..b71fbabea7e 100644 --- a/lldb/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py +++ b/lldb/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py @@ -12,17 +12,9 @@ class BreakpointOptionsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym(self): + def test(self): """Test breakpoint command for different options.""" - self.buildDsym() - self.breakpoint_options_test() - - @dwarf_test - def test_with_dwarf(self): - """Test breakpoint command for different options.""" - self.buildDwarf() + self.build() self.breakpoint_options_test() def setUp(self): diff --git a/lldb/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py b/lldb/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py index 67a29a4aeb5..d67c43ff56f 100644 --- a/lldb/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py +++ b/lldb/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py @@ -24,27 +24,24 @@ class CompDirSymLinkTestCase(TestBase): self.line = line_number(_SRC_FILE, '// Set break point at this line.') self.src_path = os.path.join(os.getcwd(), _SRC_FILE) - @dwarf_test @skipIfHostWindows def test_symlink_paths_set(self): pwd_symlink = self.create_src_symlink() - self.build(pwd_symlink) + self.doBuild(pwd_symlink) self.runCmd("settings set %s %s" % (_COMP_DIR_SYM_LINK_PROP, pwd_symlink)) lldbutil.run_break_set_by_file_and_line(self, self.src_path, self.line) - @dwarf_test @skipUnlessHostLinux def test_symlink_paths_set_procselfcwd(self): pwd_symlink = '/proc/self/cwd' - self.build(pwd_symlink) + self.doBuild(pwd_symlink) self.runCmd("settings set %s %s" % (_COMP_DIR_SYM_LINK_PROP, pwd_symlink)) lldbutil.run_break_set_by_file_and_line(self, self.src_path, self.line) - @dwarf_test @skipIfHostWindows def test_symlink_paths_unset(self): pwd_symlink = self.create_src_symlink() - self.build(pwd_symlink) + self.doBuild(pwd_symlink) self.runCmd('settings clear ' + _COMP_DIR_SYM_LINK_PROP) self.assertRaises(AssertionError, lldbutil.run_break_set_by_file_and_line, self, self.src_path, self.line) @@ -54,8 +51,8 @@ class CompDirSymLinkTestCase(TestBase): self.addTearDownHook(lambda: os.remove(pwd_symlink)) return pwd_symlink - def build(self, pwd_symlink): - self.buildDwarf(None, None, {'PWD': pwd_symlink}, True) + def doBuild(self, pwd_symlink): + self.build(None, None, {'PWD': pwd_symlink}, True) exe = os.path.join(os.getcwd(), _EXE_NAME) self.runCmd('file ' + exe, CURRENT_EXECUTABLE_SET) diff --git a/lldb/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py b/lldb/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py index fe1459fe4ed..5f94352953a 100644 --- a/lldb/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py +++ b/lldb/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py @@ -10,17 +10,9 @@ class ConsecutiveBreakpoitsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test @unittest2.expectedFailure("llvm.org/pr23478") - def test_with_dsym (self): - self.buildDsym () - self.consecutive_breakpoints_tests() - - @dwarf_test - @unittest2.expectedFailure("llvm.org/pr23478") - def test_with_dwarf (self): - self.buildDwarf () + def test (self): + self.build () self.consecutive_breakpoints_tests() def consecutive_breakpoints_tests(self): diff --git a/lldb/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py b/lldb/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py index 8fcd08b324a..23ccbb54078 100644 --- a/lldb/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py +++ b/lldb/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py @@ -12,16 +12,9 @@ class TestCPPBreakpointLocations(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym (self): - self.buildDsym () - self.breakpoint_id_tests () - - @dwarf_test @expectedFailureWindows("llvm.org/pr24764") - def test_with_dwarf (self): - self.buildDwarf () + def test (self): + self.build () self.breakpoint_id_tests () def verify_breakpoint_locations(self, target, bp_dict): diff --git a/lldb/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py b/lldb/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py index 5078fcd24cf..aa52a2cf1a5 100644 --- a/lldb/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py +++ b/lldb/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py @@ -14,20 +14,11 @@ class TestCPPExceptionBreakpoint (TestBase): mydir = TestBase.compute_mydir(__file__) my_var = 10 - @skipUnlessDarwin - @python_api_test - @dsym_test - def test_cpp_exception_breakpoint (self): - """Test setting and hitting the C++ exception breakpoint.""" - self.buildDsym() - self.do_cpp_exception_bkpt () - @python_api_test @expectedFailureWindows("llvm.org/pr24538") # clang-cl does not support throw or catch - @dwarf_test - def test_cpp_exception_breakpoint_with_dwarf(self): + def test_cpp_exception_breakpoint(self): """Test setting and hitting the C++ exception breakpoint.""" - self.buildDwarf() + self.build() self.do_cpp_exception_bkpt () def setUp (self): diff --git a/lldb/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py b/lldb/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py index de532c85724..65197ed5290 100644 --- a/lldb/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py +++ b/lldb/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py @@ -12,17 +12,9 @@ class BreakpointInDummyTarget (TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym(self): + def test(self): """Test breakpoint set before we have a target. """ - self.buildDsym() - self.dummy_breakpoint_test() - - @dwarf_test - def test_with_dwarf(self): - """Test breakpoint set before we have a target. """ - self.buildDwarf() + self.build() self.dummy_breakpoint_test() def setUp(self): diff --git a/lldb/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py b/lldb/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py index d3549dcd293..5681b1281c7 100644 --- a/lldb/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py +++ b/lldb/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py @@ -14,17 +14,9 @@ class InlinedBreakpointsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): + def test_with_run_command(self): """Test 'b basic_types.cpp:176' does break (where int.cpp includes basic_type.cpp).""" - self.buildDsym() - self.inlined_breakpoints() - - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test 'b basic_types.cpp:176' does break (where int.cpp includes basic_type.cpp).""" - self.buildDwarf() + self.build() self.inlined_breakpoints() def setUp(self): diff --git a/lldb/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py b/lldb/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py index 1c823799138..6feb31a13fe 100644 --- a/lldb/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py +++ b/lldb/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py @@ -16,17 +16,9 @@ class TestObjCBreakpoints(TestBase): mydir = TestBase.compute_mydir(__file__) - @dsym_test - def test_break_with_dsym(self): - """Test setting Objective C specific breakpoints (dSYM).""" - self.buildDsym() - self.setTearDownCleanup() - self.check_objc_breakpoints(True) - - @dwarf_test - def test_break_with_dwarf(self): + def test_break(self): """Test setting Objective C specific breakpoints (DWARF in .o files).""" - self.buildDwarf() + self.build() self.setTearDownCleanup() self.check_objc_breakpoints(False) diff --git a/lldb/test/functionalities/command_history/TestCommandHistory.py b/lldb/test/functionalities/command_history/TestCommandHistory.py index 0644f4b643a..6cca992ced3 100644 --- a/lldb/test/functionalities/command_history/TestCommandHistory.py +++ b/lldb/test/functionalities/command_history/TestCommandHistory.py @@ -11,6 +11,7 @@ class CommandHistoryTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) + @no_debug_info_test def test_history(self): self.runCmd('command history --clear', inHistory=False) self.runCmd('breakpoint list', check=False, inHistory=True) #0 diff --git a/lldb/test/functionalities/command_regex/TestCommandRegex.py b/lldb/test/functionalities/command_regex/TestCommandRegex.py index 5db123c4ba9..93c0aa4fed5 100644 --- a/lldb/test/functionalities/command_regex/TestCommandRegex.py +++ b/lldb/test/functionalities/command_regex/TestCommandRegex.py @@ -12,6 +12,7 @@ class CommandRegexTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows") + @no_debug_info_test def test_command_regex(self): """Test a simple scenario of 'command regex' invocation and subsequent use.""" import pexpect diff --git a/lldb/test/functionalities/command_script/TestCommandScript.py b/lldb/test/functionalities/command_script/TestCommandScript.py index 61685d833ec..40d0b694fa9 100644 --- a/lldb/test/functionalities/command_script/TestCommandScript.py +++ b/lldb/test/functionalities/command_script/TestCommandScript.py @@ -11,15 +11,8 @@ class CmdPythonTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym (self): - self.buildDsym () - self.pycmd_tests () - - @dwarf_test - def test_with_dwarf (self): - self.buildDwarf () + def test (self): + self.build () self.pycmd_tests () def pycmd_tests (self): diff --git a/lldb/test/functionalities/command_script/import/TestImport.py b/lldb/test/functionalities/command_script/import/TestImport.py index 393285b7c6c..a00db8e7dfe 100644 --- a/lldb/test/functionalities/command_script/import/TestImport.py +++ b/lldb/test/functionalities/command_script/import/TestImport.py @@ -10,6 +10,7 @@ class ImportTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @python_api_test + @no_debug_info_test def test_import_command(self): """Import some Python scripts by path and test them""" self.run_test() diff --git a/lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py b/lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py index c3ee8ffbeed..17368197e0b 100644 --- a/lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py +++ b/lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py @@ -10,6 +10,7 @@ class Rdar12586188TestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @python_api_test + @no_debug_info_test def test_rdar12586188_command(self): """Check that we handle an ImportError in a special way when command script importing files.""" self.run_test() diff --git a/lldb/test/functionalities/command_source/TestCommandSource.py b/lldb/test/functionalities/command_source/TestCommandSource.py index 413b3446aca..122d4c69d88 100644 --- a/lldb/test/functionalities/command_source/TestCommandSource.py +++ b/lldb/test/functionalities/command_source/TestCommandSource.py @@ -13,6 +13,7 @@ class CommandSourceTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) + @no_debug_info_test def test_command_source(self): """Test that lldb command "command source" works correctly.""" diff --git a/lldb/test/functionalities/completion/TestCompletion.py b/lldb/test/functionalities/completion/TestCompletion.py index 5af1edb4a50..638c8947e6f 100644 --- a/lldb/test/functionalities/completion/TestCompletion.py +++ b/lldb/test/functionalities/completion/TestCompletion.py @@ -22,18 +22,21 @@ class CommandLineCompletionTestCase(TestBase): @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_at(self): """Test that 'at' completes to 'attach '.""" self.complete_from_to('at', 'attach ') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_de(self): """Test that 'de' completes to 'detach '.""" self.complete_from_to('de', 'detach ') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_process_attach_dash_dash_con(self): """Test that 'process attach --con' completes to 'process attach --continue '.""" self.complete_from_to('process attach --con', 'process attach --continue ') @@ -41,6 +44,7 @@ class CommandLineCompletionTestCase(TestBase): # <rdar://problem/11052829> @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_infinite_loop_while_completing(self): """Test that 'process print hello\' completes to itself and does not infinite loop.""" self.complete_from_to('process print hello\\', 'process print hello\\', @@ -48,126 +52,147 @@ class CommandLineCompletionTestCase(TestBase): @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_watchpoint_co(self): """Test that 'watchpoint co' completes to 'watchpoint command '.""" self.complete_from_to('watchpoint co', 'watchpoint command ') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_watchpoint_command_space(self): """Test that 'watchpoint command ' completes to ['Available completions:', 'add', 'delete', 'list'].""" self.complete_from_to('watchpoint command ', ['Available completions:', 'add', 'delete', 'list']) @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_watchpoint_command_a(self): """Test that 'watchpoint command a' completes to 'watchpoint command add '.""" self.complete_from_to('watchpoint command a', 'watchpoint command add ') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_watchpoint_set_variable_dash_w(self): """Test that 'watchpoint set variable -w' completes to 'watchpoint set variable -w '.""" self.complete_from_to('watchpoint set variable -w', 'watchpoint set variable -w ') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_watchpoint_set_variable_dash_w_space(self): """Test that 'watchpoint set variable -w ' completes to ['Available completions:', 'read', 'write', 'read_write'].""" self.complete_from_to('watchpoint set variable -w ', ['Available completions:', 'read', 'write', 'read_write']) @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_watchpoint_set_ex(self): """Test that 'watchpoint set ex' completes to 'watchpoint set expression '.""" self.complete_from_to('watchpoint set ex', 'watchpoint set expression ') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_watchpoint_set_var(self): """Test that 'watchpoint set var' completes to 'watchpoint set variable '.""" self.complete_from_to('watchpoint set var', 'watchpoint set variable ') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_watchpoint_set_variable_dash_w_read_underbar(self): """Test that 'watchpoint set variable -w read_' completes to 'watchpoint set variable -w read_write'.""" self.complete_from_to('watchpoint set variable -w read_', 'watchpoint set variable -w read_write') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_help_fi(self): """Test that 'help fi' completes to ['Available completions:', 'file', 'finish'].""" self.complete_from_to('help fi', ['Available completions:', 'file', 'finish']) @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_help_watchpoint_s(self): """Test that 'help watchpoint s' completes to 'help watchpoint set '.""" self.complete_from_to('help watchpoint s', 'help watchpoint set ') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_settings_append_target_er(self): """Test that 'settings append target.er' completes to 'settings append target.error-path'.""" self.complete_from_to('settings append target.er', 'settings append target.error-path') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_settings_insert_after_target_en(self): """Test that 'settings insert-after target.env' completes to 'settings insert-after target.env-vars'.""" self.complete_from_to('settings insert-after target.env', 'settings insert-after target.env-vars') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_settings_insert_before_target_en(self): """Test that 'settings insert-before target.env' completes to 'settings insert-before target.env-vars'.""" self.complete_from_to('settings insert-before target.env', 'settings insert-before target.env-vars') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_settings_replace_target_ru(self): """Test that 'settings replace target.ru' completes to 'settings replace target.run-args'.""" self.complete_from_to('settings replace target.ru', 'settings replace target.run-args') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_settings_s(self): """Test that 'settings s' completes to ['Available completions:', 'set', 'show'].""" self.complete_from_to('settings s', ['Available completions:', 'set', 'show']) @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_settings_set_th(self): """Test that 'settings set th' completes to 'settings set thread-format'.""" self.complete_from_to('settings set th', 'settings set thread-format') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_settings_s_dash(self): """Test that 'settings set -' completes to 'settings set -g'.""" self.complete_from_to('settings set -', 'settings set -g') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_settings_clear_th(self): """Test that 'settings clear th' completes to 'settings clear thread-format'.""" self.complete_from_to('settings clear th', 'settings clear thread-format') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_settings_set_ta(self): """Test that 'settings set ta' completes to 'settings set target.'.""" self.complete_from_to('settings set ta', 'settings set target.') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_settings_set_target_exec(self): """Test that 'settings set target.exec' completes to 'settings set target.exec-search-paths '.""" self.complete_from_to('settings set target.exec', 'settings set target.exec-search-paths') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_settings_set_target_pr(self): """Test that 'settings set target.pr' completes to ['Available completions:', 'target.prefer-dynamic-value', 'target.process.'].""" @@ -178,18 +203,21 @@ class CommandLineCompletionTestCase(TestBase): @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_settings_set_target_process(self): """Test that 'settings set target.process' completes to 'settings set target.process.'.""" self.complete_from_to('settings set target.process', 'settings set target.process.') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_settings_set_target_process_dot(self): """Test that 'settings set target.process.t' completes to 'settings set target.process.thread.'.""" self.complete_from_to('settings set target.process.t', 'settings set target.process.thread.') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_settings_set_target_process_thread_dot(self): """Test that 'settings set target.process.thread.' completes to ['Available completions:', 'target.process.thread.step-avoid-regexp', 'target.process.thread.trace-thread'].""" @@ -200,6 +228,7 @@ class CommandLineCompletionTestCase(TestBase): @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_target_space(self): """Test that 'target ' completes to ['Available completions:', 'create', 'delete', 'list', 'modules', 'select', 'stop-hook', 'variable'].""" @@ -209,29 +238,21 @@ class CommandLineCompletionTestCase(TestBase): @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_target_create_dash_co(self): """Test that 'target create --co' completes to 'target variable --core '.""" self.complete_from_to('target create --co', 'target create --core ') @expectedFailureHostWindows("llvm.org/pr24679") @skipIfFreeBSD # timing out on the FreeBSD buildbot + @no_debug_info_test def test_target_va(self): """Test that 'target va' completes to 'target variable '.""" self.complete_from_to('target va', 'target variable ') - @skipUnlessDarwin - @dsym_test - def test_symbol_name_dsym(self): - self.buildDsym() - self.complete_from_to('''file a.out - breakpoint set -n Fo''', - 'breakpoint set -n Foo::Bar(int,\\ int)', - turn_off_re_match=True) - @expectedFailureHostWindows("llvm.org/pr24679") - @dwarf_test - def test_symbol_name_dwarf(self): - self.buildDwarf() + def test_symbol_name(self): + self.build() self.complete_from_to('''file a.out breakpoint set -n Fo''', 'breakpoint set -n Foo::Bar(int,\\ int)', diff --git a/lldb/test/functionalities/conditional_break/TestConditionalBreak.py b/lldb/test/functionalities/conditional_break/TestConditionalBreak.py index 2ebb4719dde..4ca3a010550 100644 --- a/lldb/test/functionalities/conditional_break/TestConditionalBreak.py +++ b/lldb/test/functionalities/conditional_break/TestConditionalBreak.py @@ -17,33 +17,16 @@ class ConditionalBreakTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @python_api_test - @dsym_test - def test_with_dsym_python(self): - """Exercise some thread and frame APIs to break if c() is called by a().""" - self.buildDsym() - self.do_conditional_break() - @expectedFailureWindows("llvm.org/pr24778") @python_api_test - @dwarf_test - def test_with_dwarf_python(self): + def test_with_python(self): """Exercise some thread and frame APIs to break if c() is called by a().""" - self.buildDwarf() + self.build() self.do_conditional_break() - @skipUnlessDarwin - @dsym_test - def test_with_dsym_command(self): - """Simulate a user using lldb commands to break on c() if called from a().""" - self.buildDsym() - self.simulate_conditional_break_by_user() - - @dwarf_test - def test_with_dwarf_command(self): + def test_with_command(self): """Simulate a user using lldb commands to break on c() if called from a().""" - self.buildDwarf() + self.build() self.simulate_conditional_break_by_user() def do_conditional_break(self): diff --git a/lldb/test/functionalities/connect_remote/TestConnectRemote.py b/lldb/test/functionalities/connect_remote/TestConnectRemote.py index f7c40b4b823..2486afd4832 100644 --- a/lldb/test/functionalities/connect_remote/TestConnectRemote.py +++ b/lldb/test/functionalities/connect_remote/TestConnectRemote.py @@ -16,6 +16,7 @@ class ConnectRemoteTestCase(TestBase): @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows") @expectedFailureLinux("llvm.org/pr23475") # Test occasionally times out on the Linux build bot @skipIfLinux # Test occasionally times out on the Linux build bot + @no_debug_info_test def test_connect_remote(self): """Test "process connect connect:://localhost:[port]".""" diff --git a/lldb/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py b/lldb/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py index 092737b3ac2..4464ba0b127 100644 --- a/lldb/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py +++ b/lldb/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py @@ -14,17 +14,9 @@ class DataFormatterBoolRefPtr(TestBase): mydir = TestBase.compute_mydir(__file__) @skipUnlessDarwin - @dsym_test - def test_boolrefptr_with_dsym_and_run_command(self): + def test_boolrefptr_with_run_command(self): """Test the formatters we use for BOOL& and BOOL* in Objective-C.""" - self.buildDsym() - self.boolrefptr_data_formatter_commands() - - @skipUnlessDarwin - @dwarf_test - def test_boolrefptr_with_dwarf_and_run_command(self): - """Test the formatters we use for BOOL& and BOOL* in Objective-C.""" - self.buildDwarf() + self.build() self.boolrefptr_data_formatter_commands() def setUp(self): diff --git a/lldb/test/functionalities/data-formatter/compactvectors/TestCompactVectors.py b/lldb/test/functionalities/data-formatter/compactvectors/TestCompactVectors.py index 35a5ebe7ec6..eeb5ffbcff1 100644 --- a/lldb/test/functionalities/data-formatter/compactvectors/TestCompactVectors.py +++ b/lldb/test/functionalities/data-formatter/compactvectors/TestCompactVectors.py @@ -12,28 +12,16 @@ class CompactVectorsFormattingTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @skipUnlessDarwin - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + @skipUnlessDarwin + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py b/lldb/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py index 702563a20ae..97dcb7447b8 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py @@ -12,27 +12,15 @@ class AdvDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py b/lldb/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py index 299e3222d4a..6aa51e012b8 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py @@ -12,27 +12,15 @@ class CategoriesDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py b/lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py index 6ac9d1ddee4..259abc030f2 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py @@ -12,28 +12,16 @@ class CppDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test - @expectedFailureWindows("llvm.org/pr24462") # Data formatters have problems on Windows - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + @expectedFailureWindows("llvm.org/pr24462") # Data formatters have problems on Windows + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py b/lldb/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py index 25cea2a0b01..e15f17d82ff 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py @@ -12,28 +12,16 @@ class DataFormatterDisablingTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test - @expectedFailureWindows("llvm.org/pr24462") # Data formatters have problems on Windows - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + @expectedFailureWindows("llvm.org/pr24462") # Data formatters have problems on Windows + def test_with_run_command(self): """Check that we can properly disable all data formatter categories.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-enum-format/TestDataFormatterEnumFormat.py b/lldb/test/functionalities/data-formatter/data-formatter-enum-format/TestDataFormatterEnumFormat.py index 98891e539c2..4c3d390025a 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-enum-format/TestDataFormatterEnumFormat.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-enum-format/TestDataFormatterEnumFormat.py @@ -12,27 +12,15 @@ class EnumFormatTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py b/lldb/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py index 0b5817fccbe..44ed11b0ed3 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py @@ -12,27 +12,15 @@ class GlobalsDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py b/lldb/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py index 64e68e5e320..12f59b7c2de 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py @@ -12,27 +12,15 @@ class NamedSummariesDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py b/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py index 89ccd5f1da0..3aae3e5a201 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py @@ -15,180 +15,81 @@ class ObjCDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @skipUnlessDarwin - @dsym_test - def test_plain_objc_with_dsym_and_run_command(self): + def test_plain_objc_with_run_command(self): """Test basic ObjC formatting behavior.""" - self.buildDsym() + self.build() self.plain_data_formatter_commands() - @skipUnlessDarwin - @dwarf_test - def test_plain_objc_with_dwarf_and_run_command(self): - """Test basic ObjC formatting behavior.""" - self.buildDwarf() - self.plain_data_formatter_commands() - - def appkit_tester_impl(self,builder,commands): - builder() + def appkit_tester_impl(self,commands): + self.build() self.appkit_common_data_formatters_command() commands() @skipUnlessDarwin - @dsym_test - def test_nsnumber_with_dsym_and_run_command(self): - """Test formatters for NSNumber.""" - self.appkit_tester_impl(self.buildDsym,self.nsnumber_data_formatter_commands) - - @skipUnlessDarwin - @dwarf_test - def test_nsnumber_with_dwarf_and_run_command(self): + def test_nsnumber_with_run_command(self): """Test formatters for NSNumber.""" - self.appkit_tester_impl(self.buildDwarf,self.nsnumber_data_formatter_commands) - - @skipUnlessDarwin - @dsym_test - def test_nscontainers_with_dsym_and_run_command(self): - """Test formatters for NS container classes.""" - self.appkit_tester_impl(self.buildDsym,self.nscontainers_data_formatter_commands) + self.appkit_tester_impl(self.nsnumber_data_formatter_commands) @skipUnlessDarwin - @dwarf_test - def test_nscontainers_with_dwarf_and_run_command(self): + def test_nscontainers_with_run_command(self): """Test formatters for NS container classes.""" - self.appkit_tester_impl(self.buildDwarf,self.nscontainers_data_formatter_commands) - - - @skipUnlessDarwin - @dsym_test - def test_nsdata_with_dsym_and_run_command(self): - """Test formatters for NSData.""" - self.appkit_tester_impl(self.buildDsym,self.nsdata_data_formatter_commands) + self.appkit_tester_impl(self.nscontainers_data_formatter_commands) @skipUnlessDarwin - @dwarf_test - def test_nsdata_with_dwarf_and_run_command(self): + def test_nsdata_with_run_command(self): """Test formatters for NSData.""" - self.appkit_tester_impl(self.buildDwarf,self.nsdata_data_formatter_commands) - - - @skipUnlessDarwin - @dsym_test - def test_nsurl_with_dsym_and_run_command(self): - """Test formatters for NSURL.""" - self.appkit_tester_impl(self.buildDsym,self.nsurl_data_formatter_commands) + self.appkit_tester_impl(self.nsdata_data_formatter_commands) @skipUnlessDarwin - @dwarf_test - def test_nsurl_with_dwarf_and_run_command(self): + def test_nsurl_with_run_command(self): """Test formatters for NSURL.""" - self.appkit_tester_impl(self.buildDwarf,self.nsurl_data_formatter_commands) + self.appkit_tester_impl(self.nsurl_data_formatter_commands) @skipUnlessDarwin - @dsym_test - def test_nserror_with_dsym_and_run_command(self): + def test_nserror_with_run_command(self): """Test formatters for NSError.""" - self.appkit_tester_impl(self.buildDsym,self.nserror_data_formatter_commands) - - @skipUnlessDarwin - @dwarf_test - def test_nserror_with_dwarf_and_run_command(self): - """Test formatters for NSError.""" - self.appkit_tester_impl(self.buildDwarf,self.nserror_data_formatter_commands) + self.appkit_tester_impl(self.nserror_data_formatter_commands) @skipUnlessDarwin - @dsym_test - def test_nsbundle_with_dsym_and_run_command(self): + def test_nsbundle_with_run_command(self): """Test formatters for NSBundle.""" - self.appkit_tester_impl(self.buildDsym,self.nsbundle_data_formatter_commands) - - @skipUnlessDarwin - @dwarf_test - def test_nsbundle_with_dwarf_and_run_command(self): - """Test formatters for NSBundle.""" - self.appkit_tester_impl(self.buildDwarf,self.nsbundle_data_formatter_commands) + self.appkit_tester_impl(self.nsbundle_data_formatter_commands) @skipUnlessDarwin - @dsym_test - def test_nsexception_with_dsym_and_run_command(self): + def test_nsexception_with_run_command(self): """Test formatters for NSException.""" - self.appkit_tester_impl(self.buildDsym,self.nsexception_data_formatter_commands) + self.appkit_tester_impl(self.nsexception_data_formatter_commands) @skipUnlessDarwin - @dwarf_test - def test_nsexception_with_dwarf_and_run_command(self): - """Test formatters for NSException.""" - self.appkit_tester_impl(self.buildDwarf,self.nsexception_data_formatter_commands) - - - @skipUnlessDarwin - @dsym_test - def test_nsmisc_with_dsym_and_run_command(self): - """Test formatters for misc NS classes.""" - self.appkit_tester_impl(self.buildDsym,self.nsmisc_data_formatter_commands) - - @skipUnlessDarwin - @dwarf_test - def test_nsmisc_with_dwarf_and_run_command(self): + def test_nsmisc_with_run_command(self): """Test formatters for misc NS classes.""" - self.appkit_tester_impl(self.buildDwarf,self.nsmisc_data_formatter_commands) + self.appkit_tester_impl(self.nsmisc_data_formatter_commands) @skipUnlessDarwin - @dsym_test - def test_nsdate_with_dsym_and_run_command(self): + def test_nsdate_with_run_command(self): """Test formatters for NSDate.""" - self.appkit_tester_impl(self.buildDsym,self.nsdate_data_formatter_commands) - - @skipUnlessDarwin - @dwarf_test - def test_nsdate_with_dwarf_and_run_command(self): - """Test formatters for NSDate.""" - self.appkit_tester_impl(self.buildDwarf,self.nsdate_data_formatter_commands) - - - @skipUnlessDarwin - @dsym_test - def test_coreframeworks_with_dsym_and_run_command(self): - """Test formatters for Core OSX frameworks.""" - self.buildDsym() - self.cf_data_formatter_commands() + self.appkit_tester_impl(self.nsdate_data_formatter_commands) @skipUnlessDarwin - @dwarf_test - def test_coreframeworks_with_dwarf_and_run_command(self): + def test_coreframeworks_and_run_command(self): """Test formatters for Core OSX frameworks.""" - self.buildDwarf() + self.build() self.cf_data_formatter_commands() @skipUnlessDarwin - @dsym_test - def test_kvo_with_dsym_and_run_command(self): + def test_kvo_with_run_command(self): """Test the behavior of formatters when KVO is in use.""" - self.buildDsym() + self.build() self.kvo_data_formatter_commands() @skipUnlessDarwin - @dwarf_test - def test_kvo_with_dwarf_and_run_command(self): - """Test the behavior of formatters when KVO is in use.""" - self.buildDwarf() - self.kvo_data_formatter_commands() - - @skipUnlessDarwin - @dsym_test - def test_expr_with_dsym_and_run_command(self): - """Test common cases of expression parser <--> formatters interaction.""" - self.buildDsym() - self.expr_objc_data_formatter_commands() - - @skipUnlessDarwin - @dwarf_test - def test_expr_with_dwarf_and_run_command(self): + def test_expr_with_run_command(self): """Test common cases of expression parser <--> formatters interaction.""" - self.buildDwarf() + self.build() self.expr_objc_data_formatter_commands() def setUp(self): diff --git a/lldb/test/functionalities/data-formatter/data-formatter-objc/nsstring/TestDataFormatterNSString.py b/lldb/test/functionalities/data-formatter/data-formatter-objc/nsstring/TestDataFormatterNSString.py index 563ba5a21bb..fb0442957ce 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-objc/nsstring/TestDataFormatterNSString.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-objc/nsstring/TestDataFormatterNSString.py @@ -14,8 +14,8 @@ class NSStringDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - def appkit_tester_impl(self,builder,commands): - builder() + def appkit_tester_impl(self,commands): + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True) @@ -40,40 +40,19 @@ class NSStringDataFormatterTestCase(TestBase): commands() @skipUnlessDarwin - @dsym_test - def test_nsstring_with_dsym_and_run_command(self): + def test_nsstring_with_run_command(self): """Test formatters for NSString.""" - self.appkit_tester_impl(self.buildDsym,self.nsstring_data_formatter_commands) + self.appkit_tester_impl(self.nsstring_data_formatter_commands) @skipUnlessDarwin - @dwarf_test - def test_nsstring_with_dwarf_and_run_command(self): - """Test formatters for NSString.""" - self.appkit_tester_impl(self.buildDwarf,self.nsstring_data_formatter_commands) - - @skipUnlessDarwin - @dsym_test - def test_rdar11106605_with_dsym_and_run_command(self): + def test_rdar11106605_with_run_command(self): """Check that Unicode characters come out of CFString summary correctly.""" - self.appkit_tester_impl(self.buildDsym,self.rdar11106605_commands) - - @skipUnlessDarwin - @dwarf_test - def test_rdar11106605_with_dwarf_and_run_command(self): - """Check that Unicode characters come out of CFString summary correctly.""" - self.appkit_tester_impl(self.buildDwarf,self.rdar11106605_commands) - - @skipUnlessDarwin - @dsym_test - def test_nsstring_withNULs_with_dsym_and_run_command(self): - """Test formatters for NSString.""" - self.appkit_tester_impl(self.buildDsym,self.nsstring_withNULs_commands) + self.appkit_tester_impl(self.rdar11106605_commands) @skipUnlessDarwin - @dwarf_test - def test_nsstring_withNULS_with_dwarf_and_run_command(self): + def test_nsstring_withNULS_with_run_command(self): """Test formatters for NSString.""" - self.appkit_tester_impl(self.buildDwarf,self.nsstring_withNULs_commands) + self.appkit_tester_impl(self.nsstring_withNULs_commands) def setUp(self): diff --git a/lldb/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py b/lldb/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py index b3cbeb43e10..42e1c469b5d 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py @@ -14,17 +14,9 @@ class DataFormatterOneIsSingularTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @skipUnlessDarwin - @dsym_test - def test_one_is_singular_with_dsym_and_run_command(self): + def test_one_is_singular_with_run_command(self): """Test that 1 item is not as reported as 1 items.""" - self.buildDsym() - self.oneness_data_formatter_commands() - - @skipUnlessDarwin - @dwarf_test - def test_one_is_singular_with_dwarf_and_run_command(self): - """Test that 1 item is not as reported as 1 items.""" - self.buildDwarf() + self.build() self.oneness_data_formatter_commands() def setUp(self): diff --git a/lldb/test/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py b/lldb/test/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py index 5f8997984f5..172cfdd1a8d 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py @@ -12,17 +12,9 @@ class PtrToArrayDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): + def test_with_run_command(self): """Test that LLDB handles the clang typeclass Paren correctly.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test that LLDB handles the clang typeclass Paren correctly.""" - self.buildDwarf() + self.build() self.data_formatter_commands() def setUp(self): diff --git a/lldb/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py b/lldb/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py index fad6d4a05b1..f6a3e2d14d4 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py @@ -12,31 +12,15 @@ class PythonSynthDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - @skipIfFreeBSD # llvm.org/pr20545 bogus output confuses buildbot parser - @dwarf_test - def test_with_dwarf_and_run_command(self): + def test_with_run_command(self): """Test data formatter commands.""" - self.buildDwarf() + self.build() self.data_formatter_commands() - @skipUnlessDarwin - @dsym_test - def test_rdar10960550_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.rdar10960550_formatter_commands() - - @dwarf_test - def test_rdar10960550_with_dwarf_and_run_command(self): + def test_rdar10960550_with_run_command(self): """Test data formatter commands.""" - self.buildDwarf() + self.build() self.rdar10960550_formatter_commands() diff --git a/lldb/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py b/lldb/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py index a23fa2c9adc..4eecda472c0 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py @@ -12,17 +12,9 @@ class ScriptDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): + def test_with_run_command(self): """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() + self.build() self.data_formatter_commands() def setUp(self): diff --git a/lldb/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py b/lldb/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py index 2d56af303fc..5ef92574c51 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py @@ -12,19 +12,11 @@ class SkipSummaryDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - @expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot @expectedFailureWindows("llvm.org/pr24462") # Data formatters have problems on Windows - @dwarf_test - def test_with_dwarf_and_run_command(self): + def test_with_run_command(self): """Test data formatter commands.""" - self.buildDwarf() + self.build() self.data_formatter_commands() def setUp(self): diff --git a/lldb/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py b/lldb/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py index 1984cf09c5e..e4eb325bbcc 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py @@ -12,18 +12,10 @@ class SmartArrayDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test @expectedFailureWindows("llvm.org/pr24462") # Data formatters have problems on Windows - def test_with_dwarf_and_run_command(self): + def test_with_run_command(self): """Test data formatter commands.""" - self.buildDwarf() + self.build() self.data_formatter_commands() def setUp(self): diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py index 6b9c875ac44..7abb6eded71 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py @@ -12,28 +12,12 @@ class InitializerListTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - @skipIfWindows # libc++ not ported to Windows yet @skipIfGcc @expectedFailureLinux # fails on clang 3.5 and tot - @dwarf_test - def test_with_dwarf(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - - def setUp(self): - # Call super's setUp(). - TestBase.setUp(self) - - def data_formatter_commands(self): + def test(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+")) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py index 2e4c43b4108..82ff6d131bb 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py @@ -12,29 +12,17 @@ class LibcxxIteratorDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @skipIfGcc - @skipIfWindows # libc++ not ported to Windows yet - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + @skipIfGcc + @skipIfWindows # libc++ not ported to Windows yet + def test_with_run_command(self): """Test that libc++ iterators format properly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+")) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py index c1b10a09371..3390ae3d01c 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py @@ -12,21 +12,6 @@ class LibcxxListDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @skipIfGcc - @skipIfWindows # libc++ not ported to Windows yet - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) @@ -36,8 +21,11 @@ class LibcxxListDataFormatterTestCase(TestBase): self.line3 = line_number('main.cpp', '// Set third break point at this line.') self.line4 = line_number('main.cpp', '// Set fourth break point at this line.') - def data_formatter_commands(self): + @skipIfGcc + @skipIfWindows # libc++ not ported to Windows yet + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+")) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py index 934d03afa2f..25565bf4045 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py @@ -12,27 +12,11 @@ class LibcxxMapDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - @skipIfGcc @skipIfWindows # libc++ not ported to Windows yet - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - - def setUp(self): - # Call super's setUp(). - TestBase.setUp(self) - - def data_formatter_commands(self): + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+")) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py index 36dfa583d1e..ebd74fb839f 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py @@ -12,27 +12,11 @@ class LibcxxMultiMapDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - @skipIfWindows # libc++ not ported to Windows yet @skipIfGcc - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - - def setUp(self): - # Call super's setUp(). - TestBase.setUp(self) - - def data_formatter_commands(self): + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+")) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py index 16e377936dd..68d1c9e77ed 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py @@ -12,27 +12,11 @@ class LibcxxMultiSetDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - @skipIfGcc @skipIfWindows # libc++ not ported to Windows yet - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - - def setUp(self): - # Call super's setUp(). - TestBase.setUp(self) - - def data_formatter_commands(self): + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+")) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py index 5b034e987ed..e6ceff983b5 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py @@ -12,27 +12,11 @@ class LibcxxSetDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - @skipIfGcc @skipIfWindows # libc++ not ported to Windows yet - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - - def setUp(self): - # Call super's setUp(). - TestBase.setUp(self) - - def data_formatter_commands(self): + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+")) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py index 448c33344bb..ee050cdfd56 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py @@ -13,29 +13,17 @@ class LibcxxStringDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @skipIfGcc - @skipIfWindows # libc++ not ported to Windows yet - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + @skipIfGcc + @skipIfWindows # libc++ not ported to Windows yet + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+")) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py index 6399fce99a4..04caa51b98c 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py @@ -12,31 +12,11 @@ class LibcxxUnorderedDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test @skipIfWindows # libc++ not ported to Windows yet @skipIfGcc - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - - def setUp(self): - # Call super's setUp(). - TestBase.setUp(self) - - def look_for_content_and_continue(self, var_name, patterns): - self.expect( ("frame variable %s" % var_name), patterns=patterns) - self.runCmd("continue") - - def data_formatter_commands(self): + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+")) @@ -87,6 +67,10 @@ class LibcxxUnorderedDataFormatterTestCase(TestBase): ['size=5 {', '(\[\d\] = "is"(\\n|.)+){2}', '(\[\d\] = "world"(\\n|.)+){2}']) + def look_for_content_and_continue(self, var_name, patterns): + self.expect( ("frame variable %s" % var_name), patterns=patterns) + self.runCmd("continue") + if __name__ == '__main__': import atexit lldb.SBDebugger.Initialize() diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py index 99ca5da7cd1..92368d13225 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py @@ -12,29 +12,17 @@ class LibcxxVBoolDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @skipIfGcc - @skipIfWindows # libc++ not ported to Windows. - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + @skipIfGcc + @skipIfWindows # libc++ not ported to Windows. + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+")) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py index a6ac38ee621..5cec93ed61e 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py @@ -12,27 +12,11 @@ class LibcxxVectorDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - @skipIfGcc @skipIfWindows # libc++ not ported to Windows yet - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - - def setUp(self): - # Call super's setUp(). - TestBase.setUp(self) - - def data_formatter_commands(self): + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+")) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py index ea835a7833f..9b830787152 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py @@ -12,30 +12,18 @@ class StdIteratorDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test - @skipIfWindows # libstdcpp not ported to Windows - @expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot - @expectedFailureIcc # llvm.org/pr15301 LLDB prints incorrect sizes of STL containers - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + @skipIfWindows # libstdcpp not ported to Windows + @expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot + @expectedFailureIcc # llvm.org/pr15301 LLDB prints incorrect sizes of STL containers + def test_with_run_command(self): """Test that libstdcpp iterators format properly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=-1) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py index 1d1202a0677..f82caa85a4b 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py @@ -12,21 +12,6 @@ class StdListDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test - @skipIfWindows # libstdcpp not ported to Windows - @expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) @@ -35,8 +20,11 @@ class StdListDataFormatterTestCase(TestBase): self.optional_line = line_number('main.cpp', '// Optional break point at this line.') self.final_line = line_number('main.cpp', '// Set final break point at this line.') - def data_formatter_commands(self): + @skipIfWindows # libstdcpp not ported to Windows + @expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=-1) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py index c80a3c2427d..0a2cdf1c0c0 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py @@ -12,30 +12,18 @@ class StdMapDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @expectedFailureIcc # llvm.org/pr15301: LLDB prints incorrect size of libstdc++ containers - @skipIfWindows # libstdcpp not ported to Windows - @skipIfFreeBSD - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + @expectedFailureIcc # llvm.org/pr15301: LLDB prints incorrect size of libstdc++ containers + @skipIfWindows # libstdcpp not ported to Windows + @skipIfFreeBSD + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_source_regexp (self, "Set break point at this line.") diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py index 5c0c2498954..b34e0e430bf 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py @@ -13,29 +13,17 @@ class StdStringDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot - @skipIfWindows # libstdcpp not ported to Windows - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + @expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot + @skipIfWindows # libstdcpp not ported to Windows + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=-1) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py index b8052dc8326..ec34c528ad3 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py @@ -12,32 +12,19 @@ class StdVBoolDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - @skipIfDarwin - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot - @dwarf_test - @skipIfWindows # libstdcpp not ported to Windows. - @skipIfDarwin - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') + @expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot @expectedFailureIcc # llvm.org/pr15301: lldb does not print the correct sizes of STL containers when building with ICC - def data_formatter_commands(self): + @skipIfWindows # libstdcpp not ported to Windows. + @skipIfDarwin + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=-1) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py index 9c74cac3c3c..c268317144b 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py @@ -12,30 +12,18 @@ class StdVectorDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test - @skipIfFreeBSD - @expectedFailureIcc # llvm.org/pr15301 LLDB prints incorrect sizes of STL containers - @skipIfWindows # libstdcpp not ported to Windows - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + @skipIfFreeBSD + @expectedFailureIcc # llvm.org/pr15301 LLDB prints incorrect sizes of STL containers + @skipIfWindows # libstdcpp not ported to Windows + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_source_regexp (self, "Set break point at this line.") diff --git a/lldb/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py b/lldb/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py index 6592641cde2..dc125366da0 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py @@ -12,28 +12,16 @@ class SynthDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test - @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["x86_64","i386"]) - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["x86_64","i386"]) + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py b/lldb/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py index a7dd95ad220..cdff8e4b745 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py @@ -12,29 +12,17 @@ class DataFormatterSynthValueTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test using Python synthetic children provider to provide a value.""" - self.buildDsym() - self.data_formatter_commands() - - @skipIfFreeBSD # llvm.org/pr20545 bogus output confuses buildbot parser - @expectedFailureWindows("llvm.org/pr24462") # Data formatters have problems on Windows - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test using Python synthetic children provider to provide a value.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', 'break here') - def data_formatter_commands(self): + @skipIfFreeBSD # llvm.org/pr20545 bogus output confuses buildbot parser + @expectedFailureWindows("llvm.org/pr24462") # Data formatters have problems on Windows + def test_with_run_command(self): """Test using Python synthetic children provider to provide a value.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py b/lldb/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py index cc670569d72..6a949ff0373 100644 --- a/lldb/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py +++ b/lldb/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py @@ -12,29 +12,16 @@ class FormatPropagationTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - # rdar://problem/14035604 - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Check if changing Format on an SBValue correctly propagates that new format to children as it should""" - self.buildDsym() - self.propagate_test_commands() - - # rdar://problem/14035604 - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Check if changing Format on an SBValue correctly propagates that new format to children as it should""" - self.buildDwarf() - self.propagate_test_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def propagate_test_commands(self): + # rdar://problem/14035604 + def test_with_run_command(self): """Check for an issue where capping does not work because the Target pointer appears to be changing behind our backs.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/frameformat_smallstruct/TestFrameFormatSmallStruct.py b/lldb/test/functionalities/data-formatter/frameformat_smallstruct/TestFrameFormatSmallStruct.py index 7580a5f86b7..1e9008ac7db 100644 --- a/lldb/test/functionalities/data-formatter/frameformat_smallstruct/TestFrameFormatSmallStruct.py +++ b/lldb/test/functionalities/data-formatter/frameformat_smallstruct/TestFrameFormatSmallStruct.py @@ -12,27 +12,15 @@ class FrameFormatSmallStructTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test that the user can input a format but it will not prevail over summary format's choices.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test that the user can input a format but it will not prevail over summary format's choices.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + def test_with_run_command(self): """Test that the user can input a format but it will not prevail over summary format's choices.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/hexcaps/TestDataFormatterHexCaps.py b/lldb/test/functionalities/data-formatter/hexcaps/TestDataFormatterHexCaps.py index de283da9c6c..dc486c7bf2a 100644 --- a/lldb/test/functionalities/data-formatter/hexcaps/TestDataFormatterHexCaps.py +++ b/lldb/test/functionalities/data-formatter/hexcaps/TestDataFormatterHexCaps.py @@ -12,27 +12,15 @@ class DataFormatterHexCapsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py b/lldb/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py index 08260c5e787..a5f01088e14 100644 --- a/lldb/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py +++ b/lldb/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py @@ -13,28 +13,16 @@ class NSArraySyntheticTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_rdar11086338_with_dsym_and_run_command(self): - """Test that NSArray reports its synthetic children properly.""" - self.buildDsym() - self.rdar11086338_tester() - - @skipUnlessDarwin - @dwarf_test - def test_rdar11086338_with_dwarf_and_run_command(self): - """Test that NSArray reports its synthetic children properly.""" - self.buildDwarf() - self.rdar11086338_tester() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.m', '// Set break point at this line.') - def rdar11086338_tester(self): + @skipUnlessDarwin + def test_rdar11086338_with_run_command(self): """Test that NSArray reports its synthetic children properly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py b/lldb/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py index 032ca1cf7a5..188c450fb29 100644 --- a/lldb/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py +++ b/lldb/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py @@ -13,28 +13,16 @@ class NSDictionarySyntheticTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_rdar11988289_with_dsym_and_run_command(self): - """Test that NSDictionary reports its synthetic children properly.""" - self.buildDsym() - self.rdar11988289_tester() - - @skipUnlessDarwin - @dwarf_test - def test_rdar11988289_with_dwarf_and_run_command(self): - """Test that NSDictionary reports its synthetic children properly.""" - self.buildDwarf() - self.rdar11988289_tester() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.m', '// Set break point at this line.') - def rdar11988289_tester(self): + @skipUnlessDarwin + def test_rdar11988289_with_run_command(self): """Test that NSDictionary reports its synthetic children properly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py b/lldb/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py index de1138d2a45..5a5203c0998 100644 --- a/lldb/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py +++ b/lldb/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py @@ -13,28 +13,16 @@ class NSSetSyntheticTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_rdar12529957_with_dsym_and_run_command(self): - """Test that NSSet reports its synthetic children properly.""" - self.buildDsym() - self.rdar12529957_tester() - - @skipUnlessDarwin - @dwarf_test - def test_rdar12529957_with_dwarf_and_run_command(self): - """Test that NSSet reports its synthetic children properly.""" - self.buildDwarf() - self.rdar12529957_tester() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.m', '// Set break point at this line.') - def rdar12529957_tester(self): + @skipUnlessDarwin + def test_rdar12529957_with_run_command(self): """Test that NSSet reports its synthetic children properly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/ostypeformatting/TestFormattersBoolRefPtr.py b/lldb/test/functionalities/data-formatter/ostypeformatting/TestFormattersBoolRefPtr.py index f0584c89ed2..afca9bd0493 100644 --- a/lldb/test/functionalities/data-formatter/ostypeformatting/TestFormattersBoolRefPtr.py +++ b/lldb/test/functionalities/data-formatter/ostypeformatting/TestFormattersBoolRefPtr.py @@ -13,28 +13,16 @@ class DataFormatterOSTypeTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_ostype_with_dsym_and_run_command(self): - """Test the formatters we use for OSType.""" - self.buildDsym() - self.ostype_data_formatter_commands() - - @skipUnlessDarwin - @dwarf_test - def test_ostype_with_dwarf_and_run_command(self): - """Test the formatters we use for OSType.""" - self.buildDwarf() - self.ostype_data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.mm', '// Set break point at this line.') - def ostype_data_formatter_commands(self): + @skipUnlessDarwin + def test_ostype_with_run_command(self): """Test the formatters we use for OSType.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.mm", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/ptr_ref_typedef/TestPtrRef2Typedef.py b/lldb/test/functionalities/data-formatter/ptr_ref_typedef/TestPtrRef2Typedef.py index ad086e6e1a9..7bac2cfae21 100644 --- a/lldb/test/functionalities/data-formatter/ptr_ref_typedef/TestPtrRef2Typedef.py +++ b/lldb/test/functionalities/data-formatter/ptr_ref_typedef/TestPtrRef2Typedef.py @@ -12,27 +12,15 @@ class PtrRef2TypedefTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set breakpoint here') - - def data_formatter_commands(self): + + def test_with_run_command(self): """Test that a pointer/reference to a typedef is formatted as we want.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py b/lldb/test/functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py index 237099d7bdd..e9927f13b1a 100644 --- a/lldb/test/functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py +++ b/lldb/test/functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py @@ -12,27 +12,15 @@ class DataFormatterRefPtrRecursionTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test that ValueObjectPrinter does not cause an infinite loop when a reference to a struct that contains a pointer to itself is printed.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test that ValueObjectPrinter does not cause an infinite loop when a reference to a struct that contains a pointer to itself is printed.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + def test_with_run_command(self): """Test that ValueObjectPrinter does not cause an infinite loop when a reference to a struct that contains a pointer to itself is printed.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py b/lldb/test/functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py index 326edf1a5a9..6dc9e1216a2 100644 --- a/lldb/test/functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py +++ b/lldb/test/functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py @@ -13,27 +13,15 @@ class Radar9974002DataFormatterTestCase(TestBase): # test for rdar://problem/9974002 () mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() if "clang" in self.getCompiler() and "3.4" in self.getCompilerVersion(): self.skipTest("llvm.org/pr16214 -- clang emits partial DWARF for structures referenced via typedef") diff --git a/lldb/test/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py b/lldb/test/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py index b054d487b01..bf18d44b2cc 100644 --- a/lldb/test/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py +++ b/lldb/test/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py @@ -12,27 +12,15 @@ class SyntheticCappingTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Check for an issue where capping does not work because the Target pointer appears to be changing behind our backs.""" - self.buildDsym() - self.capping_test_commands() - - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Check for an issue where capping does not work because the Target pointer appears to be changing behind our backs.""" - self.buildDwarf() - self.capping_test_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def capping_test_commands(self): + def test_with_run_command(self): """Check for an issue where capping does not work because the Target pointer appears to be changing behind our backs.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py b/lldb/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py index fd24740c3cd..eb3859c8106 100644 --- a/lldb/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py +++ b/lldb/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py @@ -13,28 +13,16 @@ class SyntheticFilterRecomputingTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_rdar12437442_with_dsym_and_run_command(self): - """Test that we update SBValues correctly as dynamic types change.""" - self.buildDsym() - self.rdar12437442_tester() - - @skipUnlessDarwin - @dwarf_test - def test_rdar12437442_with_dwarf_and_run_command(self): - """Test that we update SBValues correctly as dynamic types change.""" - self.buildDwarf() - self.rdar12437442_tester() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.m', '// Set break point at this line.') - def rdar12437442_tester(self): + @skipUnlessDarwin + def test_rdar12437442_with_run_command(self): """Test that we update SBValues correctly as dynamic types change.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/user-format-vs-summary/TestUserFormatVsSummary.py b/lldb/test/functionalities/data-formatter/user-format-vs-summary/TestUserFormatVsSummary.py index 7650c23bb51..63beed23274 100644 --- a/lldb/test/functionalities/data-formatter/user-format-vs-summary/TestUserFormatVsSummary.py +++ b/lldb/test/functionalities/data-formatter/user-format-vs-summary/TestUserFormatVsSummary.py @@ -12,27 +12,15 @@ class UserFormatVSSummaryTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test that the user can input a format but it will not prevail over summary format's choices.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test that the user can input a format but it will not prevail over summary format's choices.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + def test_with_run_command(self): """Test that the user can input a format but it will not prevail over summary format's choices.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/var-in-aggregate-misuse/TestVarInAggregateMisuse.py b/lldb/test/functionalities/data-formatter/var-in-aggregate-misuse/TestVarInAggregateMisuse.py index ffa2fc9177c..d3eaa1dbb35 100644 --- a/lldb/test/functionalities/data-formatter/var-in-aggregate-misuse/TestVarInAggregateMisuse.py +++ b/lldb/test/functionalities/data-formatter/var-in-aggregate-misuse/TestVarInAggregateMisuse.py @@ -12,28 +12,15 @@ class VarInAggregateMisuseTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def data_formatter_commands(self): + def test_with_run_command(self): """Test that that file and class static variables display correctly.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py b/lldb/test/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py index 66f597d3493..777dc29cb3e 100644 --- a/lldb/test/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py +++ b/lldb/test/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py @@ -13,28 +13,16 @@ class PythonSynthDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test data formatter commands.""" - self.buildDsym() - self.data_formatter_commands() - - @skipIfFreeBSD # llvm.org/pr20545 bogus output confuses buildbot parser - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test data formatter commands.""" - self.buildDwarf() - self.data_formatter_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', ' // Set breakpoint here.') - def data_formatter_commands(self): + @skipIfFreeBSD # llvm.org/pr20545 bogus output confuses buildbot parser + def test_with_run_command(self): """Test using Python synthetic children provider.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py b/lldb/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py index 61f96312cd6..58a31cedd0a 100644 --- a/lldb/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py +++ b/lldb/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py @@ -12,30 +12,17 @@ class VectorTypesFormattingTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - # rdar://problem/14035604 - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Check that vector types format properly""" - self.buildDsym() - self.propagate_test_commands() - - # rdar://problem/14035604 - @dwarf_test - @skipIf(compiler='gcc') # gcc don't have ext_vector_type extension - def test_with_dwarf_and_run_command(self): - """Check that vector types format properly""" - self.buildDwarf() - self.propagate_test_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// break here') - def propagate_test_commands(self): + # rdar://problem/14035604 + @skipIf(compiler='gcc') # gcc don't have ext_vector_type extension + def test_with_run_command(self): """Check that vector types format properly""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/dead-strip/TestDeadStrip.py b/lldb/test/functionalities/dead-strip/TestDeadStrip.py index 27e6480431b..a9e24b5733c 100644 --- a/lldb/test/functionalities/dead-strip/TestDeadStrip.py +++ b/lldb/test/functionalities/dead-strip/TestDeadStrip.py @@ -12,23 +12,11 @@ class DeadStripTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym(self): - """Test breakpoint works correctly with dead-code stripping.""" - self.buildDsym() - self.dead_strip() - @expectedFailureWindows("llvm.org/pr24778") @skipIfFreeBSD # The -dead_strip linker option isn't supported on FreeBSD versions of ld. - @dwarf_test - def test_with_dwarf(self): - """Test breakpoint works correctly with dead-code stripping.""" - self.buildDwarf() - self.dead_strip() - - def dead_strip(self): + def test(self): """Test breakpoint works correctly with dead-code stripping.""" + self.build() exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) diff --git a/lldb/test/functionalities/disassembly/TestDisassembleBreakpoint.py b/lldb/test/functionalities/disassembly/TestDisassembleBreakpoint.py index 3d71f305d4e..fe7e3d674d7 100644 --- a/lldb/test/functionalities/disassembly/TestDisassembleBreakpoint.py +++ b/lldb/test/functionalities/disassembly/TestDisassembleBreakpoint.py @@ -12,19 +12,9 @@ class DisassemblyTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym (self): - self.buildDsym () - self.disassemble_breakpoint () - - @dwarf_test @expectedFailureWindows # Function name prints fully demangled instead of name-only - def test_with_dwarf (self): - self.buildDwarf () - self.disassemble_breakpoint () - - def disassemble_breakpoint (self): + def test(self): + self.build() exe = os.path.join (os.getcwd(), "a.out") self.expect("file " + exe, patterns = [ "Current executable set to .*a.out.*" ]) diff --git a/lldb/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py b/lldb/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py index 4fad3afc031..e6702638119 100644 --- a/lldb/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py +++ b/lldb/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py @@ -12,26 +12,6 @@ class DynamicValueChildCountTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @python_api_test - @dsym_test - @expectedFailurei386("to be figured out") - def test_get_dynamic_vals_with_dsym(self): - """Test fetching C++ dynamic values from pointers & references.""" - self.buildDsym(dictionary=self.getBuildFlags()) - self.do_get_dynamic_vals() - - @expectedFailureLinux("llvm.org/pr23039") - @expectedFailureFreeBSD("llvm.org/pr19311") # continue at a breakpoint does not work - @expectedFailureWindows("llvm.org/pr24663") - @python_api_test - @dwarf_test - @expectedFailurei386("to be figured out") - def test_get_dynamic_vals_with_dwarf(self): - """Test fetching C++ dynamic values from pointers & references.""" - self.buildDwarf(dictionary=self.getBuildFlags()) - self.do_get_dynamic_vals() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) @@ -47,11 +27,15 @@ class DynamicValueChildCountTestCase(TestBase): self.main_sixth_call_line = line_number('pass-to-base.cpp', '// Break here and check b has 0 children again') - - - - def do_get_dynamic_vals(self): + @expectedFailureLinux("llvm.org/pr23039") + @expectedFailureFreeBSD("llvm.org/pr19311") # continue at a breakpoint does not work + @expectedFailureWindows("llvm.org/pr24663") + @expectedFailurei386("to be figured out") + @python_api_test + def test_get_dynamic_vals(self): + """Test fetching C++ dynamic values from pointers & references.""" """Get argument vals for the call stack when stopped on a breakpoint.""" + self.build(dictionary=self.getBuildFlags()) exe = os.path.join(os.getcwd(), "a.out") # Create a target from the debugger. diff --git a/lldb/test/functionalities/embedded_interpreter/TestConvenienceVariables.py b/lldb/test/functionalities/embedded_interpreter/TestConvenienceVariables.py index 8b1ef5fbb94..0f66a3e7cb9 100644 --- a/lldb/test/functionalities/embedded_interpreter/TestConvenienceVariables.py +++ b/lldb/test/functionalities/embedded_interpreter/TestConvenienceVariables.py @@ -9,32 +9,19 @@ class ConvenienceVariablesCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - @skipIfRemote - def test_with_dsym_and_run_command(self): - """Test convenience variables lldb.debugger, lldb.target, lldb.process, lldb.thread, and lldb.frame.""" - self.buildDsym() - self.convenience_variables() - - @dwarf_test - @skipIfFreeBSD # llvm.org/pr17228 - @skipIfRemote - @expectedFailureAll("llvm.org/pr23560", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["i386"]) - @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows") - def test_with_dwarf_and_run_commands(self): - """Test convenience variables lldb.debugger, lldb.target, lldb.process, lldb.thread, and lldb.frame.""" - self.buildDwarf() - self.convenience_variables() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break on inside main.cpp. self.line = line_number('main.c', 'Hello world.') - def convenience_variables(self): + @skipIfFreeBSD # llvm.org/pr17228 + @skipIfRemote + @expectedFailureAll("llvm.org/pr23560", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["i386"]) + @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows") + def test_with_run_commands(self): """Test convenience variables lldb.debugger, lldb.target, lldb.process, lldb.thread, and lldb.frame.""" + self.build() import pexpect exe = os.path.join(os.getcwd(), "a.out") prompt = "(lldb) " diff --git a/lldb/test/functionalities/exec/TestExec.py b/lldb/test/functionalities/exec/TestExec.py index e5d19583ee3..c81ebefafb1 100644 --- a/lldb/test/functionalities/exec/TestExec.py +++ b/lldb/test/functionalities/exec/TestExec.py @@ -21,35 +21,19 @@ class ExecTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - - @skipUnlessDarwin - @dsym_test - def test_with_dsym (self): - if self.getArchitecture() == 'x86_64': - source = os.path.join (os.getcwd(), "main.cpp") - o_file = os.path.join (os.getcwd(), "main.o") - execute_command ("'%s' -g -O0 -arch i386 -arch x86_64 '%s' -c -o '%s'" % (os.environ["CC"], source, o_file)) - execute_command ("'%s' -g -O0 -arch i386 -arch x86_64 '%s'" % (os.environ["CC"], o_file)) - else: - self.buildDsym() - self.do_test () - - @skipUnlessDarwin - @dwarf_test - def test_with_dwarf (self): + def test(self): if self.getArchitecture() == 'x86_64': source = os.path.join (os.getcwd(), "main.cpp") o_file = os.path.join (os.getcwd(), "main.o") - dsym_path = os.path.join (os.getcwd(), "a.out.dSYM") execute_command ("'%s' -g -O0 -arch i386 -arch x86_64 '%s' -c -o '%s'" % (os.environ["CC"], source, o_file)) execute_command ("'%s' -g -O0 -arch i386 -arch x86_64 '%s'" % (os.environ["CC"], o_file)) - execute_command ("rm -rf '%s'" % (dsym_path)) + if self.debug_info != "dsym": + dsym_path = os.path.join (os.getcwd(), "a.out.dSYM") + execute_command ("rm -rf '%s'" % (dsym_path)) else: - self.buildDwarf() - self.do_test () + self.build() - def do_test (self): exe = os.path.join (os.getcwd(), "a.out") # Create the target diff --git a/lldb/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py b/lldb/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py index 19faf2a2b1b..76677ff2afb 100644 --- a/lldb/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py +++ b/lldb/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py @@ -15,28 +15,12 @@ class ExprDoesntDeadlockTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test that expr will time out and allow other threads to run if it blocks - with dsym.""" - self.buildDsym() - self.expr_doesnt_deadlock() - - @dwarf_test @expectedFailureFreeBSD('llvm.org/pr17946') @expectedFlakeyLinux # failed 1/365 test runs, line 61, thread.IsValid() @expectedFailureWindows # Windows doesn't have pthreads, need to port this test. - def test_with_dwarf_and_run_command(self): - """Test that expr will time out and allow other threads to run if it blocks.""" - self.buildDwarf() - self.expr_doesnt_deadlock() - - def setUp(self): - # Call super's setUp(). - TestBase.setUp(self) - - def expr_doesnt_deadlock (self): + def test_with_run_command(self): """Test that expr will time out and allow other threads to run if it blocks.""" + self.build() exe = os.path.join(os.getcwd(), "a.out") # Create a target by the debugger. diff --git a/lldb/test/functionalities/fat_archives/TestFatArchives.py b/lldb/test/functionalities/fat_archives/TestFatArchives.py index dc31738df2b..d4be28f7a56 100644 --- a/lldb/test/functionalities/fat_archives/TestFatArchives.py +++ b/lldb/test/functionalities/fat_archives/TestFatArchives.py @@ -22,8 +22,7 @@ class FatArchiveTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @skipUnlessDarwin - @dwarf_test - def test_with_dwarf (self): + def test (self): if self.getArchitecture() == 'x86_64': execute_command ("make CC='%s'" % (os.environ["CC"])) self.main () diff --git a/lldb/test/functionalities/format/TestFormats.py b/lldb/test/functionalities/format/TestFormats.py index a3ddf3f292d..878f276b234 100644 --- a/lldb/test/functionalities/format/TestFormats.py +++ b/lldb/test/functionalities/format/TestFormats.py @@ -14,7 +14,7 @@ class TestFormats(TestBase): @expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows") def test_formats(self): """Test format string functionality.""" - self.buildDwarf () + self.build() import pexpect prompt = "(lldb) " child = pexpect.spawn('%s %s -x -o "b main" -o r a.out' % (lldbtest_config.lldbExec, self.lldbOption)) diff --git a/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py b/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py index 31cfebff276..de74b7171d3 100644 --- a/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py +++ b/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py @@ -9,70 +9,46 @@ class AssertingInferiorTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - def test_inferior_asserting_dsym(self): - """Test that lldb reliably catches the inferior asserting (command).""" - self.buildDsym() - self.inferior_asserting() - @expectedFailurei386("llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly") @expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows") - def test_inferior_asserting_dwarf(self): + def test_inferior_asserting(self): """Test that lldb reliably catches the inferior asserting (command).""" - self.buildDwarf() + self.build() self.inferior_asserting() - @skipUnlessDarwin - def test_inferior_asserting_registers_dsym(self): - """Test that lldb reliably reads registers from the inferior after asserting (command).""" - self.buildDsym() - self.inferior_asserting_registers() - @expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows") @expectedFailureAndroid(api_levels=range(16 + 1)) # b.android.com/179836 - def test_inferior_asserting_register_dwarf(self): + def test_inferior_asserting_register(self): """Test that lldb reliably reads registers from the inferior after asserting (command).""" - self.buildDwarf() + self.build() self.inferior_asserting_registers() @expectedFailurei386("llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly") @expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows") def test_inferior_asserting_disassemble(self): """Test that lldb reliably disassembles frames after asserting (command).""" - self.buildDefault() + self.build() self.inferior_asserting_disassemble() @python_api_test @expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows") def test_inferior_asserting_python(self): """Test that lldb reliably catches the inferior asserting (Python API).""" - self.buildDefault() + self.build() self.inferior_asserting_python() - @skipUnlessDarwin - def test_inferior_asserting_expr_dsym(self): - """Test that the lldb expression interpreter can read from the inferior after asserting (command).""" - self.buildDsym() - self.inferior_asserting_expr() - @expectedFailurei386('llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly') @expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows") - def test_inferior_asserting_expr_dwarf(self): + def test_inferior_asserting_expr(self): """Test that the lldb expression interpreter can read from the inferior after asserting (command).""" - self.buildDwarf() + self.build() self.inferior_asserting_expr() - @skipUnlessDarwin - def test_inferior_asserting_step_dsym(self): - """Test that lldb functions correctly after stepping through a call to assert().""" - self.buildDsym() - self.inferior_asserting_step() - @expectedFailurei386("llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly") @expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows") - def test_inferior_asserting_step_dwarf(self): + def test_inferior_asserting_step(self): """Test that lldb functions correctly after stepping through a call to assert().""" - self.buildDwarf() + self.build() self.inferior_asserting_step() def set_breakpoint(self, line): diff --git a/lldb/test/functionalities/inferior-changed/TestInferiorChanged.py b/lldb/test/functionalities/inferior-changed/TestInferiorChanged.py index 5f47be70774..cd13b803c1a 100644 --- a/lldb/test/functionalities/inferior-changed/TestInferiorChanged.py +++ b/lldb/test/functionalities/inferior-changed/TestInferiorChanged.py @@ -10,21 +10,10 @@ class ChangedInferiorTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - def test_inferior_crashing_dsym(self): - """Test lldb reloads the inferior after it was changed during the session.""" - self.buildDsym() - self.inferior_crashing() - self.cleanup() - d = {'C_SOURCES': 'main2.c'} - self.buildDsym(dictionary=d) - self.setTearDownCleanup(dictionary=d) - self.inferior_not_crashing() - @skipIfHostWindows - def test_inferior_crashing_dwarf(self): + def test_inferior_crashing(self): """Test lldb reloads the inferior after it was changed during the session.""" - self.buildDwarf() + self.build() self.inferior_crashing() self.cleanup() # lldb needs to recognize the inferior has changed. If lldb needs to check the @@ -32,7 +21,7 @@ class ChangedInferiorTestCase(TestBase): # 1 second delay. time.sleep(1) d = {'C_SOURCES': 'main2.c'} - self.buildDwarf(dictionary=d) + self.build(dictionary=d) self.setTearDownCleanup(dictionary=d) self.inferior_not_crashing() diff --git a/lldb/test/functionalities/inferior-crashing/TestInferiorCrashing.py b/lldb/test/functionalities/inferior-crashing/TestInferiorCrashing.py index c300deea1ed..40d76884d88 100644 --- a/lldb/test/functionalities/inferior-crashing/TestInferiorCrashing.py +++ b/lldb/test/functionalities/inferior-crashing/TestInferiorCrashing.py @@ -9,88 +9,52 @@ class CrashingInferiorTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - def test_inferior_crashing_dsym(self): - """Test that lldb reliably catches the inferior crashing (command).""" - self.buildDsym() - self.inferior_crashing() - @expectedFailureFreeBSD("llvm.org/pr23699 SIGSEGV is reported as exception, not signal") @expectedFailureWindows("llvm.org/pr24778") # This actually works, but the test relies on the output format instead of the API - def test_inferior_crashing_dwarf(self): + def test_inferior_crashing(self): """Test that lldb reliably catches the inferior crashing (command).""" - self.buildDwarf() + self.build() self.inferior_crashing() - @skipUnlessDarwin - def test_inferior_crashing_registers_dsym(self): - """Test that lldb reliably reads registers from the inferior after crashing (command).""" - self.buildDsym() - self.inferior_crashing_registers() - @expectedFailureWindows("llvm.org/pr24778") - def test_inferior_crashing_register_dwarf(self): + def test_inferior_crashing_register(self): """Test that lldb reliably reads registers from the inferior after crashing (command).""" - self.buildDwarf() + self.build() self.inferior_crashing_registers() @python_api_test @expectedFailureWindows("llvm.org/pr24778") def test_inferior_crashing_python(self): """Test that lldb reliably catches the inferior crashing (Python API).""" - self.buildDefault() + self.build() self.inferior_crashing_python() - @skipUnlessDarwin - def test_inferior_crashing_expr_dsym(self): - """Test that the lldb expression interpreter can read from the inferior after crashing (command).""" - self.buildDsym() - self.inferior_crashing_expr() - @expectedFailureWindows("llvm.org/pr24778") - def test_inferior_crashing_expr_dwarf(self): + def test_inferior_crashing_expr(self): """Test that the lldb expression interpreter can read from the inferior after crashing (command).""" - self.buildDwarf() + self.build() self.inferior_crashing_expr() - @skipUnlessDarwin - def test_inferior_crashing_step_dsym(self): - """Test that lldb functions correctly after stepping through a crash.""" - self.buildDsym() - self.inferior_crashing_step() - @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["i386"]) @expectedFailureWindows("llvm.org/pr24778") - def test_inferior_crashing_step_dwarf(self): + def test_inferior_crashing_step(self): """Test that stepping after a crash behaves correctly.""" - self.buildDwarf() + self.build() self.inferior_crashing_step() - @skipUnlessDarwin - def test_inferior_crashing_step_after_break_dsym(self): - """Test that stepping after a crash behaves correctly.""" - self.buildDsym() - self.inferior_crashing_step_after_break() - @expectedFailureFreeBSD('llvm.org/pr24939') @expectedFailureWindows("llvm.org/pr24778") @expectedFailureAndroid(archs=['aarch64'], api_levels=range(21 + 1)) # No eh_frame for sa_restorer - def test_inferior_crashing_step_after_break_dwarf(self): + def test_inferior_crashing_step_after_break(self): """Test that lldb functions correctly after stepping through a crash.""" - self.buildDwarf() + self.build() self.inferior_crashing_step_after_break() - @skipUnlessDarwin - def test_inferior_crashing_expr_step_and_expr_dsym(self): - """Test that lldb expressions work before and after stepping after a crash.""" - self.buildDsym() - self.inferior_crashing_expr_step_expr() - @expectedFailureWindows("llvm.org/pr24778") @skipIfLinux # Inferior exits after stepping after a segfault. This is working as intended IMHO. - def test_inferior_crashing_expr_step_and_expr_dwarf(self): + def test_inferior_crashing_expr_step_and_expr(self): """Test that lldb expressions work before and after stepping after a crash.""" - self.buildDwarf() + self.build() self.inferior_crashing_expr_step_expr() def set_breakpoint(self, line): diff --git a/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py b/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py index 855c3cf5472..86eba5de4d5 100644 --- a/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py +++ b/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py @@ -10,87 +10,52 @@ class CrashingRecursiveInferiorTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - def test_recursive_inferior_crashing_dsym(self): - """Test that lldb reliably catches the inferior crashing (command).""" - self.buildDsym() - self.recursive_inferior_crashing() - @expectedFailureFreeBSD("llvm.org/pr23699 SIGSEGV is reported as exception, not signal") @expectedFailureWindows("llvm.org/pr24778") - def test_recursive_inferior_crashing_dwarf(self): + def test_recursive_inferior_crashing(self): """Test that lldb reliably catches the inferior crashing (command).""" - self.buildDwarf() + self.build() self.recursive_inferior_crashing() - @skipUnlessDarwin - def test_recursive_inferior_crashing_registers_dsym(self): - """Test that lldb reliably reads registers from the inferior after crashing (command).""" - self.buildDsym() - self.recursive_inferior_crashing_registers() - @expectedFailureWindows("llvm.org/pr24778") - def test_recursive_inferior_crashing_register_dwarf(self): + def test_recursive_inferior_crashing_register(self): """Test that lldb reliably reads registers from the inferior after crashing (command).""" - self.buildDwarf() + self.build() self.recursive_inferior_crashing_registers() @python_api_test @expectedFailureWindows("llvm.org/pr24778") def test_recursive_inferior_crashing_python(self): """Test that lldb reliably catches the inferior crashing (Python API).""" - self.buildDefault() + self.build() self.recursive_inferior_crashing_python() - @skipUnlessDarwin - def test_recursive_inferior_crashing_expr_dsym(self): - """Test that the lldb expression interpreter can read from the inferior after crashing (command).""" - self.buildDsym() - self.recursive_inferior_crashing_expr() - @expectedFailureWindows("llvm.org/pr24778") - def test_recursive_inferior_crashing_expr_dwarf(self): + def test_recursive_inferior_crashing_expr(self): """Test that the lldb expression interpreter can read from the inferior after crashing (command).""" - self.buildDwarf() + self.build() self.recursive_inferior_crashing_expr() - @skipUnlessDarwin - def test_recursive_inferior_crashing_step_dsym(self): - """Test that lldb functions correctly after stepping through a crash.""" - self.buildDsym() - self.recursive_inferior_crashing_step() - @expectedFailureWindows("llvm.org/pr24778") - def test_recursive_inferior_crashing_step_dwarf(self): + def test_recursive_inferior_crashing_step(self): """Test that stepping after a crash behaves correctly.""" - self.buildDwarf() + self.build() self.recursive_inferior_crashing_step() - @skipUnlessDarwin - def test_recursive_inferior_crashing_step_after_break_dsym(self): - """Test that stepping after a crash behaves correctly.""" - self.buildDsym() - self.recursive_inferior_crashing_step_after_break() - @expectedFailureFreeBSD('llvm.org/pr24939') @expectedFailureWindows("llvm.org/pr24778") @expectedFailureAndroid(archs=['aarch64'], api_levels=range(21 + 1)) # No eh_frame for sa_restorer - def test_recursive_inferior_crashing_step_after_break_dwarf(self): + def test_recursive_inferior_crashing_step_after_break(self): """Test that lldb functions correctly after stepping through a crash.""" - self.buildDwarf() + self.build() self.recursive_inferior_crashing_step_after_break() - @skipUnlessDarwin - def test_recursive_inferior_crashing_expr_step_and_expr_dsym(self): - """Test that lldb expressions work before and after stepping after a crash.""" - self.buildDsym() - self.recursive_inferior_crashing_expr_step_expr() - + @expectedFailureFreeBSD('llvm.org/pr15989') # Couldn't allocate space for the stack frame @skipIfLinux # Inferior exits after stepping after a segfault. This is working as intended IMHO. @expectedFailureWindows("llvm.org/pr24778") - def test_recursive_inferior_crashing_expr_step_and_expr_dwarf(self): + def test_recursive_inferior_crashing_expr_step_and_expr(self): """Test that lldb expressions work before and after stepping after a crash.""" - self.buildDwarf() + self.build() self.recursive_inferior_crashing_expr_step_expr() def set_breakpoint(self, line): diff --git a/lldb/test/functionalities/inline-stepping/TestInlineStepping.py b/lldb/test/functionalities/inline-stepping/TestInlineStepping.py index 6a597837698..6c2a31e3711 100644 --- a/lldb/test/functionalities/inline-stepping/TestInlineStepping.py +++ b/lldb/test/functionalities/inline-stepping/TestInlineStepping.py @@ -10,56 +10,29 @@ class TestInlineStepping(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin @python_api_test - @dsym_test - def test_with_dsym_and_python_api(self): - """Test stepping over and into inlined functions.""" - self.buildDsym() - self.inline_stepping() - - @python_api_test - @dwarf_test @expectedFailureFreeBSD('llvm.org/pr17214') @expectedFailureIcc # Not really a bug. ICC combines two inlined functions. @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["i386"]) @expectedFailureWindows("llvm.org/pr24778") # failed 1/365 dosep runs, (i386-clang), TestInlineStepping.py:237 failed to stop at first breakpoint in main @expectedFailureAll(oslist=["linux"], archs=["i386"]) - def test_with_dwarf_and_python_api(self): + def test_with_python_api(self): """Test stepping over and into inlined functions.""" - self.buildDwarf() + self.build() self.inline_stepping() - @skipUnlessDarwin - @python_api_test - @dsym_test - def test_step_over_with_dsym_and_python_api(self): - """Test stepping over and into inlined functions.""" - self.buildDsym() - self.inline_stepping_step_over() - @python_api_test - @dwarf_test @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["i386"]) - def test_step_over_with_dwarf_and_python_api(self): + def test_step_over_with_python_api(self): """Test stepping over and into inlined functions.""" - self.buildDwarf() + self.build() self.inline_stepping_step_over() - @skipUnlessDarwin - @python_api_test - @dsym_test - def test_step_in_template_with_dsym_and_python_api(self): - """Test stepping in to templated functions.""" - self.buildDsym() - self.step_in_template() - @python_api_test - @dwarf_test - def test_step_in_template_with_dwarf_and_python_api(self): + def test_step_in_template_with_python_api(self): """Test stepping in to templated functions.""" - self.buildDwarf() + self.build() self.step_in_template() def setUp(self): diff --git a/lldb/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py b/lldb/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py index e7168be4d2f..8a7b4d00a2c 100644 --- a/lldb/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py +++ b/lldb/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py @@ -14,20 +14,9 @@ class JITLoaderGDBTestCase(TestBase): @skipTestIfFn(lambda x: True, "llvm.org/pr24702", "Skipped because the test crashes the test runner") @unittest2.expectedFailure("llvm.org/pr24702") - @dsym_test - def test_bogus_values_with_dsym(self): - self.buildDsym() - self.bogus_values_test() - - @skipTestIfFn(lambda x: True, "llvm.org/pr24702", "Skipped because the test crashes the test runner") - @unittest2.expectedFailure("llvm.org/pr24702") - @dwarf_test - def test_bogus_values_with_dwarf(self): - self.buildDwarf() - self.bogus_values_test() - - def bogus_values_test(self): + def test_bogus_values(self): """Test that we handle inferior misusing the GDB JIT interface""" + self.build() exe = os.path.join(os.getcwd(), "a.out") # Create a target by the debugger. diff --git a/lldb/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py b/lldb/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py index 9d599c37791..f499178c3c2 100644 --- a/lldb/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py +++ b/lldb/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py @@ -13,23 +13,11 @@ class LaunchWithShellExpandTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - - @skipUnlessDarwin - @dsym_test - def test_with_dsym (self): - self.buildDsym() - self.do_test () - - @expectedFailureFreeBSD("llvm.org/pr22627 process launch w/ shell expansion not working") @expectedFailureLinux("llvm.org/pr22627 process launch w/ shell expansion not working") @expectedFailureWindows("llvm.org/pr24778") - @dwarf_test - def test_with_dwarf (self): - self.buildDwarf() - self.do_test () - - def do_test (self): + def test(self): + self.build() exe = os.path.join (os.getcwd(), "a.out") self.runCmd("target create %s" % exe) diff --git a/lldb/test/functionalities/load_unload/TestLoadUnload.py b/lldb/test/functionalities/load_unload/TestLoadUnload.py index f32749dcfd7..fa1455bdba9 100644 --- a/lldb/test/functionalities/load_unload/TestLoadUnload.py +++ b/lldb/test/functionalities/load_unload/TestLoadUnload.py @@ -75,7 +75,7 @@ class LoadUnloadTestCase(TestBase): """Test target modules list after loading a different copy of the library libd.dylib, and verifies that it works with 'target modules search-paths add'.""" # Invoke the default build rule. - self.buildDefault() + self.build() if self.platformIsDarwin(): dylibName = 'libloadunload_d.dylib' @@ -129,7 +129,7 @@ class LoadUnloadTestCase(TestBase): """Test (DY)LD_LIBRARY_PATH after moving libd.dylib, which defines d_function, somewhere else.""" # Invoke the default build rule. - self.buildDefault() + self.build() self.copy_shlibs_to_remote(hidden_dir=True) exe = os.path.join(os.getcwd(), "a.out") @@ -185,7 +185,7 @@ class LoadUnloadTestCase(TestBase): """Test that lldb process load/unload command work correctly.""" # Invoke the default build rule. - self.buildDefault() + self.build() self.copy_shlibs_to_remote() exe = os.path.join(os.getcwd(), "a.out") @@ -245,7 +245,7 @@ class LoadUnloadTestCase(TestBase): """Test breakpoint by name works correctly with dlopen'ing.""" # Invoke the default build rule. - self.buildDefault() + self.build() self.copy_shlibs_to_remote() exe = os.path.join(os.getcwd(), "a.out") @@ -288,7 +288,7 @@ class LoadUnloadTestCase(TestBase): """Test stepping over code that loads a shared library works correctly.""" # Invoke the default build rule. - self.buildDefault() + self.build() self.copy_shlibs_to_remote() exe = os.path.join(os.getcwd(), "a.out") diff --git a/lldb/test/functionalities/longjmp/TestLongjmp.py b/lldb/test/functionalities/longjmp/TestLongjmp.py index ace7ad62c80..3fd06f258fb 100644 --- a/lldb/test/functionalities/longjmp/TestLongjmp.py +++ b/lldb/test/functionalities/longjmp/TestLongjmp.py @@ -21,7 +21,7 @@ class LongjmpTestCase(TestBase): @expectedFailureWindows("llvm.org/pr24778") def test_step_out(self): """Test stepping when the inferior calls setjmp/longjmp, in particular, thread step-out.""" - self.buildDefault() + self.build() self.step_out() @skipIfDarwin # llvm.org/pr16769: LLDB on Mac OS X dies in function ReadRegisterBytes in GDBRemoteRegisterContext.cpp @@ -30,7 +30,7 @@ class LongjmpTestCase(TestBase): @expectedFailureWindows("llvm.org/pr24778") def test_step_over(self): """Test stepping when the inferior calls setjmp/longjmp, in particular, thread step-over a longjmp.""" - self.buildDefault() + self.build() self.step_over() @skipIfDarwin # llvm.org/pr16769: LLDB on Mac OS X dies in function ReadRegisterBytes in GDBRemoteRegisterContext.cpp @@ -39,7 +39,7 @@ class LongjmpTestCase(TestBase): @expectedFailureWindows("llvm.org/pr24778") def test_step_back_out(self): """Test stepping when the inferior calls setjmp/longjmp, in particular, thread step-out after thread step-in.""" - self.buildDefault() + self.build() self.step_back_out() def start_test(self, symbol): diff --git a/lldb/test/functionalities/memory/read/TestMemoryRead.py b/lldb/test/functionalities/memory/read/TestMemoryRead.py index 427a8d4f504..67cf389d20d 100644 --- a/lldb/test/functionalities/memory/read/TestMemoryRead.py +++ b/lldb/test/functionalities/memory/read/TestMemoryRead.py @@ -13,28 +13,16 @@ class MemoryReadTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_memory_read_with_dsym(self): - """Test the 'memory read' command with plain and vector formats.""" - self.buildDsym() - self.memory_read_command() - - @dwarf_test - @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["i386"]) - def test_memory_read_with_dwarf(self): - """Test the 'memory read' command with plain and vector formats.""" - self.buildDwarf() - self.memory_read_command() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break inside main(). self.line = line_number('main.cpp', '// Set break point at this line.') - def memory_read_command(self): + @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["i386"]) + def test_memory_read(self): """Test the 'memory read' command with plain and vector formats.""" + self.build() exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) diff --git a/lldb/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py b/lldb/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py index d2a127e999d..786102eae81 100644 --- a/lldb/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py +++ b/lldb/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py @@ -18,13 +18,9 @@ class NonOverlappingIndexVariableCase(TestBase): # rdar://problem/9890530 def test_eval_index_variable(self): """Test expressions of variable 'i' which appears in two for loops.""" - self.buildDefault() + self.build() self.exe_name = 'a.out' - self.eval_index_variable_i(self.exe_name) - - def eval_index_variable_i(self, exe_name): - """Test expressions of variable 'i' which appears in two for loops.""" - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), self.exe_name) self.runCmd("file %s" % exe, CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, self.source, self.line_to_break, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/nosucharch/TestNoSuchArch.py b/lldb/test/functionalities/nosucharch/TestNoSuchArch.py index 06eb0dc9db2..cda0cd6606e 100644 --- a/lldb/test/functionalities/nosucharch/TestNoSuchArch.py +++ b/lldb/test/functionalities/nosucharch/TestNoSuchArch.py @@ -10,32 +10,17 @@ class NoSuchArchTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - - @skipUnlessDarwin - @dsym_test - def test_with_dsym (self): - self.buildDsym() - self.do_test () - - - @skipUnlessDarwin - @dwarf_test - def test_with_dwarf (self): - self.buildDwarf() - self.do_test () - - def do_test (self): + def test (self): + self.build() exe = os.path.join (os.getcwd(), "a.out") - + # Check that passing an invalid arch via the command-line fails but doesn't crash self.expect("target crete --arch nothingtoseehere %s" % (exe), error=True) - - + # Check that passing an invalid arch via the SB API fails but doesn't crash target = self.dbg.CreateTargetWithFileAndArch(exe,"nothingtoseehere") - self.assertFalse(target.IsValid(), "This target should not be valid") - + # Now just create the target with the default arch and check it's fine target = self.dbg.CreateTarget(exe) self.assertTrue(target.IsValid(), "This target should now be valid") diff --git a/lldb/test/functionalities/object-file/TestImageListMultiArchitecture.py b/lldb/test/functionalities/object-file/TestImageListMultiArchitecture.py index aa1a6f01653..165a41fdffa 100644 --- a/lldb/test/functionalities/object-file/TestImageListMultiArchitecture.py +++ b/lldb/test/functionalities/object-file/TestImageListMultiArchitecture.py @@ -15,10 +15,7 @@ class TestImageListMultiArchitecture(TestBase): mydir = TestBase.compute_mydir(__file__) - def setUp(self): - # Call super's setUp(). - TestBase.setUp(self) - + @no_debug_info_test def test_image_list_shows_multiple_architectures(self): """Test that image list properly shows the correct architecture for a set of different architecture object files.""" images = { diff --git a/lldb/test/functionalities/paths/TestPaths.py b/lldb/test/functionalities/paths/TestPaths.py index bc37ea6cce7..c581cccc8e7 100644 --- a/lldb/test/functionalities/paths/TestPaths.py +++ b/lldb/test/functionalities/paths/TestPaths.py @@ -13,6 +13,7 @@ class TestPaths(TestBase): mydir = TestBase.compute_mydir(__file__) + @no_debug_info_test def test_paths (self): '''Test to make sure no file names are set in the lldb.SBFileSpec objects returned by lldb.SBHostOS.GetLLDBPath() for paths that are directories''' dir_path_types = [lldb.ePathTypeLLDBShlibDir, @@ -28,6 +29,7 @@ class TestPaths(TestBase): # No directory path types should have the filename set self.assertTrue (f.GetFilename() == None); + @no_debug_info_test def test_directory_doesnt_end_with_slash(self): current_directory_spec = lldb.SBFileSpec(os.path.curdir) current_directory_string = current_directory_spec.GetDirectory() @@ -35,6 +37,7 @@ class TestPaths(TestBase): pass @skipUnlessPlatform(["windows"]) + @no_debug_info_test def test_windows_double_slash (self): '''Test to check the path with double slash is handled correctly ''' # Create a path and see if lldb gets the directory and file right diff --git a/lldb/test/functionalities/platform/TestPlatformCommand.py b/lldb/test/functionalities/platform/TestPlatformCommand.py index 5bf81260267..c7afacf5478 100644 --- a/lldb/test/functionalities/platform/TestPlatformCommand.py +++ b/lldb/test/functionalities/platform/TestPlatformCommand.py @@ -11,26 +11,32 @@ class PlatformCommandTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) + @no_debug_info_test def test_help_platform(self): self.runCmd("help platform") + @no_debug_info_test def test_list(self): self.expect("platform list", patterns = ['^Available platforms:']) + @no_debug_info_test def test_process_list(self): self.expect("platform process list", substrs = ['PID', 'TRIPLE', 'NAME']) + @no_debug_info_test def test_process_info_with_no_arg(self): """This is expected to fail and to return a proper error message.""" self.expect("platform process info", error=True, substrs = ['one or more process id(s) must be specified']) + @no_debug_info_test def test_status(self): self.expect("platform status", substrs = ['Platform', 'Triple', 'OS Version', 'Kernel', 'Hostname']) + @no_debug_info_test def test_shell(self): """ Test that the platform shell command can invoke ls. """ triple = self.dbg.GetSelectedPlatform().GetTriple() @@ -41,12 +47,14 @@ class PlatformCommandTestCase(TestBase): else: self.expect("platform shell ls /", substrs = ["dev", "tmp", "usr"]) + @no_debug_info_test def test_shell_builtin(self): """ Test a shell built-in command (echo) """ self.expect("platform shell echo hello lldb", substrs = ["hello lldb"]) #FIXME: re-enable once platform shell -t can specify the desired timeout + @no_debug_info_test def test_shell_timeout(self): """ Test a shell built-in command (sleep) that times out """ self.skipTest("due to taking too long to complete.") diff --git a/lldb/test/functionalities/plugins/commands/TestPluginCommands.py b/lldb/test/functionalities/plugins/commands/TestPluginCommands.py index 0d360e472f7..f00ada5040a 100644 --- a/lldb/test/functionalities/plugins/commands/TestPluginCommands.py +++ b/lldb/test/functionalities/plugins/commands/TestPluginCommands.py @@ -22,6 +22,7 @@ class PluginCommandTestCase(TestBase): @skipIfNoSBHeaders @skipIfHostIncompatibleWithRemote # Requires a compatible arch and platform to link against the host's built lldb lib. @expectedFailureWindows("llvm.org/pr24778") + @no_debug_info_test def test_load_plugin(self): """Test that plugins that load commands work correctly.""" diff --git a/lldb/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py b/lldb/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py index 16feb5f85a2..d4b1b5f47c8 100644 --- a/lldb/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py +++ b/lldb/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py @@ -13,30 +13,14 @@ class PluginPythonOSPlugin(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_python_os_plugin_dsym(self): + def test_python_os_plugin(self): """Test that the Python operating system plugin works correctly""" - self.buildDsym() + self.build() self.run_python_os_funcionality() - @dwarf_test - def test_python_os_plugin_dwarf(self): - """Test that the Python operating system plugin works correctly""" - self.buildDwarf() - self.run_python_os_funcionality() - - @skipUnlessDarwin - @dsym_test - def test_python_os_step_dsym(self): - """Test that the Python operating system plugin works correctly when single stepping a virtual thread""" - self.buildDsym() - self.run_python_os_step() - - @dwarf_test - def run_python_os_step_dwarf(self): + def run_python_os_step(self): """Test that the Python operating system plugin works correctly when single stepping a virtual thread""" - self.buildDwarf() + self.build() self.run_python_os_step() def verify_os_thread_registers(self, thread): diff --git a/lldb/test/functionalities/postmortem/minidump/TestMiniDump.py b/lldb/test/functionalities/postmortem/minidump/TestMiniDump.py index 63cfd0ea07c..84bf777767f 100644 --- a/lldb/test/functionalities/postmortem/minidump/TestMiniDump.py +++ b/lldb/test/functionalities/postmortem/minidump/TestMiniDump.py @@ -12,12 +12,14 @@ class MiniDumpTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) + @no_debug_info_test def test_process_info_in_mini_dump(self): """Test that lldb can read the process information from the minidump.""" self.assertTrue(self.process, PROCESS_IS_VALID) self.assertEqual(self.process.GetNumThreads(), 1) self.assertEqual(self.process.GetProcessID(), 4440) + @no_debug_info_test def test_thread_info_in_mini_dump(self): """Test that lldb can read the thread information from the minidump.""" # This process crashed due to an access violation (0xc0000005) in its one and only thread. diff --git a/lldb/test/functionalities/process_attach/TestProcessAttach.py b/lldb/test/functionalities/process_attach/TestProcessAttach.py index 56a94392e8d..b8005c2c02a 100644 --- a/lldb/test/functionalities/process_attach/TestProcessAttach.py +++ b/lldb/test/functionalities/process_attach/TestProcessAttach.py @@ -14,46 +14,9 @@ class ProcessAttachTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_attach_to_process_by_id_with_dsym(self): + def test_attach_to_process_by_id(self): """Test attach by process id""" - self.buildDsym() - self.process_attach_by_id() - - @dwarf_test - def test_attach_to_process_by_id_with_dwarf(self): - """Test attach by process id""" - self.buildDwarf() - self.process_attach_by_id() - - @skipUnlessDarwin - @dsym_test - def test_attach_to_process_by_name_with_dsym(self): - """Test attach by process name""" - self.buildDsym() - self.process_attach_by_name() - - @dwarf_test - def test_attach_to_process_by_name_with_dwarf(self): - """Test attach by process name""" - self.buildDwarf() - self.process_attach_by_name() - - def setUp(self): - # Call super's setUp(). - TestBase.setUp(self) - - def tearDown(self): - # Destroy process before TestBase.tearDown() - self.dbg.GetSelectedTarget().GetProcess().Destroy() - - # Call super's tearDown(). - TestBase.tearDown(self) - - def process_attach_by_id(self): - """Test attach by process id""" - + self.build() exe = os.path.join(os.getcwd(), exe_name) # Spawn a new process @@ -67,10 +30,9 @@ class ProcessAttachTestCase(TestBase): process = target.GetProcess() self.assertTrue(process, PROCESS_IS_VALID) - - def process_attach_by_name(self): + def test_attach_to_process_by_name(self): """Test attach by process name""" - + self.build() exe = os.path.join(os.getcwd(), exe_name) # Spawn a new process @@ -84,6 +46,12 @@ class ProcessAttachTestCase(TestBase): process = target.GetProcess() self.assertTrue(process, PROCESS_IS_VALID) + def tearDown(self): + # Destroy process before TestBase.tearDown() + self.dbg.GetSelectedTarget().GetProcess().Destroy() + + # Call super's tearDown(). + TestBase.tearDown(self) if __name__ == '__main__': import atexit diff --git a/lldb/test/functionalities/process_attach/attach_denied/TestAttachDenied.py b/lldb/test/functionalities/process_attach/attach_denied/TestAttachDenied.py index 57ef2e053b9..65d0c235cd6 100644 --- a/lldb/test/functionalities/process_attach/attach_denied/TestAttachDenied.py +++ b/lldb/test/functionalities/process_attach/attach_denied/TestAttachDenied.py @@ -24,8 +24,7 @@ class AttachDeniedTestCase(TestBase): @skipIfLinux # hanging after reviews D13124 change went in def test_attach_to_process_by_id_denied(self): """Test attach by process id denied""" - - self.buildDefault() + self.build() exe = os.path.join(os.getcwd(), exe_name) # Use a file as a synchronization point between test and inferior. diff --git a/lldb/test/functionalities/process_group/TestChangeProcessGroup.py b/lldb/test/functionalities/process_group/TestChangeProcessGroup.py index 2d3c0f957d1..343e53d134f 100644 --- a/lldb/test/functionalities/process_group/TestChangeProcessGroup.py +++ b/lldb/test/functionalities/process_group/TestChangeProcessGroup.py @@ -17,28 +17,11 @@ class ChangeProcessGroupTestCase(TestBase): # Find the line number to break for main.c. self.line = line_number('main.c', '// Set breakpoint here') - @skipIfWindows # setpgid call does not exist on Windows - @skipUnlessDarwin - @dsym_test - def test_setpgid_with_dsym(self): - self.buildDsym() - self.setpgid() - @skipIfFreeBSD # Times out on FreeBSD llvm.org/pr23731 @skipIfWindows # setpgid call does not exist on Windows @expectedFailureAndroid("http://llvm.org/pr23762", api_levels=[16]) - @dwarf_test - def test_setpgid_with_dwarf(self): - self.buildDwarf() - self.setpgid() - - def run_platform_command(self, cmd): - platform = self.dbg.GetSelectedPlatform() - shell_command = lldb.SBPlatformShellCommand(cmd) - err = platform.Run(shell_command) - return (err, shell_command.GetStatus(), shell_command.GetOutput()) - - def setpgid(self): + def test_setpgid(self): + self.build() exe = os.path.join(os.getcwd(), 'a.out') # Use a file as a synchronization point between test and inferior. @@ -109,6 +92,12 @@ class ChangeProcessGroupTestCase(TestBase): process.Continue() self.assertEqual(process.GetState(), lldb.eStateExited) + def run_platform_command(self, cmd): + platform = self.dbg.GetSelectedPlatform() + shell_command = lldb.SBPlatformShellCommand(cmd) + err = platform.Run(shell_command) + return (err, shell_command.GetStatus(), shell_command.GetOutput()) + if __name__ == '__main__': import atexit lldb.SBDebugger.Initialize() diff --git a/lldb/test/functionalities/process_launch/TestProcessLaunch.py b/lldb/test/functionalities/process_launch/TestProcessLaunch.py index 92732f9410d..e843bfc1812 100644 --- a/lldb/test/functionalities/process_launch/TestProcessLaunch.py +++ b/lldb/test/functionalities/process_launch/TestProcessLaunch.py @@ -18,22 +18,10 @@ class ProcessLaunchTestCase(TestBase): self.runCmd("settings set auto-confirm true") self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm")) - @skipUnlessDarwin - @dsym_test - def test_io_with_dsym (self): - """Test that process launch I/O redirection flags work properly.""" - self.buildDsym () - self.process_io_test () - - @dwarf_test - def test_io_with_dwarf (self): - """Test that process launch I/O redirection flags work properly.""" - self.buildDwarf () - self.process_io_test () - @not_remote_testsuite_ready - def process_io_test (self): + def test_io (self): """Test that process launch I/O redirection flags work properly.""" + self.build () exe = os.path.join (os.getcwd(), "a.out") self.expect("file " + exe, patterns = [ "Current executable set to .*a.out" ]) @@ -115,29 +103,15 @@ class ProcessLaunchTestCase(TestBase): if not success: self.fail (err_msg) - d = {'CXX_SOURCES' : 'print_cwd.cpp'} - - @skipUnlessDarwin - @dsym_test - def test_set_working_dir_with_dsym (self): - """Test that '-w dir' sets the working dir when running the inferior.""" - self.buildDsym(dictionary=self.d) - self.setTearDownCleanup(self.d) - self.my_working_dir_test() - - @expectedFailureLinux("llvm.org/pr20265") - @dwarf_test - def test_set_working_dir_with_dwarf (self): - """Test that '-w dir' sets the working dir when running the inferior.""" - self.buildDwarf(dictionary=self.d) - self.setTearDownCleanup(self.d) - self.my_working_dir_test() - # rdar://problem/9056462 # The process launch flag '-w' for setting the current working directory not working? @not_remote_testsuite_ready - def my_working_dir_test (self): + @expectedFailureLinux("llvm.org/pr20265") + def test_set_working_dir (self): """Test that '-w dir' sets the working dir when running the inferior.""" + d = {'CXX_SOURCES' : 'print_cwd.cpp'} + self.build(dictionary=d) + self.setTearDownCleanup(d) exe = os.path.join (os.getcwd(), "a.out") self.runCmd("file " + exe) diff --git a/lldb/test/functionalities/recursion/TestValueObjectRecursion.py b/lldb/test/functionalities/recursion/TestValueObjectRecursion.py index 42724d58894..243b8621a40 100644 --- a/lldb/test/functionalities/recursion/TestValueObjectRecursion.py +++ b/lldb/test/functionalities/recursion/TestValueObjectRecursion.py @@ -12,27 +12,15 @@ class ValueObjectRecursionTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test that deeply nested ValueObjects still work.""" - self.buildDsym() - self.recursive_vo_commands() - - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test that deeply nested ValueObjects still work.""" - self.buildDwarf() - self.recursive_vo_commands() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - def recursive_vo_commands(self): - """Test that that file and class static variables display correctly.""" + def test_with_run_command(self): + """Test that deeply nested ValueObjects still work.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/register/TestRegisters.py b/lldb/test/functionalities/register/TestRegisters.py index cee58373624..8957d9c84b4 100755 --- a/lldb/test/functionalities/register/TestRegisters.py +++ b/lldb/test/functionalities/register/TestRegisters.py @@ -25,7 +25,7 @@ class RegisterCommandsTestCase(TestBase): """Test commands related to registers, in particular vector registers.""" if not self.getArchitecture() in ['amd64', 'i386', 'x86_64']: self.skipTest("This test requires x86 or x86_64 as the architecture for the inferior") - self.buildDefault() + self.build() self.register_commands() @skipIfTargetAndroid(archs=["i386"]) # Writing of mxcsr register fails, presumably due to a kernel/hardware problem @@ -33,7 +33,7 @@ class RegisterCommandsTestCase(TestBase): """Test commands that write to registers, in particular floating-point registers.""" if not self.getArchitecture() in ['amd64', 'i386', 'x86_64']: self.skipTest("This test requires x86 or x86_64 as the architecture for the inferior") - self.buildDefault() + self.build() self.fp_register_write() @expectedFailureAndroid(archs=["i386"]) # "register read fstat" always return 0xffff @@ -42,35 +42,35 @@ class RegisterCommandsTestCase(TestBase): """Test commands that read fpu special purpose registers.""" if not self.getArchitecture() in ['amd64', 'i386', 'x86_64']: self.skipTest("This test requires x86 or x86_64 as the architecture for the inferior") - self.buildDefault() + self.build() self.fp_special_purpose_register_read() def test_register_expressions(self): """Test expression evaluation with commands related to registers.""" if not self.getArchitecture() in ['amd64', 'i386', 'x86_64']: self.skipTest("This test requires x86 or x86_64 as the architecture for the inferior") - self.buildDefault() + self.build() self.register_expressions() def test_convenience_registers(self): """Test convenience registers.""" if not self.getArchitecture() in ['amd64', 'x86_64']: self.skipTest("This test requires x86_64 as the architecture for the inferior") - self.buildDefault() + self.build() self.convenience_registers() def test_convenience_registers_with_process_attach(self): """Test convenience registers after a 'process attach'.""" if not self.getArchitecture() in ['amd64', 'x86_64']: self.skipTest("This test requires x86_64 as the architecture for the inferior") - self.buildDefault() + self.build() self.convenience_registers_with_process_attach(test_16bit_regs=False) def test_convenience_registers_16bit_with_process_attach(self): """Test convenience registers after a 'process attach'.""" if not self.getArchitecture() in ['amd64', 'x86_64']: self.skipTest("This test requires x86_64 as the architecture for the inferior") - self.buildDefault() + self.build() self.convenience_registers_with_process_attach(test_16bit_regs=True) def common_setup(self): diff --git a/lldb/test/functionalities/rerun/TestRerun.py b/lldb/test/functionalities/rerun/TestRerun.py index 18b447cc563..b1b5465eb42 100644 --- a/lldb/test/functionalities/rerun/TestRerun.py +++ b/lldb/test/functionalities/rerun/TestRerun.py @@ -13,20 +13,8 @@ class TestRerun(TestBase): mydir = TestBase.compute_mydir(__file__) - - @skipUnlessDarwin - @dsym_test - def test_with_dsym (self): - self.buildDsym() - self.do_test () - - - @dwarf_test - def test_with_dwarf (self): - self.buildDwarf() - self.do_test () - - def do_test (self): + def test (self): + self.build() exe = os.path.join (os.getcwd(), "a.out") self.runCmd("target create %s" % exe) diff --git a/lldb/test/functionalities/return-value/TestReturnValue.py b/lldb/test/functionalities/return-value/TestReturnValue.py index e315b158516..bafde43e7e2 100644 --- a/lldb/test/functionalities/return-value/TestReturnValue.py +++ b/lldb/test/functionalities/return-value/TestReturnValue.py @@ -12,80 +12,12 @@ class ReturnValueTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @expectedFailurei386 - @python_api_test - @dsym_test - def test_with_dsym_python(self): - """Test getting return values from stepping out with dsyms.""" - self.buildDsym() - self.do_return_value() - @expectedFailurei386 @expectedFailureWindows("llvm.org/pr24778") @python_api_test - @dwarf_test - def test_with_dwarf_python(self): - """Test getting return values from stepping out.""" - self.buildDwarf() - self.do_return_value() - - def return_and_test_struct_value (self, func_name): - """Pass in the name of the function to return from - takes in value, returns value.""" - - # Set the breakpoint, run to it, finish out. - bkpt = self.target.BreakpointCreateByName (func_name) - self.assertTrue (bkpt.GetNumResolvedLocations() > 0) - - self.process.Continue () - - thread_list = lldbutil.get_threads_stopped_at_breakpoint (self.process, bkpt) - - self.assertTrue (len(thread_list) == 1) - thread = thread_list[0] - - self.target.BreakpointDelete (bkpt.GetID()) - - in_value = thread.GetFrameAtIndex(0).FindVariable ("value") - - self.assertTrue (in_value.IsValid()) - num_in_children = in_value.GetNumChildren() - - # This is a little hokey, but if we don't get all the children now, then - # once we've stepped we won't be able to get them? - - for idx in range(0, num_in_children): - in_child = in_value.GetChildAtIndex (idx) - in_child_str = in_child.GetValue() - - thread.StepOut() - - self.assertTrue (self.process.GetState() == lldb.eStateStopped) - self.assertTrue (thread.GetStopReason() == lldb.eStopReasonPlanComplete) - - # Assuming all these functions step out to main. Could figure out the caller dynamically - # if that would add something to the test. - frame = thread.GetFrameAtIndex(0) - fun_name = frame.GetFunctionName() - self.assertTrue (fun_name == "main") - - frame = thread.GetFrameAtIndex(0) - ret_value = thread.GetStopReturnValue() - - self.assertTrue (ret_value.IsValid()) - - num_ret_children = ret_value.GetNumChildren() - self.assertTrue (num_in_children == num_ret_children) - for idx in range(0, num_ret_children): - in_child = in_value.GetChildAtIndex(idx) - ret_child = ret_value.GetChildAtIndex(idx) - in_child_str = in_child.GetValue() - ret_child_str = ret_child.GetValue() - - self.assertEqual(in_child_str, ret_child_str) - - def do_return_value(self): + def test_with_python(self): """Test getting return values from stepping out.""" + self.build() exe = os.path.join(os.getcwd(), "a.out") error = lldb.SBError() @@ -221,6 +153,60 @@ class ReturnValueTestCase(TestBase): self.return_and_test_struct_value ("return_ext_vector_size_float32_4") self.return_and_test_struct_value ("return_ext_vector_size_float32_8") + def return_and_test_struct_value (self, func_name): + """Pass in the name of the function to return from - takes in value, returns value.""" + + # Set the breakpoint, run to it, finish out. + bkpt = self.target.BreakpointCreateByName (func_name) + self.assertTrue (bkpt.GetNumResolvedLocations() > 0) + + self.process.Continue () + + thread_list = lldbutil.get_threads_stopped_at_breakpoint (self.process, bkpt) + + self.assertTrue (len(thread_list) == 1) + thread = thread_list[0] + + self.target.BreakpointDelete (bkpt.GetID()) + + in_value = thread.GetFrameAtIndex(0).FindVariable ("value") + + self.assertTrue (in_value.IsValid()) + num_in_children = in_value.GetNumChildren() + + # This is a little hokey, but if we don't get all the children now, then + # once we've stepped we won't be able to get them? + + for idx in range(0, num_in_children): + in_child = in_value.GetChildAtIndex (idx) + in_child_str = in_child.GetValue() + + thread.StepOut() + + self.assertTrue (self.process.GetState() == lldb.eStateStopped) + self.assertTrue (thread.GetStopReason() == lldb.eStopReasonPlanComplete) + + # Assuming all these functions step out to main. Could figure out the caller dynamically + # if that would add something to the test. + frame = thread.GetFrameAtIndex(0) + fun_name = frame.GetFunctionName() + self.assertTrue (fun_name == "main") + + frame = thread.GetFrameAtIndex(0) + ret_value = thread.GetStopReturnValue() + + self.assertTrue (ret_value.IsValid()) + + num_ret_children = ret_value.GetNumChildren() + self.assertTrue (num_in_children == num_ret_children) + for idx in range(0, num_ret_children): + in_child = in_value.GetChildAtIndex(idx) + ret_child = ret_value.GetChildAtIndex(idx) + in_child_str = in_child.GetValue() + ret_child_str = ret_child.GetValue() + + self.assertEqual(in_child_str, ret_child_str) + if __name__ == '__main__': import atexit lldb.SBDebugger.Initialize() diff --git a/lldb/test/functionalities/set-data/TestSetData.py b/lldb/test/functionalities/set-data/TestSetData.py index 07fdc7e0d68..3bd5ee4ce96 100644 --- a/lldb/test/functionalities/set-data/TestSetData.py +++ b/lldb/test/functionalities/set-data/TestSetData.py @@ -8,19 +8,14 @@ import lldb from lldbtest import * import lldbutil -@skipUnlessDarwin class SetDataTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @dsym_test - def test_set_data_dsym(self): + @skipUnlessDarwin + def test_set_data(self): """Test setting the contents of variables and registers using raw data.""" - self.buildDsym() - self.setData() - - def setData(self): - """Test setting objc breakpoints using '_regexp-break' and 'breakpoint set'.""" + self.build() exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) diff --git a/lldb/test/functionalities/signal/TestSendSignal.py b/lldb/test/functionalities/signal/TestSendSignal.py index 4b01b57413a..5ce843d5286 100644 --- a/lldb/test/functionalities/signal/TestSendSignal.py +++ b/lldb/test/functionalities/signal/TestSendSignal.py @@ -11,43 +11,17 @@ class SendSignalTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Test that lldb command 'process signal SIGUSR1' sends a signal to the inferior process.""" - self.buildDsym() - self.send_signal() - - @expectedFailureFreeBSD("llvm.org/pr23318: does not report running state") - @skipIfWindows # Windows does not support signals - @dwarf_test - def test_with_dwarf_and_run_command(self): - """Test that lldb command 'process signal SIGUSR1' sends a signal to the inferior process.""" - self.buildDwarf() - self.send_signal() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break inside main(). self.line = line_number('main.c', 'Put breakpoint here') - def match_state(self, process_listener, expected_state): - num_seconds = 5 - broadcaster = self.process().GetBroadcaster() - event_type_mask = lldb.SBProcess.eBroadcastBitStateChanged - event = lldb.SBEvent() - got_event = process_listener.WaitForEventForBroadcasterWithType( - num_seconds, broadcaster, event_type_mask, event) - self.assertTrue(got_event, "Got an event") - state = lldb.SBProcess.GetStateFromEvent(event) - self.assertTrue(state == expected_state, - "It was the %s state." % - lldb.SBDebugger_StateAsCString(expected_state)) - - def send_signal(self): + @expectedFailureFreeBSD("llvm.org/pr23318: does not report running state") + @skipIfWindows # Windows does not support signals + def test_with_run_command(self): """Test that lldb command 'process signal SIGUSR1' sends a signal to the inferior process.""" - + self.build() exe = os.path.join(os.getcwd(), "a.out") # Create a target by the debugger. @@ -114,6 +88,19 @@ class SendSignalTestCase(TestBase): self.assertTrue(thread.GetStopReasonDataAtIndex(0) == lldbutil.get_signal_number('SIGUSR1'), "The stop signal was SIGUSR1") + def match_state(self, process_listener, expected_state): + num_seconds = 5 + broadcaster = self.process().GetBroadcaster() + event_type_mask = lldb.SBProcess.eBroadcastBitStateChanged + event = lldb.SBEvent() + got_event = process_listener.WaitForEventForBroadcasterWithType( + num_seconds, broadcaster, event_type_mask, event) + self.assertTrue(got_event, "Got an event") + state = lldb.SBProcess.GetStateFromEvent(event) + self.assertTrue(state == expected_state, + "It was the %s state." % + lldb.SBDebugger_StateAsCString(expected_state)) + if __name__ == '__main__': import atexit lldb.SBDebugger.Initialize() diff --git a/lldb/test/functionalities/signal/handle-segv/TestHandleSegv.py b/lldb/test/functionalities/signal/handle-segv/TestHandleSegv.py index ce47e942867..fdb8f995e75 100644 --- a/lldb/test/functionalities/signal/handle-segv/TestHandleSegv.py +++ b/lldb/test/functionalities/signal/handle-segv/TestHandleSegv.py @@ -15,8 +15,8 @@ class HandleSegvTestCase(TestBase): @skipIfWindows # signals do not exist on Windows @skipIfDarwin @expectedFailureFreeBSD("llvm.org/pr23699 SIGSEGV is reported as exception, not signal") - def test_inferior_handle_sigsegv_with_dwarf(self): - self.buildDefault() + def test_inferior_handle_sigsegv(self): + self.build() exe = os.path.join(os.getcwd(), "a.out") # Create a target by the debugger. diff --git a/lldb/test/functionalities/signal/raise/TestRaise.py b/lldb/test/functionalities/signal/raise/TestRaise.py index b6672779b64..0099251cb98 100644 --- a/lldb/test/functionalities/signal/raise/TestRaise.py +++ b/lldb/test/functionalities/signal/raise/TestRaise.py @@ -13,24 +13,15 @@ class RaiseTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_sigstop_with_dsym(self): - self.buildDsym() + def test_sigstop(self): + self.build() self.signal_test('SIGSTOP', False) # passing of SIGSTOP is not correctly handled, so not testing that scenario: https://llvm.org/bugs/show_bug.cgi?id=23574 - @dwarf_test - def test_sigstop_with_dwarf(self): - self.buildDwarf() - self.signal_test('SIGSTOP', False) - # passing of SIGSTOP is not correctly handled, so not testing that scenario: https://llvm.org/bugs/show_bug.cgi?id=23574 - - @dwarf_test @skipIfDarwin # darwin does not support real time signals @skipIfTargetAndroid() - def test_sigsigrtmin_with_dwarf(self): - self.buildDwarf() + def test_sigsigrtmin(self): + self.build() self.signal_test('SIGRTMIN', True) def launch(self, target, signal): @@ -154,23 +145,12 @@ class RaiseTestCase(TestBase): # reset signal handling to default self.set_handle(signal, default_pass, default_stop, default_notify) - @dwarf_test @expectedFailureLinux("llvm.org/pr24530") # the signal the inferior generates gets lost @expectedFailureDarwin("llvm.org/pr24530") # the signal the inferior generates gets lost - def test_restart_bug_with_dwarf(self): - self.buildDwarf() - self.restart_bug_test() - - @dsym_test - @expectedFailureDarwin("llvm.org/pr24530") # the signal the inferior generates gets lost - def test_restart_bug_with_dsym(self): - self.buildDsym() - self.restart_bug_test() - - def restart_bug_test(self): + def test_restart_bug(self): """Test that we catch a signal in the edge case where the process receives it while we are about to interrupt it""" - + self.build() exe = os.path.join(os.getcwd(), "a.out") # Create a target by the debugger. diff --git a/lldb/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py b/lldb/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py index 5f5aff05aeb..cd45412679a 100644 --- a/lldb/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py +++ b/lldb/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py @@ -23,6 +23,7 @@ class SingleQuoteInCommandLineTestCase(TestBase): pass @expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows") + @no_debug_info_test def test_lldb_invocation_with_single_quote_in_filename(self): """Test that 'lldb my_file_name' works where my_file_name is a string with a single quote char in it.""" import pexpect diff --git a/lldb/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py b/lldb/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py index 7f6601b11e6..1b38afc3aaa 100644 --- a/lldb/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py +++ b/lldb/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py @@ -13,56 +13,26 @@ class ReturnValueTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin @python_api_test - @dsym_test - def test_step_out_with_dsym_python(self): + def test_step_out_with_python(self): """Test stepping out using avoid-no-debug with dsyms.""" - self.buildDsym() + self.build() self.get_to_starting_point() self.do_step_out_past_nodebug() @python_api_test - @dwarf_test - def test_step_out_with_dwarf_python(self): - """Test stepping out using avoid-no-debug with dsyms.""" - self.buildDwarf() - self.get_to_starting_point() - self.do_step_out_past_nodebug() - - @skipUnlessDarwin - @python_api_test - @dsym_test - def test_step_over_with_dsym_python(self): - """Test stepping over using avoid-no-debug with dsyms.""" - self.buildDsym() - self.get_to_starting_point() - self.do_step_over_past_nodebug() - - @python_api_test - @dwarf_test @expectedFailureGcc("llvm.org/pr19247") - def test_step_over_with_dwarf_python(self): + def test_step_over_with_python(self): """Test stepping over using avoid-no-debug with dwarf.""" - self.buildDwarf() + self.build() self.get_to_starting_point() self.do_step_over_past_nodebug() - @skipUnlessDarwin - @python_api_test - @dsym_test - def test_step_in_with_dsym_python(self): - """Test stepping in using avoid-no-debug with dsyms.""" - self.buildDsym() - self.get_to_starting_point() - self.do_step_in_past_nodebug() - @python_api_test - @dwarf_test @expectedFailureGcc("llvm.org/pr19247") - def test_step_in_with_dwarf_python(self): + def test_step_in_with_python(self): """Test stepping in using avoid-no-debug with dwarf.""" - self.buildDwarf() + self.build() self.get_to_starting_point() self.do_step_in_past_nodebug() diff --git a/lldb/test/functionalities/stop-hook/TestStopHookCmd.py b/lldb/test/functionalities/stop-hook/TestStopHookCmd.py index 8453cc340a2..14017c7a8cf 100644 --- a/lldb/test/functionalities/stop-hook/TestStopHookCmd.py +++ b/lldb/test/functionalities/stop-hook/TestStopHookCmd.py @@ -13,24 +13,6 @@ class StopHookCmdTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - # Regression test. - def test_not_crashing_if_no_target(self): - """target stop-hook list should not crash if no target has been set.""" - self.runCmd("target stop-hook list", check=False) - - @skipUnlessDarwin - @dsym_test - def test_with_dsym(self): - """Test a sequence of target stop-hook commands.""" - self.buildDsym() - self.stop_hook_cmd_sequence() - - @dwarf_test - def test_with_dwarf(self): - """Test a sequence of target stop-hook commands.""" - self.buildDwarf() - self.stop_hook_cmd_sequence() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) @@ -39,8 +21,14 @@ class StopHookCmdTestCase(TestBase): self.endl = line_number('main.cpp', '// End of the line range for which stop-hook is to be run.') self.line = line_number('main.cpp', '// Another breakpoint which is outside of the stop-hook range.') - def stop_hook_cmd_sequence(self): + @no_debug_info_test + def test_not_crashing_if_no_target(self): + """target stop-hook list should not crash if no target has been set.""" + self.runCmd("target stop-hook list", check=False) + + def test(self): """Test a sequence of target stop-hook commands.""" + self.build() exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) diff --git a/lldb/test/functionalities/stop-hook/TestStopHookMechanism.py b/lldb/test/functionalities/stop-hook/TestStopHookMechanism.py index cda025b57ef..abb99953bc9 100644 --- a/lldb/test/functionalities/stop-hook/TestStopHookMechanism.py +++ b/lldb/test/functionalities/stop-hook/TestStopHookMechanism.py @@ -11,22 +11,6 @@ class StopHookMechanismTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym(self): - """Test the stop-hook mechanism.""" - self.buildDsym() - self.stop_hook_firing() - - @skipIfFreeBSD # llvm.org/pr15037 - @expectedFlakeyLinux('llvm.org/pr15037') # stop-hooks sometimes fail to fire on Linux - @expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows") - @dwarf_test - def test_with_dwarf(self): - """Test the stop-hook mechanism.""" - self.buildDwarf() - self.stop_hook_firing() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) @@ -36,8 +20,13 @@ class StopHookMechanismTestCase(TestBase): self.correct_step_line = line_number ('main.cpp', '// We should stop here after stepping.') self.line = line_number('main.cpp', '// Another breakpoint which is outside of the stop-hook range.') - def stop_hook_firing(self): + @skipIfFreeBSD # llvm.org/pr15037 + @expectedFlakeyLinux('llvm.org/pr15037') # stop-hooks sometimes fail to fire on Linux + @expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows") + def test(self): """Test the stop-hook mechanism.""" + self.build() + import pexpect exe = os.path.join(os.getcwd(), "a.out") prompt = "(lldb) " diff --git a/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py b/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py index 69cd39f11d8..59c5222f5e1 100644 --- a/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py +++ b/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py @@ -11,24 +11,6 @@ class StopHookForMultipleThreadsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_stop_hook_multiple_threads_with_dsym(self): - """Test that lldb stop-hook works for multiple threads.""" - self.buildDsym(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.stop_hook_multiple_threads() - - @dwarf_test - @expectedFlakeyFreeBSD("llvm.org/pr15037") - @expectedFlakeyLinux("llvm.org/pr15037") # stop hooks sometimes fail to fire on Linux - @expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows") - def test_stop_hook_multiple_threads_with_dwarf(self): - """Test that lldb stop-hook works for multiple threads.""" - self.buildDwarf(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.stop_hook_multiple_threads() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) @@ -41,8 +23,14 @@ class StopHookForMultipleThreadsTestCase(TestBase): self.exe_name = self.testMethodName self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name} - def stop_hook_multiple_threads(self): + @expectedFlakeyFreeBSD("llvm.org/pr15037") + @expectedFlakeyLinux("llvm.org/pr15037") # stop hooks sometimes fail to fire on Linux + @expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows") + def test_stop_hook_multiple_threads(self): """Test that lldb stop-hook works for multiple threads.""" + self.build(dictionary=self.d) + self.setTearDownCleanup(dictionary=self.d) + import pexpect exe = os.path.join(os.getcwd(), self.exe_name) prompt = "(lldb) " diff --git a/lldb/test/functionalities/target_command/TestTargetCommand.py b/lldb/test/functionalities/target_command/TestTargetCommand.py index 8cf327ae32b..eb7409b6092 100644 --- a/lldb/test/functionalities/target_command/TestTargetCommand.py +++ b/lldb/test/functionalities/target_command/TestTargetCommand.py @@ -19,41 +19,36 @@ class targetCommandTestCase(TestBase): self.line_b = line_number('b.c', '// Set break point at this line.') self.line_c = line_number('c.c', '// Set break point at this line.') - @dwarf_test - def test_target_command_with_dwarf(self): + def test_target_command(self): """Test some target commands: create, list, select.""" da = {'C_SOURCES': 'a.c', 'EXE': 'a.out'} - self.buildDwarf(dictionary=da) + self.build(dictionary=da) self.addTearDownCleanup(dictionary=da) db = {'C_SOURCES': 'b.c', 'EXE': 'b.out'} - self.buildDwarf(dictionary=db) + self.build(dictionary=db) self.addTearDownCleanup(dictionary=db) dc = {'C_SOURCES': 'c.c', 'EXE': 'c.out'} - self.buildDwarf(dictionary=dc) + self.build(dictionary=dc) self.addTearDownCleanup(dictionary=dc) self.do_target_command() # rdar://problem/9763907 # 'target variable' command fails if the target program has been run - @skipUnlessDarwin - @dsym_test - def test_target_variable_command_with_dsym(self): + def test_target_variable_command(self): """Test 'target variable' command before and after starting the inferior.""" d = {'C_SOURCES': 'globals.c', 'EXE': 'globals'} - self.buildDsym(dictionary=d) + self.build(dictionary=d) self.addTearDownCleanup(dictionary=d) self.do_target_variable_command('globals') - @skipUnlessDarwin - @dsym_test - def test_target_variable_command_with_dsym_no_fail(self): + def test_target_variable_command_no_fail(self): """Test 'target variable' command before and after starting the inferior.""" d = {'C_SOURCES': 'globals.c', 'EXE': 'globals'} - self.buildDsym(dictionary=d) + self.build(dictionary=d) self.addTearDownCleanup(dictionary=d) self.do_target_variable_command_no_fail('globals') diff --git a/lldb/test/functionalities/thread/TestNumThreads.py b/lldb/test/functionalities/thread/TestNumThreads.py index a7d015048a5..65ca699332f 100644 --- a/lldb/test/functionalities/thread/TestNumThreads.py +++ b/lldb/test/functionalities/thread/TestNumThreads.py @@ -12,27 +12,15 @@ class NumberOfThreadsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym(self): - """Test number of threads.""" - self.buildDsym() - self.number_of_threads_test() - - @dwarf_test - def test_with_dwarf(self): - """Test number of threads.""" - self.buildDwarf() - self.number_of_threads_test() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break inside main(). self.line = line_number('main.cpp', '// Set break point at this line.') - def number_of_threads_test(self): + def test(self): """Test number of threads.""" + self.build() exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) diff --git a/lldb/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py b/lldb/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py index f1f18024166..e149f361ea0 100644 --- a/lldb/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py +++ b/lldb/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py @@ -12,31 +12,19 @@ class BreakpointAfterJoinTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained - @dsym_test - def test_with_dsym(self): - """Test breakpoint handling after a thread join.""" - self.buildDsym(dictionary=self.getBuildFlags()) - self.breakpoint_after_join_test() - - @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained - @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained - @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained - @dwarf_test - def test_with_dwarf(self): - """Test breakpoint handling after a thread join.""" - self.buildDwarf(dictionary=self.getBuildFlags()) - self.breakpoint_after_join_test() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number for our breakpoint. self.breakpoint = line_number('main.cpp', '// Set breakpoint here') - def breakpoint_after_join_test(self): + @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained + @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained + @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained + def test(self): """Test breakpoint handling after a thread join.""" + self.build(dictionary=self.getBuildFlags()) + exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) 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) diff --git a/lldb/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py b/lldb/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py index 96010def4a9..e196fa29429 100644 --- a/lldb/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py +++ b/lldb/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py @@ -12,26 +12,15 @@ class CreateDuringStepTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_step_inst_with_dsym(self): - """Test thread creation during step-inst handling.""" - self.buildDsym(dictionary=self.getBuildFlags()) - self.crash_during_step_inst_test() - - @dwarf_test - @expectedFailureWindows("llvm.org/pr24778") - @expectedFailureAndroid("llvm.org/pr24497", archs=['arm', 'aarch64']) - def test_step_inst_with_dwarf(self): - """Test thread creation during step-inst handling.""" - self.buildDwarf(dictionary=self.getBuildFlags()) - self.crash_during_step_inst_test() - def setUp(self): TestBase.setUp(self) self.breakpoint = line_number('main.cpp', '// Set breakpoint here') - def crash_during_step_inst_test(self): + @expectedFailureWindows("llvm.org/pr24778") + @expectedFailureAndroid("llvm.org/pr24497", archs=['arm', 'aarch64']) + def test_step_inst_with(self): + """Test thread creation during step-inst handling.""" + self.build(dictionary=self.getBuildFlags()) exe = os.path.join(os.getcwd(), "a.out") target = self.dbg.CreateTarget(exe) diff --git a/lldb/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py b/lldb/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py index 6bd0d6b27db..51bc26f9d0e 100644 --- a/lldb/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py +++ b/lldb/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py @@ -12,32 +12,23 @@ class CreateAfterAttachTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_create_after_attach_with_dsym(self): - """Test thread creation after process attach.""" - self.buildDsym(dictionary=self.getBuildFlags(use_cpp11=False)) - self.create_after_attach(use_fork=False) - @skipIfFreeBSD # Hangs. May be the same as Linux issue llvm.org/pr16229 but # not yet investigated. Revisit once required functionality # is implemented for FreeBSD. @skipIfWindows # Occasionally hangs on Windows, may be same as other issues. - @dwarf_test - def test_create_after_attach_with_dwarf_and_popen(self): + def test_create_after_attach_with_popen(self): """Test thread creation after process attach.""" - self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False)) + self.build(dictionary=self.getBuildFlags(use_cpp11=False)) self.create_after_attach(use_fork=False) @skipIfFreeBSD # Hangs. Revisit once required functionality is implemented # for FreeBSD. - @dwarf_test @skipIfRemote @skipIfWindows # Windows doesn't have fork. @expectedFlakeyLinux("llvm.org/pr16229") # 1/100 dosep, build 3546, clang-3.5 x84_64 - def test_create_after_attach_with_dwarf_and_fork(self): + def test_create_after_attach_with_fork(self): """Test thread creation after process attach.""" - self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False)) + self.build(dictionary=self.getBuildFlags(use_cpp11=False)) self.create_after_attach(use_fork=True) def setUp(self): diff --git a/lldb/test/functionalities/thread/create_during_step/TestCreateDuringStep.py b/lldb/test/functionalities/thread/create_during_step/TestCreateDuringStep.py index fd8cf77b7e8..76fbc1559ba 100644 --- a/lldb/test/functionalities/thread/create_during_step/TestCreateDuringStep.py +++ b/lldb/test/functionalities/thread/create_during_step/TestCreateDuringStep.py @@ -12,59 +12,32 @@ class CreateDuringStepTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained - @dsym_test - def test_step_inst_with_dsym(self): - """Test thread creation during step-inst handling.""" - self.buildDsym(dictionary=self.getBuildFlags()) - self.create_during_step_inst_test() - - @skipUnlessDarwin - @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained - @dsym_test - def test_step_over_with_dsym(self): - """Test thread creation during step-over handling.""" - self.buildDsym(dictionary=self.getBuildFlags()) - self.create_during_step_over_test() - - @skipUnlessDarwin - @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained - @dsym_test - def test_step_in_with_dsym(self): - """Test thread creation during step-in handling.""" - self.buildDsym(dictionary=self.getBuildFlags()) - self.create_during_step_in_test() - @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly - @dwarf_test - def test_step_inst_with_dwarf(self): + def test_step_inst(self): """Test thread creation during step-inst handling.""" - self.buildDwarf(dictionary=self.getBuildFlags()) - self.create_during_step_inst_test() + self.build(dictionary=self.getBuildFlags()) + self.create_during_step_base("thread step-inst -m all-threads", 'stop reason = instruction step') @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly - @dwarf_test - def test_step_over_with_dwarf(self): + def test_step_over(self): """Test thread creation during step-over handling.""" - self.buildDwarf(dictionary=self.getBuildFlags()) - self.create_during_step_over_test() + self.build(dictionary=self.getBuildFlags()) + self.create_during_step_base("thread step-over -m all-threads", 'stop reason = step over') @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly - @dwarf_test - def test_step_in_with_dwarf(self): + def test_step_in(self): """Test thread creation during step-in handling.""" - self.buildDwarf(dictionary=self.getBuildFlags()) - self.create_during_step_in_test() + self.build(dictionary=self.getBuildFlags()) + self.create_during_step_base("thread step-in -m all-threads", 'stop reason = step in') def setUp(self): # Call super's setUp(). @@ -73,18 +46,6 @@ class CreateDuringStepTestCase(TestBase): self.breakpoint = line_number('main.cpp', '// Set breakpoint here') self.continuepoint = line_number('main.cpp', '// Continue from here') - def create_during_step_inst_test(self): - """Test thread creation while using step-inst.""" - self.create_during_step_base("thread step-inst -m all-threads", 'stop reason = instruction step') - - def create_during_step_over_test(self): - """Test thread creation while using step-over.""" - self.create_during_step_base("thread step-over -m all-threads", 'stop reason = step over') - - def create_during_step_in_test(self): - """Test thread creation while using step-in.""" - self.create_during_step_base("thread step-in -m all-threads", 'stop reason = step in') - def create_during_step_base(self, step_cmd, step_stop_reason): """Test thread creation while using step-in.""" exe = os.path.join(os.getcwd(), "a.out") diff --git a/lldb/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py b/lldb/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py index 9d6974d8865..cecc5d91f78 100644 --- a/lldb/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py +++ b/lldb/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py @@ -12,32 +12,19 @@ class ExitDuringBreakpointTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained - @dsym_test - def test_with_dsym(self): - """Test thread exit during breakpoint handling.""" - self.buildDsym(dictionary=self.getBuildFlags()) - self.exit_during_breakpoint_test() - - @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained - @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained - @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained - @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly - @dwarf_test - def test_with_dwarf(self): - """Test thread exit during breakpoint handling.""" - self.buildDwarf(dictionary=self.getBuildFlags()) - self.exit_during_breakpoint_test() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number for our breakpoint. self.breakpoint = line_number('main.cpp', '// Set breakpoint here') - def exit_during_breakpoint_test(self): + @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained + @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained + @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained + @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly + def test(self): """Test thread exit during breakpoint handling.""" + self.build(dictionary=self.getBuildFlags()) exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) diff --git a/lldb/test/functionalities/thread/exit_during_step/TestExitDuringStep.py b/lldb/test/functionalities/thread/exit_during_step/TestExitDuringStep.py index 0908bbd217d..a69bb7f2a76 100644 --- a/lldb/test/functionalities/thread/exit_during_step/TestExitDuringStep.py +++ b/lldb/test/functionalities/thread/exit_during_step/TestExitDuringStep.py @@ -12,68 +12,35 @@ class ExitDuringStepTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained - @dsym_test - def test_thread_state_is_stopped_with_dsym(self): - """Test thread exit during step handling.""" - self.buildDsym(dictionary=self.getBuildFlags()) - self.thread_state_is_stopped() - @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained @expectedFailureWindows("llvm.org/pr24681") - @dwarf_test - def test_thread_state_is_stopped_with_dwarf(self): + def test_thread_state_is_stopped(self): """Test thread exit during step handling.""" - self.buildDwarf(dictionary=self.getBuildFlags()) - self.thread_state_is_stopped() - - @skipUnlessDarwin - @dsym_test - def test_with_dsym(self): - """Test thread exit during step handling.""" - self.buildDsym(dictionary=self.getBuildFlags()) - self.exit_during_step_inst_test() - - @skipUnlessDarwin - @dsym_test - def test_step_over_with_dsym(self): - """Test thread exit during step-over handling.""" - self.buildDsym(dictionary=self.getBuildFlags()) - self.exit_during_step_over_test() - - @skipUnlessDarwin - @dsym_test - def test_step_in_with_dsym(self): - """Test thread exit during step-in handling.""" - self.buildDsym(dictionary=self.getBuildFlags()) - self.exit_during_step_in_test() + self.build(dictionary=self.getBuildFlags()) + self.exit_during_step_base("thread step-in -m all-threads", 'stop reason = step in', True) @skipIfFreeBSD # llvm.org/pr21411: test is hanging @expectedFailureWindows("llvm.org/pr24681") - @dwarf_test - def test_with_dwarf(self): + def test(self): """Test thread exit during step handling.""" - self.buildDwarf(dictionary=self.getBuildFlags()) - self.exit_during_step_inst_test() + self.build(dictionary=self.getBuildFlags()) + self.exit_during_step_base("thread step-inst -m all-threads", 'stop reason = instruction step', False) @skipIfFreeBSD # llvm.org/pr21411: test is hanging @expectedFailureWindows("llvm.org/pr24681") - @dwarf_test - def test_step_over_with_dwarf(self): + def test_step_over(self): """Test thread exit during step-over handling.""" - self.buildDwarf(dictionary=self.getBuildFlags()) - self.exit_during_step_over_test() + self.build(dictionary=self.getBuildFlags()) + self.exit_during_step_base("thread step-over -m all-threads", 'stop reason = step over', False) @skipIfFreeBSD # llvm.org/pr21411: test is hanging @expectedFailureWindows("llvm.org/pr24681") - @dwarf_test - def test_step_in_with_dwarf(self): + def test_step_in(self): """Test thread exit during step-in handling.""" - self.buildDwarf(dictionary=self.getBuildFlags()) - self.exit_during_step_in_test() + self.build(dictionary=self.getBuildFlags()) + self.exit_during_step_base("thread step-in -m all-threads", 'stop reason = step in', False) def setUp(self): # Call super's setUp(). @@ -82,22 +49,6 @@ class ExitDuringStepTestCase(TestBase): self.breakpoint = line_number('main.cpp', '// Set breakpoint here') self.continuepoint = line_number('main.cpp', '// Continue from here') - def exit_during_step_inst_test(self): - """Test thread exit while using step-inst.""" - self.exit_during_step_base("thread step-inst -m all-threads", 'stop reason = instruction step', False) - - def exit_during_step_over_test(self): - """Test thread exit while using step-over.""" - self.exit_during_step_base("thread step-over -m all-threads", 'stop reason = step over', False) - - def exit_during_step_in_test(self): - """Test thread exit while using step-in.""" - self.exit_during_step_base("thread step-in -m all-threads", 'stop reason = step in', False) - - def thread_state_is_stopped (self): - """Go to first point where all threads are stopped, and test that the thread state is correctly set.""" - self.exit_during_step_base("thread step-in -m all-threads", 'stop reason = step in', True) - def exit_during_step_base(self, step_cmd, step_stop_reason, test_thread_state): """Test thread exit during step handling.""" exe = os.path.join(os.getcwd(), "a.out") diff --git a/lldb/test/functionalities/thread/jump/TestThreadJump.py b/lldb/test/functionalities/thread/jump/TestThreadJump.py index d1c279fd7d2..3919a242127 100644 --- a/lldb/test/functionalities/thread/jump/TestThreadJump.py +++ b/lldb/test/functionalities/thread/jump/TestThreadJump.py @@ -12,29 +12,9 @@ class ThreadJumpTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym(self): + def test(self): """Test thread jump handling.""" - self.buildDsym(dictionary=self.getBuildFlags()) - self.thread_jump_test() - - @dwarf_test - def test_with_dwarf(self): - """Test thread jump handling.""" - self.buildDwarf(dictionary=self.getBuildFlags()) - self.thread_jump_test() - - def do_min_test(self, start, jump, var, value): - self.runCmd("j %i" % start) # jump to the start marker - self.runCmd("thread step-in") # step into the min fn - self.runCmd("j %i" % jump) # jump to the branch we're interested in - self.runCmd("thread step-out") # return out - self.runCmd("thread step-over") # assign to the global - self.expect("expr %s" % var, substrs = [value]) # check it - - def thread_jump_test(self): - """Test thread exit handling.""" + self.build(dictionary=self.getBuildFlags()) exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) @@ -67,6 +47,14 @@ class ThreadJumpTestCase(TestBase): # Try jumping to another function (without forcing) self.expect("j main.cpp:%i" % self.mark1, COMMAND_FAILED_AS_EXPECTED, error = True, substrs = ["error"]) + + def do_min_test(self, start, jump, var, value): + self.runCmd("j %i" % start) # jump to the start marker + self.runCmd("thread step-in") # step into the min fn + self.runCmd("j %i" % jump) # jump to the branch we're interested in + self.runCmd("thread step-out") # return out + self.runCmd("thread step-over") # assign to the global + self.expect("expr %s" % var, substrs = [value]) # check it if __name__ == '__main__': import atexit diff --git a/lldb/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py b/lldb/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py index bf0b2bbd16c..cf6cda62a30 100644 --- a/lldb/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py +++ b/lldb/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py @@ -12,32 +12,19 @@ class MultipleBreakpointTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained - @dsym_test - def test_with_dsym(self): - """Test simultaneous breakpoints in multiple threads.""" - self.buildDsym(dictionary=self.getBuildFlags()) - self.multiple_breakpoint_test() - - @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained - @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained - @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained - @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly - @dwarf_test - def test_with_dwarf(self): - """Test simultaneous breakpoints in multiple threads.""" - self.buildDwarf(dictionary=self.getBuildFlags()) - self.multiple_breakpoint_test() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number for our breakpoint. self.breakpoint = line_number('main.cpp', '// Set breakpoint here') - def multiple_breakpoint_test(self): + @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained + @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained + @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained + @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly + def test(self): """Test simultaneous breakpoints in multiple threads.""" + self.build(dictionary=self.getBuildFlags()) exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) diff --git a/lldb/test/functionalities/thread/state/TestThreadStates.py b/lldb/test/functionalities/thread/state/TestThreadStates.py index 41b2c34a82b..e1f29a40b05 100644 --- a/lldb/test/functionalities/thread/state/TestThreadStates.py +++ b/lldb/test/functionalities/thread/state/TestThreadStates.py @@ -12,88 +12,43 @@ class ThreadStateTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - @expectedFailureDarwin("rdar://15367566") - def test_state_after_breakpoint_with_dsym(self): - """Test thread state after breakpoint.""" - self.buildDsym(dictionary=self.getBuildFlags(use_cpp11=False)) - self.thread_state_after_breakpoint_test() - @expectedFailureDarwin("rdar://15367566") @expectedFailureFreeBSD('llvm.org/pr15824') @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly - @dwarf_test - def test_state_after_breakpoint_with_dwarf(self): + def test_state_after_breakpoint(self): """Test thread state after breakpoint.""" - self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False)) + self.build(dictionary=self.getBuildFlags(use_cpp11=False)) self.thread_state_after_breakpoint_test() - @skipUnlessDarwin - @dsym_test - def test_state_after_continue_with_dsym(self): - """Test thread state after continue.""" - self.buildDsym(dictionary=self.getBuildFlags(use_cpp11=False)) - self.thread_state_after_continue_test() - - @dwarf_test @skipIfDarwin # 'llvm.org/pr23669', cause Python crash randomly @expectedFailureDarwin('llvm.org/pr23669') @expectedFailureWindows("llvm.org/pr24660") - def test_state_after_continue_with_dwarf(self): + def test_state_after_continue(self): """Test thread state after continue.""" - self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False)) - self.thread_state_after_continue_test() - - @skipUnlessDarwin - @skipIfDarwin # 'llvm.org/pr23669', cause Python crash randomly - @expectedFailureDarwin('llvm.org/pr23669') - @dsym_test - def test_state_after_expression_with_dsym(self): - """Test thread state after expression.""" - self.buildDsym(dictionary=self.getBuildFlags(use_cpp11=False)) + self.build(dictionary=self.getBuildFlags(use_cpp11=False)) self.thread_state_after_continue_test() @skipIfDarwin # 'llvm.org/pr23669', cause Python crash randomly @expectedFailureDarwin('llvm.org/pr23669') @expectedFailureWindows("llvm.org/pr24660") - @dwarf_test - def test_state_after_expression_with_dwarf(self): + def test_state_after_expression(self): """Test thread state after expression.""" - self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False)) + self.build(dictionary=self.getBuildFlags(use_cpp11=False)) self.thread_state_after_continue_test() - @skipUnlessDarwin - @dsym_test - @unittest2.expectedFailure("llvm.org/pr16172") # thread states not properly maintained - def test_process_interrupt_with_dsym(self): - """Test process interrupt.""" - self.buildDsym(dictionary=self.getBuildFlags(use_cpp11=False)) - self.process_interrupt_test() - - @dwarf_test @unittest2.expectedFailure("llvm.org/pr16712") # thread states not properly maintained @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly - def test_process_interrupt_with_dwarf(self): + def test_process_interrupt(self): """Test process interrupt.""" - self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False)) + self.build(dictionary=self.getBuildFlags(use_cpp11=False)) self.process_interrupt_test() - @skipUnlessDarwin - @dsym_test - @unittest2.expectedFailure("llvm.org/pr15824") # thread states not properly maintained - def test_process_state_with_dsym(self): - """Test thread states (comprehensive).""" - self.buildDsym(dictionary=self.getBuildFlags(use_cpp11=False)) - self.thread_states_test() - - @dwarf_test @unittest2.expectedFailure("llvm.org/pr15824") # thread states not properly maintained @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly - def test_process_state_with_dwarf(self): + def test_process_state(self): """Test thread states (comprehensive).""" - self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False)) + self.build(dictionary=self.getBuildFlags(use_cpp11=False)) self.thread_states_test() def setUp(self): diff --git a/lldb/test/functionalities/thread/step_out/TestThreadStepOut.py b/lldb/test/functionalities/thread/step_out/TestThreadStepOut.py index 2f26fc898d5..96a62e3ddca 100644 --- a/lldb/test/functionalities/thread/step_out/TestThreadStepOut.py +++ b/lldb/test/functionalities/thread/step_out/TestThreadStepOut.py @@ -12,52 +12,31 @@ class ThreadStepOutTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @dsym_test - def test_step_single_thread_with_dsym(self): - """Test thread step out on one thread via command interpreter. """ - self.buildDsym(dictionary=self.getBuildFlags()) - self.step_out_test(self.step_out_single_thread_with_cmd) - @skipIfLinux # Test occasionally times out on the Linux build bot @expectedFailureLinux("llvm.org/pr23477") # Test occasionally times out on the Linux build bot @expectedFailureFreeBSD("llvm.org/pr18066") # inferior does not exit @expectedFailureWindows # Test crashes - @dwarf_test - def test_step_single_thread_with_dwarf(self): + def test_step_single_thread(self): """Test thread step out on one thread via command interpreter. """ - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.step_out_test(self.step_out_single_thread_with_cmd) - @dsym_test - def test_step_all_threads_with_dsym(self): - """Test thread step out on all threads via command interpreter. """ - self.buildDsym(dictionary=self.getBuildFlags()) - self.step_out_test(self.step_out_all_threads_with_cmd) - @skipIfLinux # Test occasionally times out on the Linux build bot @expectedFailureLinux("llvm.org/pr23477") # Test occasionally times out on the Linux build bot @expectedFailureFreeBSD("llvm.org/pr19347") # 2nd thread stops at breakpoint @expectedFailureWindows # Test crashes - @dwarf_test - def test_step_all_threads_with_dwarf(self): + def test_step_all_threads(self): """Test thread step out on all threads via command interpreter. """ - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.step_out_test(self.step_out_all_threads_with_cmd) - @dsym_test - def test_python_with_dsym(self): - """Test thread step out on one threads via Python API (dsym).""" - self.buildDsym(dictionary=self.getBuildFlags()) - self.step_out_test(self.step_out_with_python) - @skipIfLinux # Test occasionally times out on the Linux build bot @expectedFailureLinux("llvm.org/pr23477") # Test occasionally times out on the Linux build bot @expectedFailureFreeBSD("llvm.org/pr19347") @expectedFailureWindows("llvm.org/pr24681") - @dwarf_test - def test_python_with_dwarf(self): + def test_python(self): """Test thread step out on one thread via Python API (dwarf).""" - self.buildDwarf(dictionary=self.getBuildFlags()) + self.build(dictionary=self.getBuildFlags()) self.step_out_test(self.step_out_with_python) def setUp(self): diff --git a/lldb/test/functionalities/thread/thread_exit/TestThreadExit.py b/lldb/test/functionalities/thread/thread_exit/TestThreadExit.py index 3155ef0e63d..99f7ac63b20 100644 --- a/lldb/test/functionalities/thread/thread_exit/TestThreadExit.py +++ b/lldb/test/functionalities/thread/thread_exit/TestThreadExit.py @@ -12,21 +12,6 @@ class ThreadExitTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym(self): - """Test thread exit handling.""" - self.buildDsym(dictionary=self.getBuildFlags()) - self.thread_exit_test() - - @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained - @expectedFailureWindows("llvm.org/pr24681") - @dwarf_test - def test_with_dwarf(self): - """Test thread exit handling.""" - self.buildDwarf(dictionary=self.getBuildFlags()) - self.thread_exit_test() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) @@ -36,8 +21,11 @@ class ThreadExitTestCase(TestBase): self.break_3 = line_number('main.cpp', '// Set third breakpoint here') self.break_4 = line_number('main.cpp', '// Set fourth breakpoint here') - def thread_exit_test(self): + @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained + @expectedFailureWindows("llvm.org/pr24681") + def test(self): """Test thread exit handling.""" + self.build(dictionary=self.getBuildFlags()) exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) diff --git a/lldb/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py b/lldb/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py index 99eebc6daa4..1c22ae858a0 100644 --- a/lldb/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py +++ b/lldb/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py @@ -12,27 +12,14 @@ class ThreadSpecificBreakTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @python_api_test - @dsym_test - def test_with_dsym_python(self): - """Test that we obey thread conditioned breakpoints.""" - self.buildDsym() - self.do_thread_specific_break() - @skipIfFreeBSD # test frequently times out or hangs @expectedFailureFreeBSD('llvm.org/pr18522') # hits break in another thread in testrun @expectedFailureWindows("llvm.org/pr24777") @python_api_test - @dwarf_test @expectedFlakeyLinux # this test fails 6/100 dosep runs - def test_with_dwarf_python(self): - """Test that we obey thread conditioned breakpoints.""" - self.buildDwarf() - self.do_thread_specific_break() - - def do_thread_specific_break(self): + def test_python(self): """Test that we obey thread conditioned breakpoints.""" + self.build() exe = os.path.join(os.getcwd(), "a.out") self.dbg.HandleCommand ("log enable -f /tmp/lldb-testsuite-log.txt lldb step breakpoint process") diff --git a/lldb/test/functionalities/tty/TestTerminal.py b/lldb/test/functionalities/tty/TestTerminal.py index 3905459f68a..e346e1cd0cd 100644 --- a/lldb/test/functionalities/tty/TestTerminal.py +++ b/lldb/test/functionalities/tty/TestTerminal.py @@ -16,17 +16,13 @@ class LaunchInTerminalTestCase(TestBase): # a program in a separate terminal window. It would be great if other platforms # added support for this. @skipUnlessDarwin - - # If the test is being run under sudo, the spawned terminal won't retain that elevated # privilege so it can't open the socket to talk back to the test case - @unittest2.skipIf(hasattr(os, 'geteuid') and os.geteuid() == 0, - "test cannot be run as root") - + @unittest2.skipIf(hasattr(os, 'geteuid') and os.geteuid() == 0, "test cannot be run as root") # Do we need to disable this test if the testsuite is being run on a remote system? # This env var is only defined when the shell is running in a local mac terminal window @unittest2.skipUnless(os.environ.has_key('TERM_PROGRAM'), "test must be run on local system") - + @no_debug_info_test def test_launch_in_terminal (self): exe = "/bin/ls" target = self.dbg.CreateTarget(exe) diff --git a/lldb/test/functionalities/type_completion/TestTypeCompletion.py b/lldb/test/functionalities/type_completion/TestTypeCompletion.py index db66ec89319..0e11ff67e3a 100644 --- a/lldb/test/functionalities/type_completion/TestTypeCompletion.py +++ b/lldb/test/functionalities/type_completion/TestTypeCompletion.py @@ -12,27 +12,11 @@ class TypeCompletionTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Check that types only get completed when necessary.""" - self.buildDsym() - self.type_completion_commands() - - @dwarf_test @expectedFailureIcc # often fails with 'NameAndAddress should be valid' # Fails with gcc 4.8.1 with llvm.org/pr15301 LLDB prints incorrect sizes of STL containers - def test_with_dwarf_and_run_command(self): - """Check that types only get completed when necessary.""" - self.buildDwarf() - self.type_completion_commands() - - def setUp(self): - # Call super's setUp(). - TestBase.setUp(self) - - def type_completion_commands(self): + def test_with_run_command(self): """Check that types only get completed when necessary.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_source_regexp (self, "// Set break point at this line.") diff --git a/lldb/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py b/lldb/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py index 88501c3abd2..16b44857ac1 100644 --- a/lldb/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py +++ b/lldb/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py @@ -11,24 +11,13 @@ import lldbutil class NoreturnUnwind(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym (self): - """Test that we can backtrace correctly with 'noreturn' functions on the stack""" - self.buildDsym() - self.setTearDownCleanup() - self.noreturn_unwind_tests() - - @dwarf_test @expectedFailurei386 #xfail to get buildbot green, failing config: i386 binary running on ubuntu 14.04 x86_64 @skipIfWindows # clang-cl does not support gcc style attributes. - def test_with_dwarf (self): + def test (self): """Test that we can backtrace correctly with 'noreturn' functions on the stack""" - self.buildDwarf() + self.build() self.setTearDownCleanup() - self.noreturn_unwind_tests() - def noreturn_unwind_tests (self): exe = os.path.join(os.getcwd(), "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) diff --git a/lldb/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py b/lldb/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py index 541fe51e939..9aec735baca 100644 --- a/lldb/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py +++ b/lldb/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py @@ -14,22 +14,11 @@ class SigtrampUnwind(TestBase): # On different platforms the "_sigtramp" and "__kill" frames are likely to be different. # This test could probably be adapted to run on linux/*bsd easily enough. @skipUnlessDarwin - @dsym_test - def test_with_dsym (self): + def test (self): """Test that we can backtrace correctly with _sigtramp on the stack""" - self.buildDsym() + self.build() self.setTearDownCleanup() - self.sigtramp_unwind_tests() - @skipUnlessDarwin - @dwarf_test - def test_with_dwarf (self): - """Test that we can backtrace correctly with _sigtramp on the stack""" - self.buildDwarf() - self.setTearDownCleanup() - self.sigtramp_unwind_tests() - - def sigtramp_unwind_tests (self): exe = os.path.join(os.getcwd(), "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) diff --git a/lldb/test/functionalities/value_md5_crash/TestValueMD5Crash.py b/lldb/test/functionalities/value_md5_crash/TestValueMD5Crash.py index 67885aa41c3..2f735871008 100644 --- a/lldb/test/functionalities/value_md5_crash/TestValueMD5Crash.py +++ b/lldb/test/functionalities/value_md5_crash/TestValueMD5Crash.py @@ -12,28 +12,16 @@ class ValueMD5CrashTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_with_dsym_and_run_command(self): - """Verify that the hash computing logic for ValueObject's values can't crash us.""" - self.buildDsym() - self.doThings() - - @dwarf_test - @expectedFailureWindows("llvm.org/pr24663") - def test_with_dwarf_and_run_command(self): - """Verify that the hash computing logic for ValueObject's values can't crash us.""" - self.buildDwarf() - self.doThings() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// break here') - def doThings(self): + @expectedFailureWindows("llvm.org/pr24663") + def test_with_run_command(self): """Verify that the hash computing logic for ValueObject's values can't crash us.""" + self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) diff --git a/lldb/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py b/lldb/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py index 3c7067d07cb..624dc567aab 100644 --- a/lldb/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py +++ b/lldb/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py @@ -13,23 +13,6 @@ class HelloWatchLocationTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_hello_watchlocation_with_dsym(self): - """Test watching a location with '-s size' option.""" - self.buildDsym(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.hello_watchlocation() - - @dwarf_test - @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported - @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows - def test_hello_watchlocation_with_dwarf(self): - """Test watching a location with '-s size' option.""" - self.buildDwarf(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.hello_watchlocation() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) @@ -43,8 +26,12 @@ class HelloWatchLocationTestCase(TestBase): self.exe_name = self.testMethodName self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name} - def hello_watchlocation(self): + @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported + @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows + def test_hello_watchlocation(self): """Test watching a location with '-s size' option.""" + self.build(dictionary=self.d) + self.setTearDownCleanup(dictionary=self.d) exe = os.path.join(os.getcwd(), self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) diff --git a/lldb/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py b/lldb/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py index 6dbd9e9337d..267f61c09eb 100644 --- a/lldb/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py +++ b/lldb/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py @@ -15,22 +15,6 @@ class HelloWatchpointTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @dsym_test - def test_hello_watchpoint_with_dsym_using_watchpoint_set(self): - """Test a simple sequence of watchpoint creation and watchpoint hit.""" - self.buildDsym(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.hello_watchpoint() - - @dwarf_test - @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported - @expectedFailureWindows("llvm.org/pr24446") - def test_hello_watchpoint_with_dwarf_using_watchpoint_set(self): - """Test a simple sequence of watchpoint creation and watchpoint hit.""" - self.buildDwarf(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.hello_watchpoint() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) @@ -43,8 +27,13 @@ class HelloWatchpointTestCase(TestBase): self.exe_name = 'a.out' self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name} - def hello_watchpoint(self): + @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported + @expectedFailureWindows("llvm.org/pr24446") + def test_hello_watchpoint_using_watchpoint_set(self): """Test a simple sequence of watchpoint creation and watchpoint hit.""" + self.build(dictionary=self.d) + self.setTearDownCleanup(dictionary=self.d) + exe = os.path.join(os.getcwd(), self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) diff --git a/lldb/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py b/lldb/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py index 06821fc8157..e1bd0ddc074 100644 --- a/lldb/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py +++ b/lldb/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py @@ -13,37 +13,19 @@ class WatchpointForMultipleThreadsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_watchpoint_multiple_threads_with_dsym(self): - """Test that lldb watchpoint works for multiple threads.""" - self.buildDsym() - self.setTearDownCleanup() - self.hello_multiple_threads() - - @dwarf_test @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows - def test_watchpoint_multiple_threads_with_dwarf(self): + def test_watchpoint_multiple_threads(self): """Test that lldb watchpoint works for multiple threads.""" - self.buildDwarf() + self.build() self.setTearDownCleanup() self.hello_multiple_threads() - @skipUnlessDarwin - @dsym_test - def test_watchpoint_multiple_threads_wp_set_and_then_delete_with_dsym(self): - """Test that lldb watchpoint works for multiple threads, and after the watchpoint is deleted, the watchpoint event should no longer fires.""" - self.buildDsym() - self.setTearDownCleanup() - self.hello_multiple_threads_wp_set_and_then_delete() - - @dwarf_test @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows - def test_watchpoint_multiple_threads_wp_set_and_then_delete_with_dwarf(self): + def test_watchpoint_multiple_threads_wp_set_and_then_delete(self): """Test that lldb watchpoint works for multiple threads, and after the watchpoint is deleted, the watchpoint event should no longer fires.""" - self.buildDwarf() + self.build() self.setTearDownCleanup() self.hello_multiple_threads_wp_set_and_then_delete() diff --git a/lldb/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py b/lldb/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py index fa546ba1647..d13c89ce667 100644 --- a/lldb/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py +++ b/lldb/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py @@ -13,44 +13,11 @@ class TestStepOverWatchpoint(TestBase): def getCategories(self): return ['basic_process'] - @skipUnlessDarwin - @dsym_test - def test_with_dsym(self): - """Test stepping over watchpoints.""" - self.buildDsym() - self.step_over_watchpoint() - - @dwarf_test @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported @expectedFailureWindows("llvm.org/pr24446") - def test_with_dwarf(self): - """Test stepping over watchpoints.""" - self.buildDwarf() - self.step_over_watchpoint() - - def setUp(self): - TestBase.setUp(self) - - def step_inst_for_watchpoint(self, wp_id): - watchpoint_hit = False - current_line = self.frame().GetLineEntry().GetLine() - while self.frame().GetLineEntry().GetLine() == current_line: - self.thread().StepInstruction(False) # step_over=False - stop_reason = self.thread().GetStopReason() - if stop_reason == lldb.eStopReasonWatchpoint: - self.assertFalse(watchpoint_hit, "Watchpoint already hit.") - expected_stop_desc = "watchpoint %d" % wp_id - actual_stop_desc = self.thread().GetStopDescription(20) - self.assertTrue(actual_stop_desc == expected_stop_desc, - "Watchpoint ID didn't match.") - watchpoint_hit = True - else: - self.assertTrue(stop_reason == lldb.eStopReasonPlanComplete, - STOPPED_DUE_TO_STEP_IN) - self.assertTrue(watchpoint_hit, "Watchpoint never hit.") - - def step_over_watchpoint(self): + def test(self): """Test stepping over watchpoints.""" + self.build() exe = os.path.join(os.getcwd(), 'a.out') target = self.dbg.CreateTarget(exe) @@ -119,6 +86,24 @@ class TestStepOverWatchpoint(TestBase): self.step_inst_for_watchpoint(2) + def step_inst_for_watchpoint(self, wp_id): + watchpoint_hit = False + current_line = self.frame().GetLineEntry().GetLine() + while self.frame().GetLineEntry().GetLine() == current_line: + self.thread().StepInstruction(False) # step_over=False + stop_reason = self.thread().GetStopReason() + if stop_reason == lldb.eStopReasonWatchpoint: + self.assertFalse(watchpoint_hit, "Watchpoint already hit.") + expected_stop_desc = "watchpoint %d" % wp_id + actual_stop_desc = self.thread().GetStopDescription(20) + self.assertTrue(actual_stop_desc == expected_stop_desc, + "Watchpoint ID didn't match.") + watchpoint_hit = True + else: + self.assertTrue(stop_reason == lldb.eStopReasonPlanComplete, + STOPPED_DUE_TO_STEP_IN) + self.assertTrue(watchpoint_hit, "Watchpoint never hit.") + if __name__ == '__main__': import atexit lldb.SBDebugger.Initialize() diff --git a/lldb/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py b/lldb/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py index 5f9a7f1e136..2c4b3e1142e 100644 --- a/lldb/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py +++ b/lldb/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py @@ -20,22 +20,6 @@ class WatchedVariableHitWhenInScopeTestCase(TestBase): # clearer API to express this. # - @dsym_test - @unittest2.expectedFailure("rdar://problem/18685649") - def test_watched_var_should_only_hit_when_in_scope_with_dsym(self): - """Test that a variable watchpoint should only hit when in scope.""" - self.buildDsym(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.watched_var() - - @unittest2.expectedFailure("rdar://problem/18685649") - @dwarf_test - def test_watched_var_should_only_hit_when_in_scope_with_dwarf(self): - """Test that a variable watchpoint should only hit when in scope.""" - self.buildDwarf(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.watched_var() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) @@ -44,8 +28,12 @@ class WatchedVariableHitWhenInScopeTestCase(TestBase): self.exe_name = self.testMethodName self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name} - def watched_var(self): - """Test a simple sequence of watchpoint creation and watchpoint hit.""" + @unittest2.expectedFailure("rdar://problem/18685649") + def test_watched_var_should_only_hit_when_in_scope(self): + """Test that a variable watchpoint should only hit when in scope.""" + self.build(dictionary=self.d) + self.setTearDownCleanup(dictionary=self.d) + exe = os.path.join(os.getcwd(), self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) diff --git a/lldb/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py b/lldb/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py index 11583a501b5..cc0523085e2 100644 --- a/lldb/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py +++ b/lldb/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py @@ -26,93 +26,13 @@ class WatchpointCommandsTestCase(TestBase): self.exe_name = self.testMethodName self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name} - @skipUnlessDarwin - @dsym_test - def test_rw_watchpoint_with_dsym(self): - """Test read_write watchpoint and expect to stop two times.""" - self.buildDsym(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.normal_read_write_watchpoint() - - @dwarf_test @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows - def test_rw_watchpoint_with_dwarf(self): + def test_rw_watchpoint(self): """Test read_write watchpoint and expect to stop two times.""" - self.buildDwarf(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.normal_read_write_watchpoint() - - @skipUnlessDarwin - @dsym_test - def test_rw_watchpoint_delete_with_dsym(self): - """Test delete watchpoint and expect not to stop for watchpoint.""" - self.buildDsym(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.delete_read_write_watchpoint() - - @dwarf_test - @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported - @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows - def test_rw_watchpoint_delete_with_dwarf(self): - """Test delete watchpoint and expect not to stop for watchpoint.""" - self.buildDwarf(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.delete_read_write_watchpoint() - - @skipUnlessDarwin - @dsym_test - def test_rw_watchpoint_set_ignore_count_with_dsym(self): - """Test watchpoint ignore count and expect to not to stop at all.""" - self.buildDsym(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.ignore_read_write_watchpoint() - - @dwarf_test - @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported - @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows - def test_rw_watchpoint_set_ignore_count_with_dwarf(self): - """Test watchpoint ignore count and expect to not to stop at all.""" - self.buildDwarf(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.ignore_read_write_watchpoint() - - @skipUnlessDarwin - @dsym_test - def test_rw_disable_after_first_stop_with_dsym(self): - """Test read_write watchpoint but disable it after the first stop.""" - self.buildDsym(dictionary=self.d) + self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - self.read_write_watchpoint_disable_after_first_stop() - - @dwarf_test - @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported - @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows - def test_rw_disable_after_first_stop__with_dwarf(self): - """Test read_write watchpoint but disable it after the first stop.""" - self.buildDwarf(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.read_write_watchpoint_disable_after_first_stop() - - @skipUnlessDarwin - @dsym_test - def test_rw_disable_then_enable_with_dsym(self): - """Test read_write watchpoint, disable initially, then enable it.""" - self.buildDsym(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.read_write_watchpoint_disable_then_enable() - - @dwarf_test - @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported - @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows - def test_rw_disable_then_enable_with_dwarf(self): - """Test read_write watchpoint, disable initially, then enable it.""" - self.buildDwarf(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.read_write_watchpoint_disable_then_enable() - - def normal_read_write_watchpoint(self): - """Do read_write watchpoint and expect to stop two times.""" + exe = os.path.join(os.getcwd(), self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) @@ -166,147 +86,13 @@ class WatchpointCommandsTestCase(TestBase): self.expect("watchpoint list -v", substrs = ['hit_count = 2']) - def delete_read_write_watchpoint(self): - """Do delete watchpoint immediately and expect not to stop for watchpoint.""" - exe = os.path.join(os.getcwd(), self.exe_name) - self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) - - # Add a breakpoint to set a watchpoint when stopped on the breakpoint. - lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1) - - # Run the program. - self.runCmd("run", RUN_SUCCEEDED) - - # We should be stopped again due to the breakpoint. - # The stop reason of the thread should be breakpoint. - self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT, - substrs = ['stopped', - 'stop reason = breakpoint']) - - # Now let's set a read_write-type watchpoint for 'global'. - # There should be two watchpoint hits (see main.c). - self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED, - substrs = ['Watchpoint created', 'size = 4', 'type = rw', - '%s:%d' % (self.source, self.decl)]) - - # Delete the watchpoint immediately, but set auto-confirm to true first. - self.runCmd("settings set auto-confirm true") - self.expect("watchpoint delete", - substrs = ['All watchpoints removed.']) - # Restore the original setting of auto-confirm. - self.runCmd("settings clear auto-confirm") - - # Use the '-v' option to do verbose listing of the watchpoint. - self.runCmd("watchpoint list -v") - - self.runCmd("process continue") - - # There should be no more watchpoint hit and the process status should - # be 'exited'. - self.expect("process status", - substrs = ['exited']) - - def ignore_read_write_watchpoint(self): - """Test watchpoint ignore count and expect to not to stop at all.""" - exe = os.path.join(os.getcwd(), self.exe_name) - self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) - - # Add a breakpoint to set a watchpoint when stopped on the breakpoint. - lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1) - - # Run the program. - self.runCmd("run", RUN_SUCCEEDED) - - # We should be stopped again due to the breakpoint. - # The stop reason of the thread should be breakpoint. - self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT, - substrs = ['stopped', - 'stop reason = breakpoint']) - - # Now let's set a read_write-type watchpoint for 'global'. - # There should be two watchpoint hits (see main.c). - self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED, - substrs = ['Watchpoint created', 'size = 4', 'type = rw', - '%s:%d' % (self.source, self.decl)]) - - # Set the ignore count of the watchpoint immediately. - self.expect("watchpoint ignore -i 2", - substrs = ['All watchpoints ignored.']) - - # Use the '-v' option to do verbose listing of the watchpoint. - # Expect to find an ignore_count of 2. - self.expect("watchpoint list -v", - substrs = ['hit_count = 0', 'ignore_count = 2']) - - self.runCmd("process continue") - - # There should be no more watchpoint hit and the process status should - # be 'exited'. - self.expect("process status", - substrs = ['exited']) - - # Use the '-v' option to do verbose listing of the watchpoint. - # Expect to find a hit_count of 2 as well. - self.expect("watchpoint list -v", - substrs = ['hit_count = 2', 'ignore_count = 2']) - - def read_write_watchpoint_disable_after_first_stop(self): - """Do read_write watchpoint but disable it after the first stop.""" - exe = os.path.join(os.getcwd(), self.exe_name) - self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) - - # Add a breakpoint to set a watchpoint when stopped on the breakpoint. - lldbutil.run_break_set_by_file_and_line (self, "main.m") - - # Run the program. - self.runCmd("run", RUN_SUCCEEDED) - - # We should be stopped again due to the breakpoint. - # The stop reason of the thread should be breakpoint. - self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT, - substrs = ['stopped', - 'stop reason = breakpoint']) - - # Now let's set a read_write-type watchpoint for 'global'. - # There should be two watchpoint hits (see main.c). - self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED, - substrs = ['Watchpoint created', 'size = 4', 'type = rw', - '%s:%d' % (self.source, self.decl)]) - - # Use the '-v' option to do verbose listing of the watchpoint. - # The hit count should be 0 initially. - self.expect("watchpoint list -v", - substrs = ['Number of supported hardware watchpoints:', - 'hit_count = 0']) - - self.runCmd("process continue") - - # We should be stopped again due to the watchpoint (read_write type). - # The stop reason of the thread should be watchpoint. - self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT, - substrs = ['stop reason = watchpoint']) - - self.runCmd("process continue") - - # We should be stopped again due to the watchpoint (read_write type). - # The stop reason of the thread should be watchpoint. - self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT, - substrs = ['stop reason = watchpoint']) - - self.runCmd("process continue") - - # There should be no more watchpoint hit and the process status should - # be 'exited'. - self.expect("process status", - substrs = ['exited']) - - # Use the '-v' option to do verbose listing of the watchpoint. - # The hit count should now be 2. - self.expect("watchpoint list -v", - substrs = ['hit_count = 2']) - - def delete_read_write_watchpoint(self): - """Do delete watchpoint immediately and expect not to stop for watchpoint.""" + @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported + @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows + def test_rw_watchpoint_delete(self): + """Test delete watchpoint and expect not to stop for watchpoint.""" + self.build(dictionary=self.d) + self.setTearDownCleanup(dictionary=self.d) + exe = os.path.join(os.getcwd(), self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) @@ -345,8 +131,13 @@ class WatchpointCommandsTestCase(TestBase): self.expect("process status", substrs = ['exited']) - def ignore_read_write_watchpoint(self): + @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported + @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows + def test_rw_watchpoint_set_ignore_count(self): """Test watchpoint ignore count and expect to not to stop at all.""" + self.build(dictionary=self.d) + self.setTearDownCleanup(dictionary=self.d) + exe = os.path.join(os.getcwd(), self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) @@ -389,8 +180,13 @@ class WatchpointCommandsTestCase(TestBase): self.expect("watchpoint list -v", substrs = ['hit_count = 2', 'ignore_count = 2']) - def read_write_watchpoint_disable_after_first_stop(self): - """Do read_write watchpoint but disable it after the first stop.""" + @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported + @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows + def test_rw_disable_after_first_stop(self): + """Test read_write watchpoint but disable it after the first stop.""" + self.build(dictionary=self.d) + self.setTearDownCleanup(dictionary=self.d) + exe = os.path.join(os.getcwd(), self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) @@ -443,8 +239,13 @@ class WatchpointCommandsTestCase(TestBase): self.expect("watchpoint list -v", substrs = ['hit_count = 1']) - def read_write_watchpoint_disable_then_enable(self): - """Do read_write watchpoint, disable initially, then enable it.""" + @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported + @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows + def test_rw_disable_then_enable(self): + """Test read_write watchpoint, disable initially, then enable it.""" + self.build(dictionary=self.d) + self.setTearDownCleanup(dictionary=self.d) + exe = os.path.join(os.getcwd(), self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) diff --git a/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py b/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py index cf1df78f255..2d269fd4d36 100644 --- a/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py +++ b/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py @@ -25,42 +25,13 @@ class WatchpointLLDBCommandTestCase(TestBase): self.exe_name = 'a%d.out' % self.test_number self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name} - @skipUnlessDarwin - @dsym_test - def test_watchpoint_command_with_dsym(self): - """Test 'watchpoint command'.""" - self.buildDsym(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.watchpoint_command() - - @dwarf_test @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows - def test_watchpoint_command_with_dwarf(self): + def test_watchpoint_command(self): """Test 'watchpoint command'.""" - self.buildDwarf(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.watchpoint_command() - - @skipUnlessDarwin - @dsym_test - def test_watchpoint_command_can_disable_a_watchpoint_with_dsym(self): - """Test that 'watchpoint command' action can disable a watchpoint after it is triggered.""" - self.buildDsym(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.watchpoint_command_can_disable_a_watchpoint() - - @dwarf_test - @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported - @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows - def test_watchpoint_command_can_disable_a_watchpoint_with_dwarf(self): - """Test that 'watchpoint command' action can disable a watchpoint after it is triggered.""" - self.buildDwarf(dictionary=self.d) + self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - self.watchpoint_command_can_disable_a_watchpoint() - - def watchpoint_command(self): - """Do 'watchpoint command add'.""" + exe = os.path.join(os.getcwd(), self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) @@ -108,8 +79,13 @@ class WatchpointLLDBCommandTestCase(TestBase): self.expect("frame variable --show-globals cookie", substrs = ['(int32_t)', 'cookie = 777']) - def watchpoint_command_can_disable_a_watchpoint(self): + @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported + @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows + def test_watchpoint_command_can_disable_a_watchpoint(self): """Test that 'watchpoint command' action can disable a watchpoint after it is triggered.""" + self.build(dictionary=self.d) + self.setTearDownCleanup(dictionary=self.d) + exe = os.path.join(os.getcwd(), self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) diff --git a/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py b/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py index 98da3b97bea..79566fbd9e9 100644 --- a/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py +++ b/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py @@ -25,26 +25,14 @@ class WatchpointPythonCommandTestCase(TestBase): self.exe_name = self.testMethodName self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name} - @skipUnlessDarwin - @dsym_test - def test_watchpoint_command_with_dsym(self): - """Test 'watchpoint command'.""" - self.buildDsym(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.watchpoint_command() - - @dwarf_test @skipIfFreeBSD # timing out on buildbot @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported - def test_watchpoint_command_with_dwarf(self): + def test_watchpoint_command(self): """Test 'watchpoint command'.""" - self.buildDwarf(dictionary=self.d) + self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - self.watchpoint_command() - def watchpoint_command(self): - """Do 'watchpoint command add'.""" exe = os.path.join(os.getcwd(), self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) diff --git a/lldb/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py b/lldb/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py index 929e66a3b21..726b80f1ed4 100644 --- a/lldb/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py +++ b/lldb/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py @@ -25,25 +25,13 @@ class WatchpointConditionCmdTestCase(TestBase): self.exe_name = self.testMethodName self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name} - @skipUnlessDarwin - @dsym_test - def test_watchpoint_cond_with_dsym(self): - """Test watchpoint condition.""" - self.buildDsym(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.watchpoint_condition() - - @dwarf_test @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows - def test_watchpoint_cond_with_dwarf(self): + def test_watchpoint_cond(self): """Test watchpoint condition.""" - self.buildDwarf(dictionary=self.d) + self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - self.watchpoint_condition() - def watchpoint_condition(self): - """Do watchpoint condition 'global==5'.""" exe = os.path.join(os.getcwd(), self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) diff --git a/lldb/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py b/lldb/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py index 92a3c1ba3c2..307be3a50f1 100644 --- a/lldb/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py +++ b/lldb/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py @@ -10,46 +10,19 @@ class TestWatchpointEvents (TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @python_api_test - @dsym_test - def test_with_dsym_and_python_api(self): - """Test that adding, deleting and modifying watchpoints sends the appropriate events.""" - self.buildDsym() - self.step_over_stepping() - - @python_api_test - @dwarf_test - @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported - @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows - def test_with_dwarf_and_python_api(self): - """Test that adding, deleting and modifying watchpoints sends the appropriate events.""" - self.buildDwarf() - self.step_over_stepping() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line numbers that we will step to in main: self.main_source = "main.c" - def GetWatchpointEvent (self, event_type): - # We added a watchpoint so we should get a watchpoint added event. - event = lldb.SBEvent() - success = self.listener.WaitForEvent (1, event) - self.assertTrue(success == True, "Successfully got watchpoint event") - self.assertTrue (lldb.SBWatchpoint.EventIsWatchpointEvent(event), "Event is a watchpoint event.") - found_type = lldb.SBWatchpoint.GetWatchpointEventTypeFromEvent (event) - self.assertTrue (found_type == event_type, "Event is not correct type, expected: %d, found: %d"%(event_type, found_type)) - # There shouldn't be another event waiting around: - found_event = self.listener.PeekAtNextEventForBroadcasterWithType (self.target_bcast, lldb.SBTarget.eBroadcastBitBreakpointChanged, event) - if found_event: - print "Found an event I didn't expect: ", event - - self.assertTrue (not found_event, "Only one event per change.") - - def step_over_stepping(self): - """Use Python APIs to test stepping over and hitting breakpoints.""" + @python_api_test + @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported + @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows + def test_with_python_api(self): + """Test that adding, deleting and modifying watchpoints sends the appropriate events.""" + self.build() + exe = os.path.join(os.getcwd(), "a.out") target = self.dbg.CreateTarget(exe) @@ -97,6 +70,21 @@ class TestWatchpointEvents (TestBase): local_watch.SetCondition ("1 == 2") self.GetWatchpointEvent (lldb.eWatchpointEventTypeConditionChanged) + def GetWatchpointEvent (self, event_type): + # We added a watchpoint so we should get a watchpoint added event. + event = lldb.SBEvent() + success = self.listener.WaitForEvent (1, event) + self.assertTrue(success == True, "Successfully got watchpoint event") + self.assertTrue (lldb.SBWatchpoint.EventIsWatchpointEvent(event), "Event is a watchpoint event.") + found_type = lldb.SBWatchpoint.GetWatchpointEventTypeFromEvent (event) + self.assertTrue (found_type == event_type, "Event is not correct type, expected: %d, found: %d"%(event_type, found_type)) + # There shouldn't be another event waiting around: + found_event = self.listener.PeekAtNextEventForBroadcasterWithType (self.target_bcast, lldb.SBTarget.eBroadcastBitBreakpointChanged, event) + if found_event: + print "Found an event I didn't expect: ", event + + self.assertTrue (not found_event, "Only one event per change.") + if __name__ == '__main__': import atexit lldb.SBDebugger.Initialize() diff --git a/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py b/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py index 2d3d1be22ff..eaa05e83390 100644 --- a/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py +++ b/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py @@ -12,23 +12,6 @@ class WatchLocationUsingWatchpointSetTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin - @dsym_test - def test_watchlocation_with_dsym_using_watchpoint_set(self): - """Test watching a location with 'watchpoint set expression -w write -s size' option.""" - self.buildDsym() - self.setTearDownCleanup() - self.watchlocation_using_watchpoint_set() - - @dwarf_test - @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported - @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows - def test_watchlocation_with_dwarf_using_watchpoint_set(self): - """Test watching a location with 'watchpoint set expression -w write -s size' option.""" - self.buildDwarf() - self.setTearDownCleanup() - self.watchlocation_using_watchpoint_set() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) @@ -40,8 +23,13 @@ class WatchLocationUsingWatchpointSetTestCase(TestBase): self.violating_func = "do_bad_thing_with_location"; # Build dictionary to have unique executable names for each test method. - def watchlocation_using_watchpoint_set(self): - """Test watching a location with '-s size' option.""" + @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported + @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows + def test_watchlocation_using_watchpoint_set(self): + """Test watching a location with 'watchpoint set expression -w write -s size' option.""" + self.build() + self.setTearDownCleanup() + exe = os.path.join(os.getcwd(), 'a.out') self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) diff --git a/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py b/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py index cf6be163d68..9683c88fce9 100644 --- a/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py +++ b/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py @@ -12,12 +12,6 @@ class WatchpointSetErrorTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - def test_error_cases_with_watchpoint_set(self): - """Test error cases with the 'watchpoint set' command.""" - self.buildDwarf() - self.setTearDownCleanup() - self.error_cases_with_watchpoint_set() - def setUp(self): # Call super's setUp(). TestBase.setUp(self) @@ -27,8 +21,11 @@ class WatchpointSetErrorTestCase(TestBase): self.line = line_number(self.source, '// Set break point at this line.') # Build dictionary to have unique executable names for each test method. - def error_cases_with_watchpoint_set(self): + def test_error_cases_with_watchpoint_set(self): """Test error cases with the 'watchpoint set' command.""" + self.build() + self.setTearDownCleanup() + exe = os.path.join(os.getcwd(), 'a.out') self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) |

