]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-31904: Fix test_os.test_getcwd_long_path() failure for VxWorks (GH-20256)
authorpxinwr <peixing.xin@windriver.com>
Sat, 28 Nov 2020 20:21:30 +0000 (04:21 +0800)
committerGitHub <noreply@github.com>
Sat, 28 Nov 2020 20:21:30 +0000 (21:21 +0100)
Lib/test/test_os.py
Misc/NEWS.d/next/Tests/2020-05-20-17-28-46.bpo-31904.yt83Ge.rst [new file with mode: 0644]

index f127cb199bbb5cb219efbfddb1fa9a0bc3c0b069..dbb2975c0eee49a0997ca1c023ccac87a8672672 100644 (file)
@@ -116,6 +116,10 @@ class MiscTests(unittest.TestCase):
         # than MAX_PATH if long paths support is disabled:
         # see RtlAreLongPathsEnabled().
         min_len = 2000   # characters
+        # On VxWorks, PATH_MAX is defined as 1024 bytes. Creating a path
+        # longer than PATH_MAX will fail.
+        if sys.platform == 'vxworks':
+            min_len = 1000
         dirlen = 200     # characters
         dirname = 'python_test_dir_'
         dirname = dirname + ('a' * (dirlen - len(dirname)))
diff --git a/Misc/NEWS.d/next/Tests/2020-05-20-17-28-46.bpo-31904.yt83Ge.rst b/Misc/NEWS.d/next/Tests/2020-05-20-17-28-46.bpo-31904.yt83Ge.rst
new file mode 100644 (file)
index 0000000..1679801
--- /dev/null
@@ -0,0 +1 @@
+Fix os module failures for VxWorks RTOS.