[Lldb-commits] [lldb] r187600 - Updates TestLongjump to ensure that compiler optimizations don't affect the

Ashok Thirumurthi ashok.thirumurthi at intel.com
Thu Aug 1 11:52:02 PDT 2013


Author: athirumu
Date: Thu Aug  1 13:52:01 2013
New Revision: 187600

URL: http://llvm.org/viewvc/llvm-project?rev=187600&view=rev
Log:
Updates TestLongjump to ensure that compiler optimizations don't affect the
mapping of source to assembly so that the same test script can be used
with more compilers.

Patch by Andy Kaylor!

Also marks the LLDB test of template parameters as xfail on icc.

Modified:
    lldb/trunk/test/functionalities/longjmp/TestLongjmp.py
    lldb/trunk/test/functionalities/longjmp/main.c
    lldb/trunk/test/lang/cpp/stl/TestSTL.py

Modified: lldb/trunk/test/functionalities/longjmp/TestLongjmp.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/longjmp/TestLongjmp.py?rev=187600&r1=187599&r2=187600&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/longjmp/TestLongjmp.py (original)
+++ lldb/trunk/test/functionalities/longjmp/TestLongjmp.py Thu Aug  1 13:52:01 2013
@@ -48,7 +48,7 @@ class LongjmpTestCase(TestBase):
         # Note: Depending on the generated mapping of DWARF to assembly,
         # the process may have stopped or exited.
         self.expect("process status", PROCESS_STOPPED,
-            patterns = ['Process .*'])
+            patterns = ['Process .* exited with status = 0'])
 
     def step_out(self):
         self.start_test("do_jump")
@@ -58,6 +58,7 @@ class LongjmpTestCase(TestBase):
     def step_over(self):
         self.start_test("do_jump")
         self.runCmd("thread step-over", RUN_SUCCEEDED)
+        self.runCmd("thread step-over", RUN_SUCCEEDED)
         self.check_status()
 
     def step_back_out(self):

Modified: lldb/trunk/test/functionalities/longjmp/main.c
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/longjmp/main.c?rev=187600&r1=187599&r2=187600&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/longjmp/main.c (original)
+++ lldb/trunk/test/functionalities/longjmp/main.c Thu Aug  1 13:52:01 2013
@@ -8,12 +8,16 @@
 //===----------------------------------------------------------------------===//
 #include <setjmp.h>
 #include <stdio.h>
+#include <time.h>
 
 jmp_buf j;
 
 void do_jump(void)
 {
-    longjmp(j, 1); // non-local goto
+    // We can't let the compiler know this will always happen or it might make
+    // optimizations that break our test.
+    if (!clock())
+        longjmp(j, 1); // non-local goto
 }
 
 int main (void)

Modified: lldb/trunk/test/lang/cpp/stl/TestSTL.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/stl/TestSTL.py?rev=187600&r1=187599&r2=187600&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/stl/TestSTL.py (original)
+++ lldb/trunk/test/lang/cpp/stl/TestSTL.py Thu Aug  1 13:52:01 2013
@@ -37,6 +37,7 @@ class STLTestCase(TestBase):
         self.sbtype_template_apis()
 
     @skipIfGcc # llvm.org/pr15036: crashes during DWARF parsing when built with GCC
+    @expectedFailureIcc # icc 13.1 and 14-beta do not emit DW_TAG_template_type_parameter
     @python_api_test
     @dwarf_test
     def test_SBType_template_aspects_with_dwarf(self):





More information about the lldb-commits mailing list