commit 8a2d9c4a5020b6d8189d03385758d2ed493bed21
parent 81547a50b52e76eff75e4ddc556329b9d9f0a615
Author: Ryan Sepassi <rsepassi@gmail.com>
Date: Thu, 16 Jul 2026 11:16:24 -0700
test: complete binary diagnostic failure matrix
Diffstat:
2 files changed, 54 insertions(+), 4 deletions(-)
diff --git a/doc/RELEASE_AUDIT_2026_6_0.md b/doc/RELEASE_AUDIT_2026_6_0.md
@@ -488,8 +488,8 @@ Implementation checkpoint (updated 2026-07-16):
| KIT-P0-002 | **Complete** | `test-driver-native-macos-sdk`: 35 pass, 0 fail across aarch64/x86-64 compile and execution plus cc/check/cpp/build-*; precedence/ld/no-xcrun cases pass |
| KIT-P1-013 | **Complete** | POSIX move fails before repair and compiles/runs after `install --force`; Windows hardlink move/repair VM: rc 0 |
| KIT-P1-011 | **Complete** | `test-driver-pkg`: 194 pass, 0 fail |
-| KIT-P2-007 | **Complete** | `test-selfdist`: 105 pass, 0 fail; release/dist gates reject the test key by Minisign material even after copy/comment changes |
-| KIT-P1-012 | **Complete** | authenticated updater result cases included in `test-selfdist`: 105 pass, 0 fail |
+| KIT-P2-007 | **Complete** | `test-selfdist`: 107 pass, 0 fail; release/dist gates reject the test signer ID after copy, comment changes, or valid reserialization |
+| KIT-P1-012 | **Complete** | authenticated updater result cases included in `test-selfdist`: 107 pass, 0 fail |
| KIT-P1-001 | **Complete** | `target_test`: 177 checks, 0 failures; `test-driver-targets`: 61 pass, 0 fail |
| KIT-P0-004 | **Complete** | public ELF/Mach-O/COFF matrix 97/0, including dylib/TBD, import-library, pointer-width/endian boundaries; driver authority/inference/archive suite 15/0 |
| KIT-P1-002 | **Complete** | NDK r27d NativeActivity preprocess/compile/shared-link at API 21 and 35: 3 pass, 0 fail |
@@ -499,7 +499,7 @@ Implementation checkpoint (updated 2026-07-16):
| KIT-P1-014 | **Complete** | reserved-`typeof` focused suite: 6 pass, 0 fail, including uthash probe |
| KIT-P2-001 | **Complete** | `test-driver-stack-protector`: 133 pass, 0 fail; cJSON build/test passes |
| KIT-P1-015 | **Complete** | 21 multi-source dependency assertions pass within `test-driver-cc`: 162 pass, 0 fail |
-| KIT-P2-003 | **Complete** | `test-driver-diagnostics`: 15 pass, 0 fail |
+| KIT-P2-003 | **Complete** | `test-driver-diagnostics`: 33 pass, 0 fail; missing/unreadable/malformed matrix for ld/strip/size plus transactional output cases |
| KIT-P1-007 | In progress | format rewrite/API and structural matrix pass; Linux shared-object and Windows PE runtime verification active |
| KIT-P1-017 | **Complete** | relocatable ELF/Mach-O/COFF/Wasm-module and linked ELF/Mach-O/PE image cases, including loader-segment vs section spans and `objcopy` parity: `test-driver-tools` 284 pass, 0 fail; Wasm v1 has no distinct linked-image path |
| KIT-P2-002 | **Complete** | 32-bit boundary/overflow, negative bias, entry records, metadata, and transactional cases included in `test-driver-tools`: 251 pass, 0 fail |
diff --git a/test/diagnostics/run.sh b/test/diagnostics/run.sh
@@ -31,6 +31,8 @@ int diagnostic_fixture(void) { return 1; }
EOF
"$KIT" cc -ffreestanding -c "$work/valid.c" -o "$work/valid.o" \
>"$work/compile.stdout" 2>"$work/compile.stderr"
+printf 'not an object\n' >"$work/invalid.o"
+mkdir "$work/unreadable-input"
# A total size failure has no stdout. A mixed request retains the valid row but
# still returns operational failure for the missing input.
@@ -50,8 +52,23 @@ expect_one size-mixed-status "$?"
contains size-mixed-valid-row "$work/size-mixed.stdout" "$work/valid.o"
contains size-mixed-bad-path "$work/size-mixed.stderr" "$work/missing.o"
+for kind in unreadable malformed; do
+ case "$kind" in
+ unreadable) input="$work/unreadable-input" ;;
+ malformed) input="$work/invalid.o" ;;
+ esac
+ "$KIT" size "$input" >"$work/size-$kind.stdout" \
+ 2>"$work/size-$kind.stderr"
+ expect_one "size-$kind-status" "$?"
+ if [ ! -s "$work/size-$kind.stdout" ]; then
+ ok "size-$kind-stdout-empty"
+ else
+ not_ok "size-$kind-stdout-empty" "$work/size-$kind.stdout"
+ fi
+ contains "size-$kind-path" "$work/size-$kind.stderr" "$input"
+done
+
# Invalid strip input names the primary input and never publishes its output.
-printf 'not an object\n' >"$work/invalid.o"
"$KIT" strip -o "$work/stripped.o" "$work/invalid.o" \
>"$work/strip.stdout" 2>"$work/strip.stderr"
expect_one strip-invalid-status "$?"
@@ -62,6 +79,23 @@ else
not_ok strip-invalid-output-absent
fi
+for kind in missing unreadable; do
+ case "$kind" in
+ missing) input="$work/missing.o" ;;
+ unreadable) input="$work/unreadable-input" ;;
+ esac
+ output="$work/stripped-$kind.o"
+ "$KIT" strip -o "$output" "$input" >"$work/strip-$kind.stdout" \
+ 2>"$work/strip-$kind.stderr"
+ expect_one "strip-$kind-status" "$?"
+ contains "strip-$kind-path" "$work/strip-$kind.stderr" "$input"
+ if [ ! -e "$output" ]; then
+ ok "strip-$kind-output-absent"
+ else
+ not_ok "strip-$kind-output-absent" "$output"
+ fi
+done
+
# A recognized-but-truncated member is diagnosed as archive(member).
head -c 8 "$work/valid.o" >"$work/bad.o"
"$KIT" ar rcs "$work/bad.a" "$work/bad.o" \
@@ -87,5 +121,21 @@ expect_one ld-invalid-status "$?"
contains ld-invalid-path "$work/ld.stderr" "$work/invalid.o"
same_file ld-invalid-output-unchanged "$work/ld-before.o" "$work/ld-out.o"
+for kind in missing unreadable; do
+ case "$kind" in
+ missing) input="$work/missing.o" ;;
+ unreadable) input="$work/unreadable-input" ;;
+ esac
+ output="$work/ld-$kind-out.o"
+ before="$work/ld-$kind-before.o"
+ cp "$work/invalid.o" "$before"
+ cp "$before" "$output"
+ "$KIT" ld -r -o "$output" "$input" >"$work/ld-$kind.stdout" \
+ 2>"$work/ld-$kind.stderr"
+ expect_one "ld-$kind-status" "$?"
+ contains "ld-$kind-path" "$work/ld-$kind.stderr" "$input"
+ same_file "ld-$kind-output-unchanged" "$before" "$output"
+done
+
kit_summary driver-diagnostics
kit_exit