From: Serhiy Storchaka Date: Mon, 20 Jul 2026 19:25:33 +0000 (+0300) Subject: gh-154289: Fix test_socket.testGetServBy on DragonFly (GH-154290) X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=96059f9446510f594c4148d53bd1a4e3532af697;p=thirdparty%2FPython%2Fcpython.git gh-154289: Fix test_socket.testGetServBy on DragonFly (GH-154290) DragonFly lists "echo 4/ddp" before "echo 7/tcp" in /etc/services, like FreeBSD, so avoid the "echo" service there too. Co-authored-by: Claude Opus 4.8 (1M context) --- diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 99f9e746c854..a234d6b37ff3 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -1302,7 +1302,8 @@ class GeneralModuleTests(unittest.TestCase): # protocol, at least for modern Linuxes. if ( sys.platform.startswith( - ('linux', 'android', 'freebsd', 'netbsd', 'gnukfreebsd')) + ('linux', 'android', 'freebsd', 'dragonfly', 'netbsd', + 'gnukfreebsd')) or is_apple ): # avoid the 'echo' service on this platform, as there is an