mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-31904: Fix fifo test cases for VxWorks (GH-20254)
This commit is contained in:
parent
cc061d0e6f
commit
b2d0c66e88
3 changed files with 18 additions and 6 deletions
|
@ -2,6 +2,7 @@ import unittest
|
|||
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
|
||||
|
@ -173,11 +174,16 @@ class TestFilemode:
|
|||
|
||||
@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
|
||||
self.addCleanup(os_helper.unlink, fifo_path)
|
||||
try:
|
||||
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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue