[Lldb-commits] [lldb] [lldb] Restrict TestVariableAnnotationsDisassembler.py to ELF x86_64 (skip on Windows/COFF) (PR #156026)

via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 29 06:52:54 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Abdullah Mohammad Amin (UltimateForce21)

<details>
<summary>Changes</summary>

The `TestVariableAnnotationsDisassembler.py` test assembles `d_original_example.s`, 
which contains ELF-specific directives such as:

- `.ident`
- `.section ".note.GNU-stack", "", @<!-- -->progbits`
- `.section .debug_line, "", @<!-- -->progbits`

These directives are not understood by COFF on Windows, so the test fails 
on the lldb-remote-linux-win builder even when running on x86_64.

This patch adds decorators to gate the test,
- `@<!-- -->skipIfWindows` — skips on Windows/COFF
- `@<!-- -->skipUnlessPlatform(["linux", "freebsd", "netbsd", "android"])` — 
  runs only on ELF platforms

Follow-up to #<!-- -->155942.

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


1 Files Affected:

- (modified) lldb/test/API/functionalities/disassembler-variables/TestVariableAnnotationsDisassembler.py (+14) 


``````````diff
diff --git a/lldb/test/API/functionalities/disassembler-variables/TestVariableAnnotationsDisassembler.py b/lldb/test/API/functionalities/disassembler-variables/TestVariableAnnotationsDisassembler.py
index 4d99ea771605a..c3873f1e6e943 100644
--- a/lldb/test/API/functionalities/disassembler-variables/TestVariableAnnotationsDisassembler.py
+++ b/lldb/test/API/functionalities/disassembler-variables/TestVariableAnnotationsDisassembler.py
@@ -22,6 +22,8 @@ def _disassemble_verbose_symbol(self, symname):
         self.runCmd(f"disassemble -n {symname} -v", check=True)
         return self.res.GetOutput()
 
+    @skipIfWindows
+    @skipUnlessPlatform(["linux","freebsd","netbsd"])
     @skipIf(archs=no_match(["x86_64"]))
     def test_d_original_example_O1(self):
         obj = self._build_obj("d_original_example.o")
@@ -34,6 +36,8 @@ def test_d_original_example_O1(self):
         self.assertNotIn("<decoding error>", out)
 
     @no_debug_info_test
+    @skipIfWindows
+    @skipUnlessPlatform(["linux","freebsd","netbsd"])
     @skipIf(archs=no_match(["x86_64"]))
     def test_regs_int_params(self):
         obj = self._build_obj("regs_int_params.o")
@@ -49,6 +53,8 @@ def test_regs_int_params(self):
         self.assertNotIn("<decoding error>", out)
 
     @no_debug_info_test
+    @skipIfWindows
+    @skipUnlessPlatform(["linux","freebsd","netbsd"])
     @skipIf(archs=no_match(["x86_64"]))
     def test_regs_fp_params(self):
         obj = self._build_obj("regs_fp_params.o")
@@ -64,6 +70,8 @@ def test_regs_fp_params(self):
         self.assertNotIn("<decoding error>", out)
 
     @no_debug_info_test
+    @skipIfWindows
+    @skipUnlessPlatform(["linux","freebsd","netbsd"])
     @skipIf(archs=no_match(["x86_64"]))
     def test_regs_mixed_params(self):
         obj = self._build_obj("regs_mixed_params.o")
@@ -79,6 +87,8 @@ def test_regs_mixed_params(self):
         self.assertNotIn("<decoding error>", out)
 
     @no_debug_info_test
+    @skipIfWindows
+    @skipUnlessPlatform(["linux","freebsd","netbsd"])
     @skipIf(archs=no_match(["x86_64"]))
     def test_live_across_call(self):
         obj = self._build_obj("live_across_call.o")
@@ -91,6 +101,8 @@ def test_live_across_call(self):
         self.assertNotIn("<decoding error>", out)
 
     @no_debug_info_test
+    @skipIfWindows
+    @skipUnlessPlatform(["linux","freebsd","netbsd"])
     @skipIf(archs=no_match(["x86_64"]))
     def test_loop_reg_rotate(self):
         obj = self._build_obj("loop_reg_rotate.o")
@@ -105,6 +117,8 @@ def test_loop_reg_rotate(self):
         self.assertNotIn("<decoding error>", out)
 
     @no_debug_info_test
+    @skipIfWindows
+    @skipUnlessPlatform(["linux","freebsd","netbsd"])
     @skipIf(archs=no_match(["x86_64"]))
     def test_seed_reg_const_undef(self):
         obj = self._build_obj("seed_reg_const_undef.o")

``````````

</details>


https://github.com/llvm/llvm-project/pull/156026


More information about the lldb-commits mailing list