Bug report
test_mmap.test_flush_parameters fails on DragonFly BSD:
File ".../Lib/test/test_mmap.py", line 1184, in test_flush_parameters
m.flush(0, PAGESIZE, flags=mmap.MS_ASYNC | mmap.MS_INVALIDATE)
OSError: [Errno 22] Invalid argument
DragonFly, like FreeBSD, rejects msync() with MS_ASYNC | MS_INVALIDATE (EINVAL). The test already special-cases this for sys.platform == 'freebsd', but DragonFly's sys.platform is 'dragonfly6', so it takes the else branch that expects the call to succeed.
Match DragonFly as well, using str.startswith() (which also future-proofs the FreeBSD check against a versioned sys.platform).
Linked PRs
Bug report
test_mmap.test_flush_parametersfails on DragonFly BSD:DragonFly, like FreeBSD, rejects
msync()withMS_ASYNC | MS_INVALIDATE(EINVAL). The test already special-cases this forsys.platform == 'freebsd', but DragonFly'ssys.platformis'dragonfly6', so it takes the else branch that expects the call to succeed.Match DragonFly as well, using
str.startswith()(which also future-proofs the FreeBSD check against a versionedsys.platform).Linked PRs