Skip to content

Commit be05633

Browse files
committed
[lldb] Clean up accidentally passing TestDeadStrip.py
This test was accidentally passing on non-darwin OS because it was explicitly setting the CFLAGS make variable. This meant that (in the default config) it was building with absolutely no debug info, and so setting a breakpoint on a stripped symbol failed, because there was really no trace of it remaining. In other configurations, we were generating the debug info (-gsplit-dwarf implies -g) and the test failed because we did not treat the zeroed out debug info address specially. The test was also xfailed in pretty much every non-standard configuration. This patch fixes the makefile to avoid messing with CFLAGS (use CFLAGS_EXTRAS instead). This causes it to fail in all configurations (except darwin), and so I replace the various decorators with a simple os!=darwin check.
1 parent a209a80 commit be05633

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ ifeq "$(OS)" ""
55
endif
66

77
ifeq "$(OS)" "Darwin"
8-
LDFLAGS = $(CFLAGS) -Xlinker -dead_strip
8+
LD_EXTRAS = -Xlinker -dead_strip
99
else
10-
CFLAGS += -fdata-sections -ffunction-sections
11-
LDFLAGS = $(CFLAGS) -Wl,--gc-sections
10+
CFLAGS_EXTRAS += -fdata-sections -ffunction-sections
11+
LD_EXTRAS = -Wl,--gc-sections
1212
endif
1313

1414
MAKE_DSYM := NO

lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/TestDeadStrip.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,8 @@ class DeadStripTestCase(TestBase):
1515

1616
mydir = TestBase.compute_mydir(__file__)
1717

18-
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
19-
@expectedFailureAll(debug_info="dwo", bugnumber="llvm.org/pr25087")
20-
@expectedFailureAll(
21-
oslist=["linux"],
22-
debug_info="gmodules",
23-
bugnumber="llvm.org/pr27865")
24-
# The -dead_strip linker option isn't supported on FreeBSD versions of ld.
25-
@skipIfFreeBSD
18+
@expectedFailureAll(oslist=no_match(lldbplatformutil.getDarwinOSTriples()),
19+
bugnumber="llvm.org/pr24778 llvm.org/pr25087 llvm.org/pr27865")
2620
def test(self):
2721
"""Test breakpoint works correctly with dead-code stripping."""
2822
self.build()

0 commit comments

Comments
 (0)