Fix test expectation in TestNoreturnUnwind
authorTamas Berghammer <tberghammer@google.com>
Thu, 23 Apr 2015 10:54:27 +0000 (10:54 +0000)
committerTamas Berghammer <tberghammer@google.com>
Thu, 23 Apr 2015 10:54:27 +0000 (10:54 +0000)
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

lldb/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py

index edc154d..5d36205 100644 (file)
@@ -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