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.

llvm-svn: 187600
This commit is contained in:
Ashok Thirumurthi 2013-08-01 18:52:01 +00:00
parent c205243e8b
commit 1db108972b
3 changed files with 8 additions and 2 deletions

View File

@ -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):

View File

@ -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)

View File

@ -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):