Fix A/X register clobbering in net.asm, add DNS + HTTP integration tests - #9
Merged
Merged
Conversation
…erged The harness wait_for_text() now calls transport.resume() between polls internally, so the inline polling loops are no longer needed. This replaces 13 copies of the same ~10-line loop with single wait_for_text() calls, reducing total code by 120 lines. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…r reuse The parallel runner had two bugs: (1) as_completed() didn't see futures added mid-iteration, so only the first N suites were collected, and (2) reusing VICE instances across suites caused state contamination (HKDF 0/12 on reused workers). Fix: allocate a fresh VICE instance per suite via run_suite_in_own_instance(). Add all 10 suites (was 5). Add --skip-slow and --seed flags. 193/193 pass. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix parallel test runner: all 10 suites, instance-per-suite.
… tests net_dns_resolve and net_set_tcp_dest both passed A/X parameters through net_save_zp, which uses X as a loop counter and clobbers both registers. This caused DNS resolution and TCP destination setup to receive garbage pointers instead of the caller's intended addresses. Fixed by pushing A/X to the stack before the ZP save and restoring after. Added test_dns.py (4 tests) exercising net_dns_resolve over TAP with dnsmasq, and test_http_integration.py (5 tests) for end-to-end plain HTTP GET (DNS → TCP → request → response). Both use ViceInstanceManager with ethernet_mode="rrnet" and run unprivileged (only dnsmasq via sudo). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
net_dns_resolveandnet_set_tcp_destinnet.asmboth passed A/X register parameters throughnet_save_zp, which clobbers A/X via its LDX loop counter. DNS queries sent garbage pointers and TCP destination setup was silently corrupted. Fixed by pushing A/X to the stack before the ZP save and restoring after.test_dns.py— 4 tests exercisingnet_dns_resolveover TAP with dnsmasq (known host, second host, unknown host, label check)test_http_integration.py— 5 tests for end-to-end plain HTTP GET over TAP (DNS → TCP connect → send request → parse response → verify server-side request log)test_server.py— reusable HTTP server returningHELLO C64for integration testsKey decisions
sudo), matching the c64-test-harness pattern where TAP interfaces are pre-configured and owned by the regular userethernet_mode="rrnet"(not"tfe") — ip65 build expects RR-Net cartridge modetransport.resume()called afterwait_for_text()beforeinject_keys()— binary monitor pauses CPU on screen readsTest plan
python3 tools/run_all_tests.py --skip-slow— 182/182 pass (no regressions)python3 tools/test_dns.py— 4/4 passpython3 tools/test_http_integration.py— 5/5 pass🤖 Generated with Claude Code
Originally posted by @JC-000 on 2026-03-29