aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Lee <davelee.com@gmail.com>2024-03-07 12:55:13 -0800
committerGitHub <noreply@github.com>2024-03-07 12:55:13 -0800
commitecf7db8b52d7061ef8f14c1f7b6fcc370072d087 (patch)
treeff4f8e69c9c2e35826871b5090f427b8fa38cc44
parent11185715a28c6592ca6fe247fe693b305c85627a (diff)
downloadllvm-ecf7db8b52d7061ef8f14c1f7b6fcc370072d087.zip
llvm-ecf7db8b52d7061ef8f14c1f7b6fcc370072d087.tar.gz
llvm-ecf7db8b52d7061ef8f14c1f7b6fcc370072d087.tar.bz2
[lldb] Disable shell tests affected by ld_new bug (#84246)
Equivalent to the changes made in https://github.com/llvm/llvm-project/pull/83941, except to support shell tests.
-rw-r--r--lldb/test/Shell/Unwind/eh-frame-dwarf-unwind.test2
-rw-r--r--lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test2
-rw-r--r--lldb/test/Shell/lit.cfg.py16
3 files changed, 18 insertions, 2 deletions
diff --git a/lldb/test/Shell/Unwind/eh-frame-dwarf-unwind.test b/lldb/test/Shell/Unwind/eh-frame-dwarf-unwind.test
index 3df9906..7b5d665 100644
--- a/lldb/test/Shell/Unwind/eh-frame-dwarf-unwind.test
+++ b/lldb/test/Shell/Unwind/eh-frame-dwarf-unwind.test
@@ -1,7 +1,7 @@
# Test handing of dwarf expressions specifying the location of registers, if
# those expressions refer to the frame's CFA value.
-# UNSUPPORTED: system-windows
+# UNSUPPORTED: system-windows, ld_new-bug
# REQUIRES: target-x86_64, native
# RUN: %clang_host %p/Inputs/call-asm.c %p/Inputs/eh-frame-dwarf-unwind.s -o %t
diff --git a/lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test b/lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test
index 682b0e5..9bc7c78 100644
--- a/lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test
+++ b/lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test
@@ -2,7 +2,7 @@
# points to non-executable memory.
# REQUIRES: target-x86_64
-# UNSUPPORTED: system-windows
+# UNSUPPORTED: system-windows, ld_new-bug
# RUN: %clang_host %p/Inputs/call-asm.c -x assembler-with-cpp %p/Inputs/thread-step-out-ret-addr-check.s -o %t
# RUN: not %lldb %t -s %s -b 2>&1 | FileCheck %s
diff --git a/lldb/test/Shell/lit.cfg.py b/lldb/test/Shell/lit.cfg.py
index d75c1f5..31afe51 100644
--- a/lldb/test/Shell/lit.cfg.py
+++ b/lldb/test/Shell/lit.cfg.py
@@ -1,5 +1,6 @@
# -*- Python -*-
+import json
import os
import platform
import re
@@ -179,3 +180,18 @@ if can_set_dbregs:
if "LD_PRELOAD" in os.environ:
config.available_features.add("ld_preload-present")
+
+# Determine if a specific version of Xcode's linker contains a bug. We want to
+# skip affected tests if they contain this bug.
+if platform.system() == "Darwin":
+ try:
+ raw_version_details = subprocess.check_output(
+ ("xcrun", "ld", "-version_details")
+ )
+ version_details = json.loads(raw_version_details)
+ version = version_details.get("version", "0")
+ version_tuple = tuple(int(x) for x in version.split("."))
+ if (1000,) <= version_tuple <= (1109,):
+ config.available_features.add("ld_new-bug")
+ except:
+ pass