Commit b6afc8e
committed
Workaround for test.test_ssl.ThreadedTests.test_wrong_cert_tls*
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. Both test_wrong_cert_tls*
tests check for various kinds of connection-related errors so I
suppose that those tests are problematic even in cpython (there are
comments about this too).
2) RustPython produces wrong strings for OSError.
cpython has a separate mapping for this: https://github.com/python/cpython/blob/5607950ef232dad16d75c0cf53101d9649d89115/Modules/errnomodule.c1 parent 09abb5d commit b6afc8e
1 file changed
Lines changed: 26 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| |||
2844 | 2846 | | |
2845 | 2847 | | |
2846 | 2848 | | |
2847 | | - | |
| 2849 | + | |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
2848 | 2873 | | |
2849 | 2874 | | |
2850 | 2875 | | |
| |||
0 commit comments