Skip to content

Conversation

@Jinjie-Huang
Copy link
Contributor

@Jinjie-Huang Jinjie-Huang commented Nov 20, 2025

Use smaller test inputs in incompatible_dwarf_version.test to reduce disk usage and execution time.

@llvmbot
Copy link
Member

llvmbot commented Nov 20, 2025

@llvm/pr-subscribers-debuginfo

Author: Jinjie Huang (Jinjie-Huang)

Changes

Use smaller test inputs to reduce disk usage and execution time.


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

1 Files Affected:

  • (modified) llvm/test/tools/llvm-dwp/X86/incompatible_dwarf_version.test (+45-5)
diff --git a/llvm/test/tools/llvm-dwp/X86/incompatible_dwarf_version.test b/llvm/test/tools/llvm-dwp/X86/incompatible_dwarf_version.test
index 9f7da58c5d463..216d82cb318f4 100644
--- a/llvm/test/tools/llvm-dwp/X86/incompatible_dwarf_version.test
+++ b/llvm/test/tools/llvm-dwp/X86/incompatible_dwarf_version.test
@@ -1,6 +1,46 @@
-RUN: rm -rf %t && mkdir -p %t && cd %t
-RUN: llvm-mc --triple=x86_64-unknown-linux --filetype=obj --split-dwarf-file=%t/main_v5.dwo -dwarf-version=5 %p/../Inputs/overflow/main_v5.s -o %t/main_v5.o
-RUN: llvm-mc --triple=x86_64-unknown-linux --filetype=obj --split-dwarf-file=%t/debug_info_v4.dwo -dwarf-version=4 %p/../Inputs/overflow/debug_info_v4.s -o %t/debug_info_v4.o
-RUN: not llvm-dwp %t/main_v5.dwo %t/debug_info_v4.dwo -o main.dwp 2>&1 | FileCheck %s
+RUN: rm -rf %t && split-file %s %t && cd %t
+RUN: llvm-mc --triple=x86_64-unknown-linux --filetype=obj --split-dwarf-file=%t/v5.dwo -dwarf-version=5 %t/v5.s -o %t/v5.o
+RUN: llvm-mc --triple=x86_64-unknown-linux --filetype=obj --split-dwarf-file=%t/v4.dwo -dwarf-version=4 %t/v4.s -o %t/v4.o
+RUN: not llvm-dwp %t/v5.dwo %t/v4.dwo -o main.dwp 2>&1 | FileCheck %s
 
-CHECK: error: incompatible DWARF compile unit version: {{.*}}debug_info_v4.dwo (version 4) and {{.*}}main_v5.dwo (version 5)
+CHECK: error: incompatible DWARF compile unit version: {{.*}}v4.dwo (version 4) and {{.*}}v5.dwo (version 5)
+
+#--- v5.s
+    .section	.debug_info.dwo,"e",@progbits
+    .long	.Ldebug_info_dwo_end2-.Ldebug_info_dwo_start2 # Length of Unit
+.Ldebug_info_dwo_start2:
+    .short	5                               # DWARF version number
+    .byte	5                               # DWARF Unit Type (DW_UT_split_compile)
+    .byte	8                               # Address Size (in bytes)
+    .long	0                               # Offset Into Abbrev. Section
+    .quad	1152943841751211454
+    .byte	1                               # Abbrev [1] DW_TAG_compile_unit
+.Ldebug_info_dwo_end2:
+    .section	.debug_abbrev.dwo,"e",@progbits
+    .byte	1                               # Abbreviation Code
+    .byte	17                              # DW_TAG_compile_unit
+    .byte	0                               # DW_CHILDREN_no
+    .byte	0                               # EOM(1)
+    .byte	0                               # EOM(2)
+    .byte	2                               # Abbreviation Code
+    .byte	65                              # DW_TAG_type_unit
+    .byte	1                               # DW_CHILDREN_yes
+    .byte	0                               # EOM
+    .byte	0                               # EOM
+    .byte	4                               # Abbreviation Code
+    .byte	65                              # DW_TAG_type_unit
+    .byte	1                               # DW_CHILDREN_yes
+    .byte	0                               # EOM
+    .byte	0                               # EOM
+    .byte	0                               # EOM
+
+#--- v4.s
+    .section	.debug_info.dwo,"e",@progbits
+    .long	.Ldebug_info_dwo_end2-.Ldebug_info_dwo_start2 # Length of Unit
+.Ldebug_info_dwo_start2:
+    .short	4                               # DWARF version number
+    .long	0                               # Offset Into Abbrev. Section
+    .byte	8                               # Address Size (in bytes)
+    .byte	1                               # Abbrev [1] DW_TAG_compile_unit
+    .quad	-6619898858003450627            # DW_AT_GNU_dwo_id
+.Ldebug_info_dwo_end2:

@github-actions
Copy link

🐧 Linux x64 Test Results

  • 186416 tests passed
  • 4864 tests skipped

Copy link
Member

@ecnelises ecnelises left a comment

Choose a reason for hiding this comment

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

Thanks for the fix.

@Jinjie-Huang Jinjie-Huang merged commit 7f0dbf0 into llvm:main Nov 20, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants