[Lldb-commits] [lldb] r175551 - A few more GCC specific test fixes as per logged PRs:

Daniel Malea daniel.malea at intel.com
Tue Feb 19 11:54:16 PST 2013


Author: dmalea
Date: Tue Feb 19 13:54:16 2013
New Revision: 175551

URL: http://llvm.org/viewvc/llvm-project?rev=175551&view=rev
Log:
A few more GCC specific test fixes as per logged PRs:
- TestNamespace expected to fail due to PR-15302
- TestCPPBool and TestUnsignedTypes updated to handle GCC style debug information
- TestRvalueReferences expected fail due to GCC (4.7) not outputting rvalue-reference debug information
- TestDataFormatterStdVBool expected to fail due to PR-15301


Modified:
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py
    lldb/trunk/test/lang/cpp/bool/TestCPPBool.py
    lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py
    lldb/trunk/test/lang/cpp/namespace/TestNamespace.py
    lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py
    lldb/trunk/test/lang/cpp/unsigned_types/TestUnsignedTypes.py

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py?rev=175551&r1=175550&r2=175551&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py Tue Feb 19 13:54:16 2013
@@ -31,6 +31,7 @@ class StdVBoolDataFormatterTestCase(Test
         # Find the line number to break at.
         self.line = line_number('main.cpp', '// Set break point at this line.')
 
+    @expectedFailureGcc # PR-15301: lldb does not print the correct sizes of STL containers when building with GCC
     def data_formatter_commands(self):
         """Test that that file and class static variables display correctly."""
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)

Modified: lldb/trunk/test/lang/cpp/bool/TestCPPBool.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/bool/TestCPPBool.py?rev=175551&r1=175550&r2=175551&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/bool/TestCPPBool.py (original)
+++ lldb/trunk/test/lang/cpp/bool/TestCPPBool.py Tue Feb 19 13:54:16 2013
@@ -26,7 +26,8 @@ class CPPBoolTestCase(TestBase):
         TestBase.setUp(self)
     
     def set_breakpoint(self, line):
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=1, loc_exact=False)
+        locs = 4 if "gcc" in self.getCompiler() else 1
+        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=locs, loc_exact=False)
 
     def static_method_commands(self):
         """Test that bool types work in the expression parser"""

Modified: lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py?rev=175551&r1=175550&r2=175551&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py (original)
+++ lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py Tue Feb 19 13:54:16 2013
@@ -29,6 +29,7 @@ class StaticVariableTestCase(TestBase):
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     #rdar://problem/9980907
     @expectedFailureClang
+    @expectedFailureGcc
     @python_api_test
     @dsym_test
     def test_with_dsym_and_python_api(self):
@@ -38,6 +39,7 @@ class StaticVariableTestCase(TestBase):
 
     #rdar://problem/9980907
     @expectedFailureClang
+    @expectedFailureGcc
     @python_api_test
     @dwarf_test
     def test_with_dwarf_and_python_api(self):

Modified: lldb/trunk/test/lang/cpp/namespace/TestNamespace.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/namespace/TestNamespace.py?rev=175551&r1=175550&r2=175551&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/namespace/TestNamespace.py (original)
+++ lldb/trunk/test/lang/cpp/namespace/TestNamespace.py Tue Feb 19 13:54:16 2013
@@ -21,6 +21,7 @@ class NamespaceTestCase(TestBase):
         self.namespace_variable_commands()
 
     # rdar://problem/8668674
+    @expectedFailureGcc # PR-15302: lldb does not print 'anonymous namespace' when the inferior is built with GCC (4.7)
     @dwarf_test
     def test_with_dwarf_and_run_command(self):
         """Test that anonymous and named namespace variables display correctly."""

Modified: lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py?rev=175551&r1=175550&r2=175551&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py (original)
+++ lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py Tue Feb 19 13:54:16 2013
@@ -21,6 +21,7 @@ class CPPThisTestCase(TestBase):
 
     #rdar://problem/11479676
     @expectedFailureClang
+    @expectedFailureGcc # GCC (4.7) does not emit correct DWARF tags for rvalue-references
     @dwarf_test
     def test_with_dwarf_and_run_command(self):
         """Test that rvalues are supported in the C++ expression parser"""

Modified: lldb/trunk/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/unsigned_types/TestUnsignedTypes.py?rev=175551&r1=175550&r2=175551&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/unsigned_types/TestUnsignedTypes.py (original)
+++ lldb/trunk/test/lang/cpp/unsigned_types/TestUnsignedTypes.py Tue Feb 19 13:54:16 2013
@@ -37,8 +37,11 @@ class UnsignedTypesTestCase(TestBase):
         exe = os.path.join(os.getcwd(), "a.out")
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
+        # GCC puts a breakpoint on the last line of a multi-line expression, so
+        # if GCC is the target compiler, we cannot rely on an exact line match.
+        need_exact = "gcc" not in self.getCompiler()
         # Break on line 19 in main() aftre the variables are assigned values.
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=need_exact)
 
         self.runCmd("run", RUN_SUCCEEDED)
 





More information about the lldb-commits mailing list