Disable a test in TestReturnValue on arm64 linux
authorPavel Labath <labath@google.com>
Mon, 15 May 2017 16:25:28 +0000 (16:25 +0000)
committerPavel Labath <labath@google.com>
Mon, 15 May 2017 16:25:28 +0000 (16:25 +0000)
as described in pr33042, we cannot reliably retrieve the return value on
arm64 in cases it is returned via x8 pointer. I tried to do this as
surgically as possible and disabled it only on targets I know to be
affected, as the code is still useful, even though it can only work on
best-effort basis.

llvm-svn: 303076

lldb/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py

index 90562f5..e476c48 100644 (file)
@@ -18,6 +18,10 @@ class ReturnValueTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
+    def affected_by_pr33042(self):
+        return ("clang" in self.getCompiler() and self.getArchitecture() ==
+            "aarch64" and self.getPlatform() == "linux")
+
     @expectedFailureAll(oslist=["freebsd"], archs=["i386"])
     @expectedFailureAll(oslist=["macosx"], archs=["i386"], bugnumber="<rdar://problem/28719652>")
     @expectedFailureAll(
@@ -148,7 +152,8 @@ class ReturnValueTestCase(TestBase):
         self.return_and_test_struct_value("return_two_int")
         self.return_and_test_struct_value("return_three_int")
         self.return_and_test_struct_value("return_four_int")
-        self.return_and_test_struct_value("return_five_int")
+        if not self.affected_by_pr33042():
+            self.return_and_test_struct_value("return_five_int")
 
         self.return_and_test_struct_value("return_two_double")
         self.return_and_test_struct_value("return_one_double_two_float")