upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/gameinput_test.cpp
diff options
context:
space:
mode:
authorbobcatchris <83428450+bobcatchris@users.noreply.github.com>2026-11-22 00:12:37 -0600
committerbobcatchris <83428450+bobcatchris@users.noreply.github.com>2026-11-22 00:12:37 -0600
commit3b83ea20f364b49160afbb17bbfb3838897bfa93 (patch)
tree8d3c1dfde745984416d1b0e3a5f38d8c345c78e1 /runtime/test/gameinput_test.cpp
parent43d470316ec6cbcd64002bc3792998d9f5745dac (diff)
analyze_4240_full: step over a rejected block instead of parsing it for ever
process_archive() called parse_4240_block() and, on ValueError, did `pass` without advancing pos: the same word was parsed, rejected and re-parsed until the process was killed. A synthetic stream with a 42 40 00 00 word followed by 8 bytes still ran after 12 s (exit 124 under timeout). walk_stream() in the same file already did pos += 4 there. The `errors` counter could never move off 0 either, so a stream full of broken blocks looked clean. Count the skip and keep the first message. Also: --limit 0 scanned everything and a negative limit scanned one stream, so require >= 1; a missing input printed "File not found" and still exited 0; --json in a missing folder lost the run, so create it. Drop the second, unused _u32 definition. Tests (new tests/test_analyze_4240_full.py, synthetic RPF9 header + zlib streams): the truncated block must return quickly, be counted, and leave blocks_4240 at 0; a valid block's tags and stride are measured; missing input, --limit 0/-1 and the --json folder are covered. 5/5 pass; on main the same file hangs and the run times out. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
Diffstat (limited to 'runtime/test/gameinput_test.cpp')
0 files changed, 0 insertions, 0 deletions