Mailing List Archive

bpo-31904: Fix test_os.test_getcwd_long_path() failure for VxWorks (GH-20256)
https://github.com/python/cpython/commit/aa1b8a168d8b8dc1dfc426364b7b664501302958
commit: aa1b8a168d8b8dc1dfc426364b7b664501302958
branch: master
author: pxinwr <peixing.xin@windriver.com>
committer: vstinner <vstinner@python.org>
date: 2020-11-28T21:21:30+01:00
summary:

bpo-31904: Fix test_os.test_getcwd_long_path() failure for VxWorks (GH-20256)

files:
A Misc/NEWS.d/next/Tests/2020-05-20-17-28-46.bpo-31904.yt83Ge.rst
M Lib/test/test_os.py

diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index f127cb199bbb5..dbb2975c0eee4 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -116,6 +116,10 @@ def test_getcwd_long_path(self):
# 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
index 0000000000000..1679801a11106
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2020-05-20-17-28-46.bpo-31904.yt83Ge.rst
@@ -0,0 +1 @@
+Fix os module failures for VxWorks RTOS.

_______________________________________________
Python-checkins mailing list
Python-checkins@python.org
https://mail.python.org/mailman/listinfo/python-checkins