Files
RedBear-OS/local/recipes/dev/libclc/source/llvm/test/Object/objdump-section-content.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

42 lines
1.6 KiB
Plaintext

# RUN: yaml2obj %p/Inputs/COFF/i386.yaml | llvm-objdump -s - | FileCheck %s --check-prefix=COFF-i386
# COFF-i386: file format
# COFF-i386: Contents of section .text:
# COFF-i386: 0000 83ec0cc7 44240800 000000c7 04240000 ....D$.......$..
# COFF-i386: 0010 0000e800 000000e8 00000000 8b442408 .............D$.
# COFF-i386: 0020 83c40cc3 ....
# COFF-i386: Contents of section .data:
# COFF-i386: 0000 48656c6c 6f20576f 726c6421 00 Hello World!.
# RUN: yaml2obj %s -o %t.elf-i386
# RUN: llvm-objdump -s %t.elf-i386 | FileCheck %s -DFILE=%t.elf-i386 --check-prefix=ELF-i386
# ELF-i386: [[FILE]]: file format
# ELF-i386: Contents of section .text:
# ELF-i386: 0000 83ec0cc7 44240800 000000c7 04240000 ....D$.......$..
# ELF-i386: 0010 0000e8fc ffffffe8 fcffffff 8b442408 .............D$.
# ELF-i386: 0020 83c40cc3 ....
# ELF-i386: Contents of section .rodata.str1.1:
# ELF-i386: 0024 48656c6c 6f20576f 726c6421 00 Hello World!.
--- !ELF
FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_386
Sections:
- Name: .text
Type: SHT_PROGBITS
Content: 83EC0CC744240800000000C7042400000000E8FCFFFFFFE8FCFFFFFF8B44240883C40CC3
- Name: .rodata.str1.1
Type: SHT_PROGBITS
Address: 0x0000000000000024
Content: 48656C6C6F20576F726C642100
# RUN: llvm-objdump -s %p/Inputs/shared-object-test.elf-i386 \
# RUN: | FileCheck %s -check-prefix BSS
# BSS: Contents of section .bss:
# BSS-NEXT: <skipping contents of bss section at [12c8, 12cc)>