File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1173,7 +1173,13 @@ def test_flush_parameters(self):
11731173 if hasattr (mmap , 'MS_INVALIDATE' ):
11741174 m .flush (PAGESIZE * 2 , flags = mmap .MS_INVALIDATE )
11751175 if hasattr (mmap , 'MS_ASYNC' ) and hasattr (mmap , 'MS_INVALIDATE' ):
1176- m .flush (0 , PAGESIZE , flags = mmap .MS_ASYNC | mmap .MS_INVALIDATE )
1176+ 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+ m .flush (0 , PAGESIZE , flags = mmap .MS_ASYNC | mmap .MS_INVALIDATE )
11771183
11781184 @unittest .skipUnless (sys .platform == 'linux' , 'Linux only' )
11791185 @support .requires_linux_version (5 , 17 , 0 )
You can’t perform that action at this time.
0 commit comments