[llvm] [DWARFVerifier] Fix and enable broken test llvm-dwarfdump/X86/verify_no_overlap_error_icf.yaml (PR #120330)

via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 15:18:51 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-debuginfo

Author: None (alx32)

<details>
<summary>Changes</summary>

Fixing broken test - calling `sed` in a platform cross-compatible way. 
Verified to pass on Mac (which uses BSD sed). 

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


1 Files Affected:

- (modified) llvm/test/tools/llvm-dwarfdump/X86/verify_no_overlap_error_icf.yaml (+3-7) 


``````````diff
diff --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_no_overlap_error_icf.yaml b/llvm/test/tools/llvm-dwarfdump/X86/verify_no_overlap_error_icf.yaml
index 43652831bdb2d2..5312e54e756a2f 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_no_overlap_error_icf.yaml
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_no_overlap_error_icf.yaml
@@ -1,7 +1,3 @@
-# FIXME: Currently disabled as it fails on some Mac hosts
-# https://github.com/llvm/llvm-project/pull/117952
-# UNSUPPORTED: true
-
 #--- comments.txt
 
 # This test verifies several scenarios with DW_TAG_subprogram address ranges:
@@ -22,13 +18,13 @@
 # RUN: yaml2obj %t/test.yaml | llvm-dwarfdump --error-display=details --verify - | FileCheck %s
 # CHECK: No errors.
 
-# RUN: sed '0,/HighOffset: 0x6000/{s//HighOffset: 0x5999/}' %t/test.yaml | yaml2obj | not llvm-dwarfdump --error-display=details --verify - | FileCheck %s --check-prefix=CHECK-RANGES
+# RUN: sed -e '1,/HighOffset: 0x6000/s/HighOffset: 0x6000/HighOffset: 0x5999/' %t/test.yaml | yaml2obj | not llvm-dwarfdump --error-display=details --verify - | FileCheck %s --check-prefix=CHECK-RANGES
 # CHECK-RANGES: error: DIEs have overlapping address ranges
 
-# RUN: sed '0,/Value:  0x77/{s/Value:  0x77/Value:  0x66/}' %t/test.yaml | yaml2obj | not llvm-dwarfdump --error-display=details --verify - | FileCheck %s --check-prefix=CHECK-HIGH-PC
+# RUN: sed -e '1,/Value:  0x77/s/Value:  0x77/Value:  0x66/' %t/test.yaml | yaml2obj | not llvm-dwarfdump --error-display=details --verify - | FileCheck %s --check-prefix=CHECK-HIGH-PC
 # CHECK-HIGH-PC: error: DIEs have overlapping address ranges
 
-# RUN: sed '0,/LowOffset:  0x880111/{s//LowOffset:  0x880112/}' %t/test.yaml | yaml2obj | not llvm-dwarfdump --error-display=details --verify - | FileCheck %s --check-prefix=CHECK-LEX-BLOCK
+# RUN: sed -e '1,/LowOffset:  0x880111/s/LowOffset:  0x880111/LowOffset:  0x880112/' %t/test.yaml | yaml2obj | not llvm-dwarfdump --error-display=details --verify - | FileCheck %s --check-prefix=CHECK-LEX-BLOCK
 # CHECK-LEX-BLOCK: DIE has overlapping ranges in DW_AT_ranges attribute
 
 #--- test.yaml

``````````

</details>


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


More information about the llvm-commits mailing list