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).
36 lines
883 B
LLVM
36 lines
883 B
LLVM
; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s
|
|
|
|
define i32 @bad1() !prof !0 {
|
|
ret i32 0
|
|
}
|
|
|
|
!0 = !{i32 123, i32 3}
|
|
; CHECK: assembly parsed, but does not verify as correct!
|
|
; CHECK-NEXT: expected string with name of the !prof annotation
|
|
; CHECK-NEXT: !0 = !{i32 123, i32 3}
|
|
|
|
define i32 @bad2() !prof !1 {
|
|
ret i32 0
|
|
}
|
|
|
|
!1 = !{!"function_entry_count"}
|
|
; CHECK-NEXT: !prof annotations should have no less than 2 operands
|
|
; CHECK-NEXT: !1 = !{!"function_entry_count"}
|
|
|
|
|
|
define i32 @bad3() !prof !2 {
|
|
ret i32 0
|
|
}
|
|
|
|
!2 = !{!"some_other_count", i64 200}
|
|
; CHECK-NEXT: first operand should be 'function_entry_count'
|
|
; CHECK-NEXT: !2 = !{!"some_other_count", i64 200}
|
|
|
|
define i32 @bad4() !prof !3 {
|
|
ret i32 0
|
|
}
|
|
|
|
!3 = !{!"function_entry_count", !"string"}
|
|
; CHECK-NEXT: expected integer argument to function_entry_count
|
|
; CHECK-NEXT: !3 = !{!"function_entry_count", !"string"}
|