Skip to content

Commit ecf7db8

Browse files
authored
[lldb] Disable shell tests affected by ld_new bug (#84246)
Equivalent to the changes made in #83941, except to support shell tests.
1 parent 1118571 commit ecf7db8

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

lldb/test/Shell/Unwind/eh-frame-dwarf-unwind.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Test handing of dwarf expressions specifying the location of registers, if
22
# those expressions refer to the frame's CFA value.
33

4-
# UNSUPPORTED: system-windows
4+
# UNSUPPORTED: system-windows, ld_new-bug
55
# REQUIRES: target-x86_64, native
66

77
# RUN: %clang_host %p/Inputs/call-asm.c %p/Inputs/eh-frame-dwarf-unwind.s -o %t

lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# points to non-executable memory.
33

44
# REQUIRES: target-x86_64
5-
# UNSUPPORTED: system-windows
5+
# UNSUPPORTED: system-windows, ld_new-bug
66

77
# RUN: %clang_host %p/Inputs/call-asm.c -x assembler-with-cpp %p/Inputs/thread-step-out-ret-addr-check.s -o %t
88
# RUN: not %lldb %t -s %s -b 2>&1 | FileCheck %s

lldb/test/Shell/lit.cfg.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- Python -*-
22

3+
import json
34
import os
45
import platform
56
import re
@@ -179,3 +180,18 @@ def calculate_arch_features(arch_string):
179180

180181
if "LD_PRELOAD" in os.environ:
181182
config.available_features.add("ld_preload-present")
183+
184+
# Determine if a specific version of Xcode's linker contains a bug. We want to
185+
# skip affected tests if they contain this bug.
186+
if platform.system() == "Darwin":
187+
try:
188+
raw_version_details = subprocess.check_output(
189+
("xcrun", "ld", "-version_details")
190+
)
191+
version_details = json.loads(raw_version_details)
192+
version = version_details.get("version", "0")
193+
version_tuple = tuple(int(x) for x in version.split("."))
194+
if (1000,) <= version_tuple <= (1109,):
195+
config.available_features.add("ld_new-bug")
196+
except:
197+
pass

0 commit comments

Comments
 (0)