Skip to content

gh-154260: Fix test_flush_parameters on DragonFly BSD#154261

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:mmap-flush-dragonfly
Jul 20, 2026
Merged

gh-154260: Fix test_flush_parameters on DragonFly BSD#154261
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:mmap-flush-dragonfly

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jul 20, 2026

Copy link
Copy Markdown
Member

DragonFly BSD, like FreeBSD, rejects mmap.flush() with MS_ASYNC | MS_INVALIDATE (EINVAL). The test special-cased this only for sys.platform == 'freebsd', but DragonFly's sys.platform is 'dragonfly6', so it took the else branch expecting success. Use sys.platform.startswith(('freebsd', 'dragonfly')), which also future-proofs the FreeBSD match against a versioned sys.platform.

Verified on DragonFly 6 (now passes), FreeBSD and Linux (unaffected).

🤖 Generated with Claude Code

DragonFly, like FreeBSD, rejects mmap.flush() with MS_ASYNC|MS_INVALIDATE
(EINVAL).  Use str.startswith() so the check also matches DragonFly, whose
sys.platform carries a version suffix.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label Jul 20, 2026
@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes skip news labels Jul 20, 2026
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) July 20, 2026 14:07
@serhiy-storchaka
serhiy-storchaka merged commit fc4d93d into python:main Jul 20, 2026
60 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker fc4d93dcf1a01f56fd8ffc35b6d3700c98ffa6c9 3.14

@miss-islington-app

Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker fc4d93dcf1a01f56fd8ffc35b6d3700c98ffa6c9 3.13

@bedevere-app

bedevere-app Bot commented Jul 20, 2026

Copy link
Copy Markdown

GH-154269 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 20, 2026
@serhiy-storchaka serhiy-storchaka removed needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Jul 20, 2026
@serhiy-storchaka serhiy-storchaka removed their assignment Jul 20, 2026
serhiy-storchaka added a commit that referenced this pull request Jul 20, 2026
…) (GH-154269)

DragonFly, like FreeBSD, rejects mmap.flush() with MS_ASYNC|MS_INVALIDATE
(EINVAL).  Use str.startswith() so the check also matches DragonFly, whose
sys.platform carries a version suffix.
(cherry picked from commit fc4d93d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant