From 274306860b2d64b67ef6e8a14e8af3fd56c8d0ff Mon Sep 17 00:00:00 2001 From: Yanfeng Liu Date: Fri, 11 Jul 2025 08:24:20 +0800 Subject: [PATCH] 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 --- tests/extmod/select_poll_udp.py | 2 ++ tests/extmod/socket_udp_nonblock.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/extmod/select_poll_udp.py b/tests/extmod/select_poll_udp.py index 133871b1a4292..887176a4f655c 100644 --- a/tests/extmod/select_poll_udp.py +++ b/tests/extmod/select_poll_udp.py @@ -29,3 +29,5 @@ 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 1e74e2917dc30..394115e4b8849 100644 --- a/tests/extmod/socket_udp_nonblock.py +++ b/tests/extmod/socket_udp_nonblock.py @@ -19,3 +19,5 @@ s.recv(1) except OSError as er: print("EAGAIN:", er.errno == errno.EAGAIN) + +s.close() pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy