From 6a273fdc2a36f52fb70359149eff014f1b6b08d4 Mon Sep 17 00:00:00 2001 From: pxinwr Date: Sun, 29 Nov 2020 06:06:36 +0800 Subject: 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. --- Lib/test/test_pathlib.py | 2 ++ Lib/test/test_shutil.py | 4 ++++ Misc/NEWS.d/next/Tests/2020-11-23-11-11-29.bpo-31904.V3sUZk.rst | 1 + 3 files changed, 7 insertions(+) create mode 100644 Misc/NEWS.d/next/Tests/2020-11-23-11-11-29.bpo-31904.V3sUZk.rst diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py index 5e5e065..7f7f72c 100644 --- a/Lib/test/test_pathlib.py +++ b/Lib/test/test_pathlib.py @@ -2219,6 +2219,8 @@ class _BasePathTest(object): self.assertIs((P / 'fileA\x00').is_fifo(), False) @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): P = self.cls(BASE, 'myfifo') try: diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index 890f2c7..df7fbed 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -683,6 +683,8 @@ class TestCopyTree(BaseTest, unittest.TestCase): # Issue #3002: copyfile and copytree block indefinitely on named pipes @unittest.skipUnless(hasattr(os, "mkfifo"), 'requires os.mkfifo()') @os_helper.skip_unless_symlink + @unittest.skipIf(sys.platform == "vxworks", + "fifo requires special path on VxWorks") def test_copytree_named_pipe(self): os.mkdir(TESTFN) try: @@ -1206,6 +1208,8 @@ class TestCopy(BaseTest, unittest.TestCase): # Issue #3002: copyfile and copytree block indefinitely on named pipes @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): try: os.mkfifo(TESTFN) diff --git a/Misc/NEWS.d/next/Tests/2020-11-23-11-11-29.bpo-31904.V3sUZk.rst b/Misc/NEWS.d/next/Tests/2020-11-23-11-11-29.bpo-31904.V3sUZk.rst new file mode 100644 index 0000000..7202cfa --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2020-11-23-11-11-29.bpo-31904.V3sUZk.rst @@ -0,0 +1 @@ +skip some tests related to fifo on VxWorks -- cgit v0.12