Files
RedBear-OS/local/recipes/dev/libclc/source/llvm/test/DebugInfo/dwarfdump-16bit-addr.test
T
vasilito cb424d7448 build: static patch-sanity linter (shift-left the malformed-patch class)
verify-patch-sanity.py validates every active recipe .patch has internally-
consistent hunk line counts — catching the 'malformed patch at line N' failure
at commit/CI/preflight time instead of hours into a cook. This cycle hit that
class three times (qtwaylandscanner, sddm, xwayland), each only discovered when
cookbook tried to apply the patch.

Running it across the repo found 29 latent malformed patches (validated against
GNU patch: e.g. relibc/P3-sysv-ipc reproduces 'malformed patch at line 22').
They were harmless only because they sit in vendored recipes (baked, not re-
applied) — but would fail on any version-bump re-derivation. --fix recounts the
hunk headers (body untouched) and repaired all 29.

Wired into build-preflight.sh (Phase 1.0D) and redbear-ci.yml, with a unit test
(test-patch-sanity.sh). Skips archived/legacy trees and unvalidatable formats
(empty placeholders, bare-@@ git hunks).
2026-08-01 05:13:02 +03:00

35 lines
1.5 KiB
Plaintext

; Test that llvm-dwarfdump can handle DWARF32 v3 with addr_size = 0x02
; Input object file was produced from source containing just "int x;" with
; clang -target avr -gdwarf-3 -c dwarfdump-16bit-addr.c
; REQUIRES: avr-registered-target
; RUN: llvm-dwarfdump --debug-info %S/Inputs/dwarfdump-16bit-addr.o | FileCheck %s
; RUN: llvm-dwarfdump --verify %S/Inputs/dwarfdump-16bit-addr.o
; CHECK: Inputs/dwarfdump-16bit-addr.o: file format elf32-avr
; CHECK: .debug_info contents:
; CHECK: 0x00000000: Compile Unit: length = 0x00000032, format = DWARF32, version = 0x0003, abbr_offset = 0x0000, addr_size = 0x02 (next unit at 0x00000036)
; CHECK: 0x0000000b: DW_TAG_compile_unit
; CHECK: DW_AT_producer ("clang version 10.0.0-4ubuntu1 ")
; CHECK: DW_AT_language (DW_LANG_C99)
; CHECK: DW_AT_name ("dwarfdump-16bit-addr.c")
; CHECK: DW_AT_stmt_list (0x00000000)
; CHECK: DW_AT_comp_dir ("/tmp")
; CHECK: 0x0000001e: DW_TAG_variable
; CHECK: DW_AT_name ("x")
; CHECK: DW_AT_type (0x0000002e "int")
; CHECK: DW_AT_external (0x01)
; CHECK: DW_AT_decl_file ("/tmp{{[/\\]}}dwarfdump-16bit-addr.c")
; CHECK: DW_AT_decl_line (1)
; CHECK: DW_AT_location (DW_OP_addr 0x0)
; CHECK: 0x0000002e: DW_TAG_base_type
; CHECK: DW_AT_name ("int")
; CHECK: DW_AT_encoding (DW_ATE_signed)
; CHECK: DW_AT_byte_size (0x02)
; CHECK: 0x00000035: NULL