commit 93bc4aec2e52e64e939a101494e4b3c83152e220
parent 6aae454b985ecf450278abcdd5ae4c66d465fd99
Author: Ryan Sepassi <rsepassi@gmail.com>
Date: Fri, 29 May 2026 14:29:52 -0700
test/objdump: refresh aarch64 golden for sbfm decode; honor SKIP cases
The aarch64 stripped-segment golden captured '.inst 0x93407d28' for a word
that the disassembler now correctly decodes as 'sbfm x8, x9, #0, #31' (sxtw)
after the bitfield decode rows were added — refresh it.
The x86_64-windows PE-header/section cases print 'SKIP: no llvm-mingw UCRT
sysroot' when the Windows sysroot is absent, but run.sh diffed that line
against the golden and counted it as a failure. Honor a leading SKIP line as a
skip (matching the other driver harnesses' skip-vs-fail convention), so the
suite is green on hosts without the mingw sysroot.
test-driver-objdump: 14/14 passed (2 skipped).
Diffstat:
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/test/objdump/aarch64/cases/04-disasm-stripped-segment.expected b/test/objdump/aarch64/cases/04-disasm-stripped-segment.expected
@@ -144,7 +144,7 @@ Disassembly of segment LOAD:
40422c: b6 ff ff 97 bl 0x404104
404230: a0 43 1e b8 stur w0, [x29, #-28]
404234: a9 43 5e b8 ldur w9, [x29, #-28]
- 404238: 28 7d 40 93 .inst 0x93407d28
+ 404238: 28 7d 40 93 sbfm x8, x9, #0, #31
40423c: a8 83 1d f8 stur x8, [x29, #-40]
404240: a0 83 5d f8 ldur x0, [x29, #-40]
404244: 6f ff ff 97 bl 0x404000
diff --git a/test/objdump/run.sh b/test/objdump/run.sh
@@ -29,6 +29,7 @@ trap 'rm -rf "$work_root"' EXIT
pass=0
fail=0
+skip=0
failures=
for arch_dir in "$script_dir"/*/; do
@@ -52,6 +53,17 @@ for arch_dir in "$script_dir"/*/; do
( cd "$sandbox" && sh "$sh" ) > "$actual" 2>&1
case_rc=$?
+ # A case that prints a leading "SKIP" line is opting out because a
+ # prerequisite is missing (e.g. no llvm-mingw UCRT sysroot to build a
+ # PE fixture). Honor it instead of diffing the SKIP text against the
+ # golden — same skip-vs-fail convention as the other driver harnesses.
+ if [ "$case_rc" -eq 0 ] && head -n1 "$actual" 2>/dev/null | grep -q '^SKIP'; then
+ printf 'SKIP %s/%s (%s)\n' "$arch" "$name" \
+ "$(head -n1 "$actual" | sed 's/^SKIP[: ]*//')"
+ skip=$((skip + 1))
+ continue
+ fi
+
if [ "$case_rc" -ne 0 ]; then
printf 'FAIL %s/%s (script exit=%d)\n' "$arch" "$name" "$case_rc"
diff -u "$expected" "$actual" || true
@@ -75,7 +87,7 @@ done
total=$((pass + fail))
if [ "$fail" -gt 0 ]; then
printf '\nobjdump-driver: failures:%s\n' "$failures"
- printf 'objdump-driver: %d/%d passed\n' "$pass" "$total"
+ printf 'objdump-driver: %d/%d passed (%d skipped)\n' "$pass" "$total" "$skip"
exit 1
fi
-printf '\nobjdump-driver: %d/%d passed\n' "$pass" "$total"
+printf '\nobjdump-driver: %d/%d passed (%d skipped)\n' "$pass" "$total" "$skip"