Skip to content

Conversation

@eronnen
Copy link
Contributor

@eronnen eronnen commented May 25, 2025

The test fails because LLDB does not recognize any function which is not in the symbol table on armv7

https://lab.llvm.org/buildbot/#/builders/18/builds/16431

@eronnen eronnen requested a review from JDevlieghere as a code owner May 25, 2025 12:38
@llvmbot llvmbot added the lldb label May 25, 2025
@llvmbot
Copy link
Member

llvmbot commented May 25, 2025

@llvm/pr-subscribers-lldb

Author: Ely Ronnen (eronnen)

Changes

The test fails because LLDB does not recognize any function which is not in the symbol table on armv7


Full diff: https://github.com/llvm/llvm-project/pull/141407.diff

2 Files Affected:

  • (modified) lldb/packages/Python/lldbsuite/test/decorators.py (+14)
  • (modified) lldb/test/API/python_api/unnamed_symbol_lookup/TestUnnamedSymbolLookup.py (+2)
diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py
index 868e9f7e5eca0..e87e8d662e4ae 100644
--- a/lldb/packages/Python/lldbsuite/test/decorators.py
+++ b/lldb/packages/Python/lldbsuite/test/decorators.py
@@ -799,6 +799,20 @@ def arch_doesnt_match():
     return skipTestIfFn(arch_doesnt_match)
 
 
+def skipIfArch(arch):
+    """Decorate the item to skip tests if running on the specified architecture."""
+
+    def arch_matches():
+        target_arch = lldbplatformutil.getArchitecture()
+        if arch == target_arch:
+            return (
+                "Test does not run on " + arch + ", but target arch is " + target_arch
+            )
+        return None
+
+    return skipTestIfFn(arch_matches)
+
+
 def skipIfTargetAndroid(bugnumber=None, api_levels=None, archs=None):
     """Decorator to skip tests when the target is Android.
 
diff --git a/lldb/test/API/python_api/unnamed_symbol_lookup/TestUnnamedSymbolLookup.py b/lldb/test/API/python_api/unnamed_symbol_lookup/TestUnnamedSymbolLookup.py
index c0438f77fb1d1..f798ec342e41b 100644
--- a/lldb/test/API/python_api/unnamed_symbol_lookup/TestUnnamedSymbolLookup.py
+++ b/lldb/test/API/python_api/unnamed_symbol_lookup/TestUnnamedSymbolLookup.py
@@ -10,6 +10,8 @@
 
 # --keep-symbol causes error on Windows: llvm-strip.exe: error: option is not supported for COFF
 @skipIfWindows
+# Unnamed symbols don't get into the .eh_frame section on ARM, so LLDB can't find them.
+@skipIfArch("arm")
 class TestUnnamedSymbolLookup(TestBase):
     def test_unnamed_symbol_lookup(self):
         """Test looking up unnamed symbol synthetic name"""

@DavidSpickett
Copy link
Collaborator

The reasoning is fine but I'm pretty sure there's an existing way to write this skipif, let me look for it.

DavidSpickett added a commit that referenced this pull request May 27, 2025
Same purpose as #141407,
comitting this directly to get the bot green sooner.

Co-authored-by: Ely Ronnen <[email protected]>
@DavidSpickett
Copy link
Collaborator

I've pushed it directly to get the bot green:
f30a85b

Thanks for figuring out the reason for the failure.

llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request May 27, 2025
Same purpose as llvm/llvm-project#141407,
comitting this directly to get the bot green sooner.

Co-authored-by: Ely Ronnen <[email protected]>
Copy link
Member

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skipping the test is fine, but we don't need a new decorator for this. You can do this with:

@skipIf(archs=["arm"])

If we thought this was important enough or a dedicated decorator, it should be implemented in terms of the generic one. @eronnen can you please revert this part of the change and update the decorator?

@eronnen
Copy link
Contributor Author

eronnen commented May 27, 2025

I see it was already done by @DavidSpickett

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants