diff options
| author | Yanfeng Liu <yfliu2008@qq.com> | 2025-07-11 08:24:20 +0800 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-07-15 13:57:21 +1000 |
| commit | 274306860b2d64b67ef6e8a14e8af3fd56c8d0ff (patch) | |
| tree | 9826f29710cc655c34b2ac236d09e230818d1183 /tests | |
| parent | 8f8f8539827a4d38dd51e4960fe54a0ed8ab08ea (diff) | |
tests/extmod: Close UDP sockets at end of test.
This adds call to release UDP port in a timely manner, so they can be
reused in subsequent tests. Otherwise, one could face issue like #17623.
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/extmod/select_poll_udp.py | 2 | ||||
| -rw-r--r-- | tests/extmod/socket_udp_nonblock.py | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/extmod/select_poll_udp.py b/tests/extmod/select_poll_udp.py index 133871b1a..887176a4f 100644 --- a/tests/extmod/select_poll_udp.py +++ b/tests/extmod/select_poll_udp.py @@ -29,3 +29,5 @@ print(poll.poll(0)[0][1] == select.POLLOUT) if hasattr(select, "select"): r, w, e = select.select([s], [], [], 0) assert not r and not w and not e + +s.close() diff --git a/tests/extmod/socket_udp_nonblock.py b/tests/extmod/socket_udp_nonblock.py index 1e74e2917..394115e4b 100644 --- a/tests/extmod/socket_udp_nonblock.py +++ b/tests/extmod/socket_udp_nonblock.py @@ -19,3 +19,5 @@ try: s.recv(1) except OSError as er: print("EAGAIN:", er.errno == errno.EAGAIN) + +s.close() |
