Skip to content

test_flush_parameters fails on DragonFly BSD #154260

Description

@serhiy-storchaka

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.15pre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixestestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions