Repository navigation
SanaConform: second open uses DEVICE=; quirk stat note for other drivers - #41
Merged
Merged
Conversation
The self-echo probe opened its second handle on "loopback.device" hard-coded, so with DEVICE= naming another driver the second open failed and read as that driver refusing a second opener. It now opens the device under test. The quirk-stat check printed "unexpected" for every driver other than sana2loop, though the comment above it says no records is the expected result there. It now says so when the driver returns no special stats at all. Found while running SanaConform against an X-Surf SANA-II driver (xsurfnet.device) in WinUAE: with the change it takes both opens and the probe passes.
1 of 2 tasks
sidick
added a commit
that referenced
this pull request
Oct 22, 2026
…ecial stats (#42) PR #41 fixed the RecordCountSupplied==0 case but left the "unexpected" message in place for a foreign driver that returns its own (non-sana2loop) special-stats records without a DMA-hook-offered entry -- a legitimate, expected result for any driver other than loopback.device, not a real anomaly. Branch on DEVICE= to pick the right message. Co-authored-by: Claude Sonnet 5 <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 free
to 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.
Hi Simon, thanks for sana2loop! It's been really handy for testing my PrismNet stack and my X-Surf driver without extra hardware. Here are two small things I noticed while pointing SanaConform at another driver:
1. The self-echo test's second open ignores
DEVICE=Around line 400 of
src/tools/sanaconform.c, the second handle is opened on"loopback.device"hard-coded instead of the device under test. WithDEVICE=naming another driver, that open fails (or lands on sana2loop instead), so it reads as the driver refusing a second opener. It now opensdevice. With the change, myxsurfnet.device(in WinUAE) took both opens and the probe passed.2. The quirk-stat line says "unexpected" for other drivers
The comment above the
S2_GETSPECIALSTATSquery says no records is the expected result for drivers other than sana2loop, but the code printed "unexpected" for them too. It now printssana2loop quirk stat: none (expected for drivers other than sana2loop)when the driver returns no special stats at all; the "unexpected" message stays for the case where records come back but the DMA-hook one isn't among them.Testing
Built with Bebbo's m68k-amigaos-gcc (
make amiga, NDK 3.2 SANA-II header), no warnings. I ran the patched SanaConform againstxsurfnet.devicein WinUAE; I haven't run the Copperline target tests locally, so I'm leaning on CI for those.Thanks again, and happy to change anything!
🤖 Generated with Claude Code