Commit 1ccd777
committed
Skip test.test_ssl.ThreadedTests.test_wrong_cert_tls13 on windows
Failure:
2026-06-01T20:33:22.6137502Z ======================================================================
2026-06-01T20:33:22.6138687Z FAIL: test_wrong_cert_tls13 (test.test_ssl.ThreadedTests.test_wrong_cert_tls13)
2026-06-01T20:33:22.6139079Z ----------------------------------------------------------------------
2026-06-01T20:33:22.6139922Z ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine. (os error 10053)
2026-06-01T20:33:22.6140076Z
2026-06-01T20:33:22.6140508Z During handling of the above exception, another exception occurred:
2026-06-01T20:33:22.6140757Z
2026-06-01T20:33:22.6141051Z Traceback (most recent call last):
2026-06-01T20:33:22.6141607Z File "D:\a\RustPython\RustPython\Lib\test\test_ssl.py", line 238, in wrapper
2026-06-01T20:33:22.6141895Z return func(*args, **kw)
2026-06-01T20:33:22.6142621Z File "D:\a\RustPython\RustPython\Lib\test\test_ssl.py", line 3267, in test_wrong_cert_tls13
2026-06-01T20:33:22.6142922Z with self.assertRaisesRegex(
2026-06-01T20:33:22.6143512Z ~~~~~~~~~~~~~~~~~~~~~~^
2026-06-01T20:33:22.6143779Z OSError,
2026-06-01T20:33:22.6144033Z ^^^^^^^^
2026-06-01T20:33:22.6144283Z ...<2 lines>...
2026-06-01T20:33:22.6144550Z 'Broken pipe'
2026-06-01T20:33:22.6144813Z ^^^^^^^^^^^^^
2026-06-01T20:33:22.6145053Z ):
2026-06-01T20:33:22.6145328Z ^
2026-06-01T20:33:22.6146900Z AssertionError: "alert unknown ca|EOF occurred|TLSV1_ALERT_UNKNOWN_CA|closed by the remote host|Connection reset by peer|Broken pipe" does not match "[WinError 10053] An established connection was aborted by the software in your host machine. (os error 10053)"
There are two problems here:
1) WSAECONNABORTED is reported by some socket operation but test case
checks only for stringified WSAECONNRESET. I do not know why it does
not check for "Software caused connection abort". And I do not know
what causes WSAECONNABORTED on Windows and no ECONNABORTED on *nix.
Maybe this is some discrepancy between how RustPython and cpython
handle sockets.
2) RustPython produces wrong strings for OSError.
cpython has a separate mapping for this: https://github.com/python/cpython/blob/5607950ef232dad16d75c0cf53101d9649d89115/Modules/errnomodule.c
Also note that there are more tests like this that check OsError by
matching strings. The same problem may appear again.1 parent 061e70d commit 1ccd777
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3248 | 3248 | | |
3249 | 3249 | | |
3250 | 3250 | | |
| 3251 | + | |
3251 | 3252 | | |
3252 | 3253 | | |
3253 | 3254 | | |
| |||
0 commit comments