aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshok Thirumurthi <ashok.thirumurthi@intel.com>2013-08-01 18:52:01 +0000
committerAshok Thirumurthi <ashok.thirumurthi@intel.com>2013-08-01 18:52:01 +0000
commit23bb947c115986ebad812bc7c04805118feb318f (patch)
tree18d9363ee4734ae118a389380f484ff1223eb3ec
parent7526625a76ca97a2637749b0cc4068bf0bd907fb (diff)
downloadlldb-23bb947c115986ebad812bc7c04805118feb318f.tar.gz
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. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187600 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/functionalities/longjmp/TestLongjmp.py3
-rw-r--r--test/functionalities/longjmp/main.c6
-rw-r--r--test/lang/cpp/stl/TestSTL.py1
3 files changed, 8 insertions, 2 deletions
diff --git a/test/functionalities/longjmp/TestLongjmp.py b/test/functionalities/longjmp/TestLongjmp.py
index adb03adff..763be0969 100644
--- a/test/functionalities/longjmp/TestLongjmp.py
+++ b/test/functionalities/longjmp/TestLongjmp.py
@@ -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):
diff --git a/test/functionalities/longjmp/main.c b/test/functionalities/longjmp/main.c
index 5d3f4364f..3879311eb 100644
--- a/test/functionalities/longjmp/main.c
+++ b/test/functionalities/longjmp/main.c
@@ -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)
diff --git a/test/lang/cpp/stl/TestSTL.py b/test/lang/cpp/stl/TestSTL.py
index b0c64580d..2c09d6b09 100644
--- a/test/lang/cpp/stl/TestSTL.py
+++ b/test/lang/cpp/stl/TestSTL.py
@@ -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):