From: Serhiy Storchaka Date: Wed, 22 Jul 2026 05:07:53 +0000 (+0300) Subject: gh-154416: Fix hanging test_tcflow on DragonFly BSD (GH-154417) X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=b0c945a27e708419c6845234ef633ce3f7c4c41e;p=thirdparty%2FPython%2Fcpython.git gh-154416: Fix hanging test_tcflow on DragonFly BSD (GH-154417) TCIOFF and TCION transmit STOP and START characters, and closing the pseudo-terminal waits until they are read. Discard them. Co-authored-by: Claude Opus 4.8 --- diff --git a/Lib/test/test_termios.py b/Lib/test/test_termios.py index ede23ec38860..2739b990e090 100644 --- a/Lib/test/test_termios.py +++ b/Lib/test/test_termios.py @@ -194,6 +194,9 @@ class TestFunctions(unittest.TestCase): termios.tcflow(self.fd, termios.TCOON) termios.tcflow(self.fd, termios.TCIOFF) termios.tcflow(self.fd, termios.TCION) + # Discard the transmitted STOP and START characters, + # otherwise closing the pseudo-terminal can block. + termios.tcflush(self.fd, termios.TCOFLUSH) @support.skip_android_selinux('tcflow') def test_tcflow_errors(self):