]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-31731: Fix test_io.check_interrupted_write() (GH-11225)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 18 Dec 2018 23:10:47 +0000 (15:10 -0800)
committerGitHub <noreply@github.com>
Tue, 18 Dec 2018 23:10:47 +0000 (15:10 -0800)
commit729fc5d2acab9eb672c4804092236af5362a4c66
treed904dcc1f07cdfbf4ca531f7f5e4ffae1a51dd00
parent12f3979b3807b448ca070b44bbc1597cf800f8a4
bpo-31731: Fix test_io.check_interrupted_write() (GH-11225)

Fix a race condition in check_interrupted_write() of test_io:
create directly the thread with SIGALRM signal blocked,
rather than blocking the signal later from the thread. Previously, it
was possible that the thread gets the signal before the signal is
blocked.
(cherry picked from commit 05c9d31eb62cc45dc3c55a5cdb7cbc713d0421db)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
Lib/test/test_io.py
Misc/NEWS.d/next/Tests/2018-12-18-23-20-39.bpo-31731.tcv85C.rst [new file with mode: 0644]