bpo-31904: skip some tests related to fifo on VxWorks (GH-23473)
On VxWork RTOS, FIFO must be created under directory "/fifos/". Some test cases related to fifo is invalid on VxWorks. So skip them.
This commit is contained in:
parent
a86a274b72
commit
6a273fdc2a
|
@ -2219,6 +2219,8 @@ class _BasePathTest(object):
|
||||||
self.assertIs((P / 'fileA\x00').is_fifo(), False)
|
self.assertIs((P / 'fileA\x00').is_fifo(), False)
|
||||||
|
|
||||||
@unittest.skipUnless(hasattr(os, "mkfifo"), "os.mkfifo() required")
|
@unittest.skipUnless(hasattr(os, "mkfifo"), "os.mkfifo() required")
|
||||||
|
@unittest.skipIf(sys.platform == "vxworks",
|
||||||
|
"fifo requires special path on VxWorks")
|
||||||
def test_is_fifo_true(self):
|
def test_is_fifo_true(self):
|
||||||
P = self.cls(BASE, 'myfifo')
|
P = self.cls(BASE, 'myfifo')
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -683,6 +683,8 @@ class TestCopyTree(BaseTest, unittest.TestCase):
|
||||||
# Issue #3002: copyfile and copytree block indefinitely on named pipes
|
# Issue #3002: copyfile and copytree block indefinitely on named pipes
|
||||||
@unittest.skipUnless(hasattr(os, "mkfifo"), 'requires os.mkfifo()')
|
@unittest.skipUnless(hasattr(os, "mkfifo"), 'requires os.mkfifo()')
|
||||||
@os_helper.skip_unless_symlink
|
@os_helper.skip_unless_symlink
|
||||||
|
@unittest.skipIf(sys.platform == "vxworks",
|
||||||
|
"fifo requires special path on VxWorks")
|
||||||
def test_copytree_named_pipe(self):
|
def test_copytree_named_pipe(self):
|
||||||
os.mkdir(TESTFN)
|
os.mkdir(TESTFN)
|
||||||
try:
|
try:
|
||||||
|
@ -1206,6 +1208,8 @@ class TestCopy(BaseTest, unittest.TestCase):
|
||||||
|
|
||||||
# Issue #3002: copyfile and copytree block indefinitely on named pipes
|
# Issue #3002: copyfile and copytree block indefinitely on named pipes
|
||||||
@unittest.skipUnless(hasattr(os, "mkfifo"), 'requires os.mkfifo()')
|
@unittest.skipUnless(hasattr(os, "mkfifo"), 'requires os.mkfifo()')
|
||||||
|
@unittest.skipIf(sys.platform == "vxworks",
|
||||||
|
"fifo requires special path on VxWorks")
|
||||||
def test_copyfile_named_pipe(self):
|
def test_copyfile_named_pipe(self):
|
||||||
try:
|
try:
|
||||||
os.mkfifo(TESTFN)
|
os.mkfifo(TESTFN)
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
skip some tests related to fifo on VxWorks
|
Loading…
Reference in New Issue