From 2b0d0be137537c2ed7bb1a940bb93b3deda5589d Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 14 Jan 2025 09:11:45 +0100 Subject: [PATCH 1/2] gh-109959: Skip test_glob.test_selflink() flaky test --- Lib/test/test_glob.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/test/test_glob.py b/Lib/test/test_glob.py index 00187a3fb3537d..7e502c4e48abb5 100644 --- a/Lib/test/test_glob.py +++ b/Lib/test/test_glob.py @@ -511,6 +511,10 @@ def fn(pat): @skip_unless_symlink class SymlinkLoopGlobTests(unittest.TestCase): + # gh-109959: On Linux, glob._isdir() and glob._lexists() can return False + # randomly when checking the "link/" symbolic link. + # https://github.com/python/cpython/issues/109959#issuecomment-2577550700 + @unittest.skipIf(True, "flaky test") def test_selflink(self): tempdir = TESTFN + "_dir" os.makedirs(tempdir) From 1fe07f1e470787886b8cb77a80455b51d4703ab8 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 14 Jan 2025 10:22:24 +0100 Subject: [PATCH 2/2] Update Lib/test/test_glob.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> --- Lib/test/test_glob.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_glob.py b/Lib/test/test_glob.py index 7e502c4e48abb5..1a836e34e8712f 100644 --- a/Lib/test/test_glob.py +++ b/Lib/test/test_glob.py @@ -514,7 +514,7 @@ class SymlinkLoopGlobTests(unittest.TestCase): # gh-109959: On Linux, glob._isdir() and glob._lexists() can return False # randomly when checking the "link/" symbolic link. # https://github.com/python/cpython/issues/109959#issuecomment-2577550700 - @unittest.skipIf(True, "flaky test") + @unittest.skip("flaky test") def test_selflink(self): tempdir = TESTFN + "_dir" os.makedirs(tempdir)