bpo-31904: fix fifo test cases for VxWorks RTOS by pxinwr · Pull Request #20254 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions Lib/test/test_posix.py
10 changes: 8 additions & 2 deletions Lib/test/test_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import socket
import sys
from test.support import os_helper
from test.support import socket_helper
from test.support.import_helper import import_fresh_module
from test.support.os_helper import TESTFN
Expand Down Expand Up @@ -173,11 +174,16 @@ def test_link(self):

@unittest.skipUnless(hasattr(os, 'mkfifo'), 'os.mkfifo not available')
def test_fifo(self):
if sys.platform == "vxworks":
fifo_path = os.path.join("/fifos/", TESTFN)
else:
fifo_path = TESTFN
Comment thread
pxinwr marked this conversation as resolved.
self.addCleanup(os_helper.unlink, fifo_path)
try:
Comment thread
vstinner marked this conversation as resolved.
os.mkfifo(TESTFN, 0o700)
os.mkfifo(fifo_path, 0o700)
except PermissionError as e:
self.skipTest('os.mkfifo(): %s' % e)
st_mode, modestr = self.get_mode()
st_mode, modestr = self.get_mode(fifo_path)
self.assertEqual(modestr, 'prwx------')
self.assertS_IS("FIFO", st_mode)

Expand Down