We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
mmap.flush
1 parent 3ca1f2a commit c3bfe5dCopy full SHA for c3bfe5d
1 file changed
Lib/test/test_mmap.py
@@ -1173,7 +1173,13 @@ def test_flush_parameters(self):
1173
if hasattr(mmap, 'MS_INVALIDATE'):
1174
m.flush(PAGESIZE * 2, flags=mmap.MS_INVALIDATE)
1175
if hasattr(mmap, 'MS_ASYNC') and hasattr(mmap, 'MS_INVALIDATE'):
1176
- m.flush(0, PAGESIZE, flags=mmap.MS_ASYNC | mmap.MS_INVALIDATE)
+ if sys.platform == 'freebsd':
1177
+ # FreeBSD doesn't support this combination
1178
+ with self.assertRaises(OSError) as cm:
1179
+ m.flush(0, PAGESIZE, flags=mmap.MS_ASYNC | mmap.MS_INVALIDATE)
1180
+ self.assertEqual(cm.exception.errno, errno.EINVAL)
1181
+ else:
1182
1183
1184
@unittest.skipUnless(sys.platform == 'linux', 'Linux only')
1185
@support.requires_linux_version(5, 17, 0)
0 commit comments