Skip to content

SanaConform: second open uses DEVICE=; quirk stat note for other drivers - #41

Merged
sidick merged 1 commit into
sidick:mainfrom
lainejones:fix/sanaconform-device-arg
Oct 22, 2026
Merged

sidick merged 1 commit into
sidick:mainfrom
lainejones:fix/sanaconform-device-arg

Conversation

@lainejones

Copy link
Copy Markdown
Contributor

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. With DEVICE= naming another driver, that open fails (or lands on sana2loop instead), so it reads as the driver refusing a second opener. It now opens device. With the change, my xsurfnet.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_GETSPECIALSTATS query says no records is the expected result for drivers other than sana2loop, but the code printed "unexpected" for them too. It now prints sana2loop 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 against xsurfnet.device in 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

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.
@sidick
sidick merged commit ac71cf2 into sidick:main Oct 22, 2026
6 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants