cb424d7448
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).
99 lines
3.0 KiB
Plaintext
99 lines
3.0 KiB
Plaintext
## Test global symbal table of big archive.
|
|
|
|
# RUN: rm -rf %t && mkdir %t && cd %t
|
|
# RUN: yaml2obj --docnum=1 -DFLAG=0x1DF %s -o t32_1.o
|
|
# RUN: yaml2obj --docnum=1 -DFLAG=0x1F7 %s -o t64_1.o
|
|
# RUN: yaml2obj --docnum=2 -DFLAG=0x1DF %s -o t32_2.o
|
|
# RUN: yaml2obj --docnum=2 -DFLAG=0x1F7 %s -o t64_2.o
|
|
# RUN: llvm-as -o 32.bc %p/Inputs/bitcode-sym32.ll
|
|
# RUN: llvm-as -o 64.bc %p/Inputs/bitcode-sym64.ll
|
|
|
|
## Test printing a big archive which only has 32-bits symbol names
|
|
# RUN: llvm-ar q t32.a t32_1.o t32_2.o 32.bc
|
|
# RUN: llvm-nm --print-armap t32.a 2>&1 | FileCheck --check-prefixes=GLOB32,NOGL64 %s
|
|
|
|
## Test printing a big archive which only has 64-bits symbol names
|
|
# RUN: llvm-ar q t64.a t64_1.o t64_2.o 64.bc
|
|
# RUN: llvm-nm --print-armap t64.a 2>&1 | FileCheck --check-prefixes=GLOB64,NOGL32 %s
|
|
|
|
## Test printing all 32-bits symbol names first and then 64-bits
|
|
# RUN: llvm-ar q t32_64_all.a t32_1.o t64_1.o t32_2.o t64_2.o 32.bc 64.bc
|
|
|
|
# RUN: llvm-nm --print-armap t32_64_all.a 2>&1 | FileCheck --check-prefixes=GLOB32,GLOB64 %s
|
|
|
|
#GLOB32: var_0x1DF in t32_1.o
|
|
#GLOB32-NEXT: array_0x1DF in t32_1.o
|
|
#GLOB32-NEXT: func_0x1DF in t32_2.o
|
|
#GLOB32-NEXT: bar_0x1DF in t32_2.o
|
|
#GLOB32-NEXT: foo32 in 32.bc
|
|
#GLOB32-NEXT: C32 in 32.bc
|
|
|
|
#NOGL32-NOT: var_0x1DF in t32_1.o
|
|
#NOGL32-NOT: array_0x1DF in t32_1.o
|
|
#NOGL32-NOT: func_0x1DF in t32_2.o
|
|
#NOGL32-NOT: bar_0x1DF in t32_2.o
|
|
#NOGL32-NOT: foo32 in 32.bc
|
|
#NOGL32-NOT: C32 in 32.bc
|
|
|
|
#GLOB64: var_0x1F7 in t64_1.o
|
|
#GLOB64-NEXT: array_0x1F7 in t64_1.o
|
|
#GLOB64-NEXT: func_0x1F7 in t64_2.o
|
|
#GLOB64-NEXT: bar_0x1F7 in t64_2.o
|
|
#GLOB64-NEXT: bar64 in 64.bc
|
|
#GLOB64-NEXT: C64 in 64.bc
|
|
|
|
#NOGL64-NOT: var_0x1F7 in t64_1.o
|
|
#NOGL64-NOT: array_0x1F7 in t64_1.o
|
|
#NOGL64-NOT: func_0x1F7 in t64_2.o
|
|
#NOGL64-NOT: bar_0x1F7 in t64_2.o
|
|
#NOGL64-NOT: bar64 in 64.bc
|
|
#NOGL64-NOT: C64 in 64.bc
|
|
|
|
--- !XCOFF
|
|
FileHeader:
|
|
MagicNumber: [[FLAG]]
|
|
Sections:
|
|
- Name: .data
|
|
Flags: [ STYP_DATA ]
|
|
Symbols:
|
|
- Name: var_[[FLAG]]
|
|
Section: .data
|
|
Type: 0x4000
|
|
StorageClass: C_EXT
|
|
AuxEntries:
|
|
- Type: AUX_CSECT
|
|
SymbolAlignmentAndType: 0x09
|
|
StorageMappingClass: XMC_RW
|
|
- Name: array_[[FLAG]]
|
|
Section: .data
|
|
Type: 0x4000
|
|
StorageClass: C_EXT
|
|
AuxEntries:
|
|
- Type: AUX_CSECT
|
|
SymbolAlignmentAndType: 0x09
|
|
StorageMappingClass: XMC_RW
|
|
|
|
--- !XCOFF
|
|
FileHeader:
|
|
MagicNumber: [[FLAG]]
|
|
Sections:
|
|
- Name: .text
|
|
Flags: [ STYP_DATA ]
|
|
Symbols:
|
|
- Name: func_[[FLAG]]
|
|
Section: .text
|
|
Type: 0x4000
|
|
StorageClass: C_EXT
|
|
AuxEntries:
|
|
- Type: AUX_CSECT
|
|
SymbolAlignmentAndType: 0x09
|
|
StorageMappingClass: XMC_PR
|
|
- Name: bar_[[FLAG]]
|
|
Section: .text
|
|
Type: 0x4000
|
|
StorageClass: C_EXT
|
|
AuxEntries:
|
|
- Type: AUX_CSECT
|
|
SymbolAlignmentAndType: 0x09
|
|
StorageMappingClass: XMC_PR
|