Author: Pavel Labath
Date: 2019-12-09T19:01:52+01:00
New Revision: be05633e28949139093278d5ce57a194756bfb83

URL: 
https://github.com/llvm/llvm-project/commit/be05633e28949139093278d5ce57a194756bfb83
DIFF: 
https://github.com/llvm/llvm-project/commit/be05633e28949139093278d5ce57a194756bfb83.diff

LOG: [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.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git 
a/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile 
b/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile
index c39b681d1870..9c2ed1851093 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile
@@ -5,10 +5,10 @@ ifeq "$(OS)" ""
 endif
 
 ifeq "$(OS)" "Darwin"
-    LDFLAGS = $(CFLAGS) -Xlinker -dead_strip
+    LD_EXTRAS = -Xlinker -dead_strip
 else
-    CFLAGS += -fdata-sections -ffunction-sections
-    LDFLAGS = $(CFLAGS) -Wl,--gc-sections
+    CFLAGS_EXTRAS += -fdata-sections -ffunction-sections
+    LD_EXTRAS = -Wl,--gc-sections
 endif
 
 MAKE_DSYM := NO

diff  --git 
a/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/TestDeadStrip.py
 
b/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/TestDeadStrip.py
index 8a2dfa76f4df..efae35f1ddf5 100644
--- 
a/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/TestDeadStrip.py
+++ 
b/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/TestDeadStrip.py
@@ -15,14 +15,8 @@ class DeadStripTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    @expectedFailureAll(debug_info="dwo", bugnumber="llvm.org/pr25087")
-    @expectedFailureAll(
-        oslist=["linux"],
-        debug_info="gmodules",
-        bugnumber="llvm.org/pr27865")
-    # The -dead_strip linker option isn't supported on FreeBSD versions of ld.
-    @skipIfFreeBSD
+    @expectedFailureAll(oslist=no_match(lldbplatformutil.getDarwinOSTriples()),
+            bugnumber="llvm.org/pr24778 llvm.org/pr25087 llvm.org/pr27865")
     def test(self):
         """Test breakpoint works correctly with dead-code stripping."""
         self.build()


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to