8000 Skip test_preadv_flags if RWF_HIPRI is not supported by the system (G… · python/cpython@46544f6 · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 46544f6

Browse files
authored
Skip test_preadv_flags if RWF_HIPRI is not supported by the system (GH-12762)
1 parent f2cf1e3 commit 46544f6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Lib/test/test_posix.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,14 @@ def test_preadv_flags(self):
310310
buf = [bytearray(i) for i in [5, 3, 2]]
311311
self.assertEqual(posix.preadv(fd, buf, 3, os.RWF_HIPRI), 10)
312312
self.assertEqual([b't1tt2', b't3t', b'5t'], list(buf))
313+
except OSError as inst:
314+
# Is possible that the macro RWF_HIPRI was defined at compilation time
315+
# but the option is not supported by the kernel or the runtime libc shared
316+
# library.
317+
if inst.errno in {errno.EINVAL, errno.ENOTSUP}:
318+
raise unittest.SkipTest("RWF_HIPRI is not supported by the current system")
319+
else:
320+
raise
313321
finally:
314322
os.close(fd)
315323

0 commit comments

Comments
 (0)
0