forked from OSchip/llvm-project
Fix test expectation in TestNoreturnUnwind
The test case lookinhg for the abort function in the stack trace. Previously it lookd for a function which ends with "abort" but on some system there are multiple such functions (e.g.: on android abort calls __libc_android_abort) what made the test fail. This CL change the behaviour to look for the abort function based on a fix list of names. llvm-svn: 235584
This commit is contained in:
parent
532a031422
commit
f959520efc
|
@ -45,9 +45,8 @@ class NoreturnUnwind(TestBase):
|
|||
thread = process.GetThreadAtIndex(0)
|
||||
abort_frame_number = 0
|
||||
for f in thread.frames:
|
||||
# We use endswith() to look for abort() since some C libraries mangle the symbol into
|
||||
# __GI_abort or similar.
|
||||
if f.GetFunctionName().endswith("abort"):
|
||||
# Some C libraries mangle the abort symbol into __GI_abort.
|
||||
if f.GetFunctionName() in ["abort", "__GI_abort"]:
|
||||
break
|
||||
abort_frame_number = abort_frame_number + 1
|
||||
|
||||
|
|
Loading…
Reference in New Issue