From 201f0ea2bcff4ddaf5223defcad9b413d6ae8770 Mon Sep 17 00:00:00 2001 From: ShaharNaveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Wed, 10 Sep 2025 10:37:37 +0200 Subject: [PATCH 1/8] Fix `test_dtrace.py` --- Lib/test/test_dtrace.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Lib/test/test_dtrace.py b/Lib/test/test_dtrace.py index e1adf8e9748..a63978fd1bd 100644 --- a/Lib/test/test_dtrace.py +++ b/Lib/test/test_dtrace.py @@ -159,11 +159,43 @@ class DTraceNormalTests(TraceTests, unittest.TestCase): backend = DTraceBackend() optimize_python = 0 + @unittest.expectedFailureIfWindows('TODO: RUSTPYTHON') + def test_function_entry_return(self): + return super().test_function_entry_return() + + @unittest.expectedFailureIfWindows('TODO: RUSTPYTHON') + def test_verify_call_opcodes(self): + return super().test_verify_call_opcodes() + + @unittest.expectedFailureIfWindows('TODO: RUSTPYTHON') + def test_gc(self): + return super().test_gc() + + @unittest.expectedFailureIfWindows('TODO: RUSTPYTHON') + def test_line(self): + return super().test_line() + class DTraceOptimizedTests(TraceTests, unittest.TestCase): backend = DTraceBackend() optimize_python = 2 + @unittest.expectedFailureIfWindows('TODO: RUSTPYTHON') + def test_function_entry_return(self): + return super().test_function_entry_return() + + @unittest.expectedFailureIfWindows('TODO: RUSTPYTHON') + def test_verify_call_opcodes(self): + return super().test_verify_call_opcodes() + + @unittest.expectedFailureIfWindows('TODO: RUSTPYTHON') + def test_gc(self): + return super().test_gc() + + @unittest.expectedFailureIfWindows('TODO: RUSTPYTHON') + def test_line(self): + return super().test_line() + class SystemTapNormalTests(TraceTests, unittest.TestCase): backend = SystemTapBackend() From bc2a01a6cf56fea992ea96931bc3bd612a7c7638 Mon Sep 17 00:00:00 2001 From: ShaharNaveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Wed, 10 Sep 2025 10:39:42 +0200 Subject: [PATCH 2/8] Fix `test_genericpath.py` --- Lib/test/test_genericpath.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/test/test_genericpath.py b/Lib/test/test_genericpath.py index 2e28d3cfb7e..0d184b71637 100644 --- a/Lib/test/test_genericpath.py +++ b/Lib/test/test_genericpath.py @@ -352,6 +352,10 @@ def test_invalid_paths(self): with self.assertRaisesRegex(ValueError, 'embedded null'): func(b'/tmp\x00abcds') + @unittest.expectedFailureIfWindows('TODO: RUSTPYTHON') + def test_samestat_on_symlink(self): + return super().test_samestat_on_symlink() + # Following TestCase is not supposed to be run from test_genericpath. # It is inherited by other test modules (ntpath, posixpath). From e33801ae88083bcdeb3ab0107f1d2ab3a5653c0a Mon Sep 17 00:00:00 2001 From: ShaharNaveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Wed, 10 Sep 2025 10:41:51 +0200 Subject: [PATCH 3/8] fix `test_ntpath.py` --- Lib/test/test_ntpath.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py index f2cafd97b35..68779ac5935 100644 --- a/Lib/test/test_ntpath.py +++ b/Lib/test/test_ntpath.py @@ -1527,6 +1527,10 @@ def test_expandvars(self): def test_expandvars_nonascii(self): return super().test_expandvars_nonascii() + @unittest.expectedFailureIfWindows('TODO: RUSTPYTHON') + def test_samefile_on_symlink(self): + return super().test_samefile_on_symlink() + class PathLikeTests(NtpathTestCase): From 42edfdd4085cb7609d42f71ec57f05f94804211b Mon Sep 17 00:00:00 2001 From: ShaharNaveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Wed, 10 Sep 2025 10:43:00 +0200 Subject: [PATCH 4/8] Fix `test_py_compile.py` --- Lib/test/test_py_compile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/Lib/test/test_py_compile.py b/Lib/test/test_py_compile.py index 750afc1de71..6d10099c614 100644 --- a/Lib/test/test_py_compile.py +++ b/Lib/test/test_py_compile.py @@ -78,7 +78,6 @@ def test_absolute_path(self): self.assertTrue(os.path.exists(self.pyc_path)) self.assertFalse(os.path.exists(self.cache_path)) - @unittest.expectedFailureIfWindows("TODO: RUSTPYTHON") def test_do_not_overwrite_symlinks(self): # In the face of a cfile argument being a symlink, bail out. # Issue #17222 From 5b161afc4ed1447913cce7bbaac8fd2675fd675c Mon Sep 17 00:00:00 2001 From: ShaharNaveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Wed, 10 Sep 2025 10:47:17 +0200 Subject: [PATCH 5/8] Fix `test_shutil.py` --- Lib/test/test_shutil.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index b64ccb37a52..8a426e338a7 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -196,7 +196,6 @@ def test_rmtree_works_on_bytes(self): self.assertIsInstance(victim, bytes) shutil.rmtree(victim) - @unittest.expectedFailureIfWindows("TODO: RUSTPYTHON") @os_helper.skip_unless_symlink def test_rmtree_fails_on_symlink_onerror(self): tmp = self.mkdtemp() @@ -216,7 +215,6 @@ def onerror(*args): self.assertEqual(errors[0][1], link) self.assertIsInstance(errors[0][2][1], OSError) - @unittest.expectedFailureIfWindows("TODO: RUSTPYTHON") @os_helper.skip_unless_symlink def test_rmtree_fails_on_symlink_onexc(self): tmp = self.mkdtemp() @@ -1087,7 +1085,6 @@ def test_copymode_follow_symlinks(self): shutil.copymode(src_link, dst_link) self.assertEqual(os.stat(src).st_mode, os.stat(dst).st_mode) - @unittest.expectedFailureIfWindows("TODO: RUSTPYTHON") @unittest.skipUnless(hasattr(os, 'lchmod') or os.name == 'nt', 'requires os.lchmod') @os_helper.skip_unless_symlink def test_copymode_symlink_to_symlink(self): @@ -1317,7 +1314,6 @@ def test_copy(self): self.assertTrue(os.path.exists(file2)) self.assertEqual(os.stat(file1).st_mode, os.stat(file2).st_mode) - @unittest.expectedFailureIfWindows("TODO: RUSTPYTHON") @os_helper.skip_unless_symlink def test_copy_symlinks(self): tmp_dir = self.mkdtemp() @@ -1360,7 +1356,6 @@ def test_copy2(self): self.assertEqual(getattr(file1_stat, 'st_flags'), getattr(file2_stat, 'st_flags')) - @unittest.expectedFailureIfWindows("TODO: RUSTPYTHON") @os_helper.skip_unless_symlink def test_copy2_symlinks(self): tmp_dir = self.mkdtemp() @@ -1445,7 +1440,6 @@ def _test_copy_dir(self, copy_func): ### shutil.copyfile - @unittest.expectedFailureIfWindows("TODO: RUSTPYTHON") @os_helper.skip_unless_symlink def test_copyfile_symlinks(self): tmp_dir = self.mkdtemp() @@ -1483,6 +1477,7 @@ def test_dont_copy_file_onto_link_to_itself(self): finally: shutil.rmtree(TESTFN, ignore_errors=True) + @unittest.expectedFailureIfWindows('TODO: RUSTPYTHON') @os_helper.skip_unless_symlink def test_dont_copy_file_onto_symlink_to_itself(self): # bug 851123. From ef90c55454dc4dbdff8f459eb9fd16f249aa248d Mon Sep 17 00:00:00 2001 From: ShaharNaveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Wed, 10 Sep 2025 10:48:53 +0200 Subject: [PATCH 6/8] fix `test_stat.py` --- Lib/test/test_stat.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Lib/test/test_stat.py b/Lib/test/test_stat.py index ec4cca45280..49013a4bcd8 100644 --- a/Lib/test/test_stat.py +++ b/Lib/test/test_stat.py @@ -325,21 +325,10 @@ def test_macosx_attribute_values(self): class TestFilemodeCStat(TestFilemode, unittest.TestCase): statmod = c_stat - # TODO: RUSTPYTHON - if sys.platform == "win32": - @unittest.expectedFailure - def test_link(self): - super().test_link() class TestFilemodePyStat(TestFilemode, unittest.TestCase): statmod = py_stat - # TODO: RUSTPYTHON - if sys.platform == "win32": - @unittest.expectedFailure - def test_link(self): - super().test_link() - if __name__ == '__main__': unittest.main() From 912f34063a64f363377c2366b5717ab5778132cc Mon Sep 17 00:00:00 2001 From: ShaharNaveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Wed, 10 Sep 2025 10:50:56 +0200 Subject: [PATCH 7/8] Fix `test_tarfile.py` --- Lib/test/test_tarfile.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py index 0fed89c7735..61929e537ff 100644 --- a/Lib/test/test_tarfile.py +++ b/Lib/test/test_tarfile.py @@ -1276,7 +1276,6 @@ def test_gettarinfo_pathlike_name(self): self.assertEqual(tarinfo.name, tarinfo2.name) self.assertEqual(tarinfo.size, 3) - @unittest.expectedFailureIfWindows("TODO: RUSTPYTHON") @unittest.skipUnless(hasattr(os, "link"), "Missing hardlink implementation") def test_link_size(self): @@ -1301,7 +1300,6 @@ def test_link_size(self): os_helper.unlink(target) os_helper.unlink(link) - @unittest.expectedFailureIfWindows("TODO: RUSTPYTHON") @os_helper.skip_unless_symlink def test_symlink_size(self): path = os.path.join(TEMPDIR, "symlink") @@ -1849,7 +1847,6 @@ def test_add_twice(self): self.assertEqual(tarinfo.type, tarfile.REGTYPE, "add file as regular failed") - @unittest.expectedFailureIfWindows("TODO: RUSTPYTHON") def test_add_hardlink(self): tarinfo = self.tar.gettarinfo(self.bar) self.assertEqual(tarinfo.type, tarfile.LNKTYPE, From 0a5546179457bff808051ef3ef74535d350a4faf Mon Sep 17 00:00:00 2001 From: ShaharNaveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Wed, 10 Sep 2025 15:56:11 +0200 Subject: [PATCH 8/8] Mark failing tests --- Lib/test/test_genericpath.py | 4 ++++ Lib/test/test_ntpath.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Lib/test/test_genericpath.py b/Lib/test/test_genericpath.py index 0d184b71637..3475c026bb8 100644 --- a/Lib/test/test_genericpath.py +++ b/Lib/test/test_genericpath.py @@ -356,6 +356,10 @@ def test_invalid_paths(self): def test_samestat_on_symlink(self): return super().test_samestat_on_symlink() + @unittest.expectedFailureIfWindows('TODO: RUSTPYTHON') + def test_samefile_on_symlink(self): + return super().test_samefile_on_symlink() + # Following TestCase is not supposed to be run from test_genericpath. # It is inherited by other test modules (ntpath, posixpath). diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py index 68779ac5935..96c20fe8934 100644 --- a/Lib/test/test_ntpath.py +++ b/Lib/test/test_ntpath.py @@ -1531,6 +1531,10 @@ def test_expandvars_nonascii(self): def test_samefile_on_symlink(self): return super().test_samefile_on_symlink() + @unittest.expectedFailureIfWindows('TODO: RUSTPYTHON') + def test_samestat_on_symlink(self): + return super().test_samestat_on_symlink() + class PathLikeTests(NtpathTestCase):