mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 20:50:14 +01:00
CPython changed its non-blocking socket behaviour recently and this test would not run under CPython anymore. So the following steps were taken to get the test working again and then simplify it: - Run the test against CPython 3.10.10 and capture the output into the .exp file for the test. - Run this test on unix port of MicroPython and verify that the output matches the CPython 3.10.10 output in the new .exp file (it did). From now on take unix MicroPython as the source of truth for this test when modifying it. - Remove all code that was there for CPython compatibility. - Make it print out more useful information during the test run, including names of the OSError errno values. - Add polling of the socket before the send/write/recv/read to verify that the poll gives the correct result in non-blocking mode. Tested on unix MicroPython, ESP32_GENERIC, PYBD_SF2 and RPI_PICO_W boards. Signed-off-by: Damien George <damien@micropython.org>
45 lines
763 B
Plaintext
45 lines
763 B
Plaintext
--- Plain sockets to nowhere ---
|
|
connect: EINPROGRESS
|
|
poll: []
|
|
send er: EAGAIN
|
|
connect: EINPROGRESS
|
|
poll: []
|
|
write: None
|
|
connect: EINPROGRESS
|
|
poll: []
|
|
recv er: EAGAIN
|
|
connect: EINPROGRESS
|
|
poll: []
|
|
read: None
|
|
--- SSL sockets to nowhere ---
|
|
connect: EINPROGRESS
|
|
wrap ok: True
|
|
poll: []
|
|
write: None
|
|
connect: EINPROGRESS
|
|
wrap ok: True
|
|
poll: []
|
|
read: None
|
|
--- Plain sockets ---
|
|
connect: EINPROGRESS
|
|
poll: []
|
|
send er: EAGAIN
|
|
connect: EINPROGRESS
|
|
poll: []
|
|
write: None
|
|
connect: EINPROGRESS
|
|
poll: []
|
|
recv er: EAGAIN
|
|
connect: EINPROGRESS
|
|
poll: []
|
|
read: None
|
|
--- SSL sockets ---
|
|
connect: EINPROGRESS
|
|
wrap ok: True
|
|
poll: [(<SSLSocket>, 4)]
|
|
write: 4
|
|
connect: EINPROGRESS
|
|
wrap ok: True
|
|
poll: [(<SSLSocket>, 4)]
|
|
read: None
|