Repository navigation
Conversation
97c8f6c to
9831e88
Compare
| HAS_TESTS = $(sort $(dir $(call rwildcard,,*_test.go))) | ||
| # Exclude anything we explicitly don't want to test for whatever reason | ||
| EXCLUDE_TESTS = image waveshare-epd/epd2in66b | ||
| EXCLUDE_TESTS = image waveshare-epd/epd2in66b rtl8720dn |
There was a problem hiding this comment.
Do we really want to exclude the tests here?
|
Thanks for tracking this down. The fix to A few things before we merge:
Optional. Using |
Run host tests from the unit-test target and mark the test script executable. Restore receive-side RPC debug output, normalize error messages, and separate RPC error capture state from the stored error.
|
Thanks for the review! I've pushed a follow-up commit addressing your comments:
|
Summary
Fix TLS connection error handling in the RTL8720DN driver.
Previously,
Connect()only treated-1as a failure. However, the RTL8720DN firmware can return other negative values, including mbedTLS error codes. These were incorrectly treated as successful connections.The firmware can also return
0after a certificate verification failure, making the return value alone insufficient to determine whether the connection succeeded.Changes
Testing
httpbin.org:443.example.com:443returns error code-29312(MBEDTLS_ERR_SSL_CONN_EOF).apple.com:443.With the previous driver implementation, connecting to
example.com:443incorrectly reportedConnected!after approximately 120 seconds. The example then proceeded to send an HTTP request and stalled while waiting for a response.With this fix, the same connection attempt correctly fails with error code
-29312(MBEDTLS_ERR_SSL_CONN_EOF) instead of reporting success.Notes
The firmware retries TLS handshake errors until its handshake timeout, potentially replacing the original failure code with a later error. This PR does not change firmware behavior; it ensures that errors returned by the firmware are correctly propagated by the TinyGo driver.
Certificate verification failure handling is covered by host-based tests but has not been verified on hardware with a configured CA certificate.