Files
RedBear-OS/local/recipes/dev/libclc/source/llvm/test/Object/coff-dwarf-debug-only.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

29 lines
1.7 KiB
Plaintext

RUN: yaml2obj %p/Inputs/COFF/dwarf-debug-only.yaml | llvm-objdump -p -h - | FileCheck %s
CHECK: The Data Directory
CHECK-NEXT: Entry 0 00000000006a3f20 0000004b Export Directory [.edata (or where ever we found it)]
CHECK-NEXT: Entry 1 00000000006a3f6b 000001a4 Import Directory [parts of .idata]
CHECK-NEXT: Entry 2 0000000000000000 00000000 Resource Directory [.rsrc]
CHECK-NEXT: Entry 3 00000000006ac000 00000714 Exception Directory [.pdata]
CHECK-NEXT: Entry 4 0000000000000000 00000000 Security Directory
CHECK-NEXT: Entry 5 00000000006ae000 0000009c Base Relocation Directory [.reloc]
CHECK-NEXT: Entry 6 00000000006aa000 0000001c Debug Directory
CHECK-NEXT: Entry 7 0000000000000000 00000000 Description Directory
CHECK-NEXT: Entry 8 0000000000000000 00000000 Special Directory
CHECK-NEXT: Entry 9 00000000006a3bf8 00000028 Thread Storage Directory [.tls]
CHECK-NEXT: Entry a 0000000000000000 00000000 Load Configuration Directory
CHECK-NEXT: Entry b 0000000000000000 00000000 Bound Import Directory
CHECK-NEXT: Entry c 00000000006a48f8 000007e8 Import Address Table Directory
CHECK-NEXT: Entry d 0000000000000000 00000000 Delay Import Directory
CHECK-NEXT: Entry e 0000000000000000 00000000 CLR Runtime Header
CHECK-NEXT: Entry f 0000000000000000 00000000 Reserved
CHECK: 0 .text 00000000 0000000180001000 TEXT
CHECK-NEXT: 1 .rdata 00000000 0000000180010000 DATA
CHECK-NEXT: 2 .buildid 00000035 00000001806aa000 DATA
CHECK-NEXT: 3 .data 00000000 00000001806ab000 DATA
CHECK-NEXT: 4 .pdata 00000000 00000001806ac000 DATA
CHECK-NEXT: 5 .tls 00000000 00000001806ad000 DATA
CHECK-NEXT: 6 .reloc 00000000 00000001806ae000 DATA
CHECK-NEXT: 7 .debug_info 00000040 00000001806af000 DATA, DEBUG