Skip to content

Commit e84c3ea

Browse files
committed
[lldb] Disable shell tests affected by ld_new bug (llvm#84246)
Equivalent to the changes made in llvm#83941, except to support shell tests. (cherry picked from commit ecf7db8)
1 parent 181dd79 commit e84c3ea

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
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
6-
# XFAIL: system-darwin
7-
# See: rdar://120797300
86

97
# RUN: %clang_host %p/Inputs/call-asm.c %p/Inputs/eh-frame-dwarf-unwind.s -o %t
108
# RUN: %lldb %t -s %s -o exit | FileCheck %s

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

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

44
# REQUIRES: target-x86_64
5-
# UNSUPPORTED: system-windows
6-
# XFAIL: system-darwin
7-
# See: rdar://120797300
5+
# UNSUPPORTED: system-windows, ld_new-bug
86

97
# RUN: %clang_host %p/Inputs/call-asm.c -x assembler-with-cpp %p/Inputs/thread-step-out-ret-addr-check.s -o %t
108
# 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
@@ -194,3 +195,18 @@ def calculate_arch_features(arch_string):
194195

195196
if "LD_PRELOAD" in os.environ:
196197
config.available_features.add("ld_preload-present")
198+
199+
# Determine if a specific version of Xcode's linker contains a bug. We want to
200+
# skip affected tests if they contain this bug.
201+
if platform.system() == "Darwin":
202+
try:
203+
raw_version_details = subprocess.check_output(
204+
("xcrun", "ld", "-version_details")
205+
)
206+
version_details = json.loads(raw_version_details)
207+
version = version_details.get("version", "0")
208+
version_tuple = tuple(int(x) for x in version.split("."))
209+
if (1000,) <= version_tuple <= (1109,):
210+
config.available_features.add("ld_new-bug")
211+
except:
212+
pass

0 commit comments

Comments
 (0)