Skip to content

Commit

Permalink
[DWARFVerifier] Fix and enable broken test llvm-dwarfdump/X86/verify_…
Browse files Browse the repository at this point in the history
…no_overlap_error_icf.yaml (#120330)

Fixing broken test - calling `sed` in a cross-platform compatible way. 
Verified to pass on Mac (which uses BSD sed).
  • Loading branch information
alx32 authored Dec 19, 2024
1 parent b71c44b commit 1808255
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 1808255

Please sign in to comment.