Skip to content

Comments

gh-63016: Skip some mmap tests on FreeBSD#143230

Merged
picnixz merged 2 commits intopython:mainfrom
aisk:skip-mmap-bsd
Dec 28, 2025
Merged

gh-63016: Skip some mmap tests on FreeBSD#143230
picnixz merged 2 commits intopython:mainfrom
aisk:skip-mmap-bsd

Conversation

@aisk
Copy link
Member

@aisk aisk commented Dec 27, 2025

@aisk
Copy link
Member Author

aisk commented Dec 27, 2025

!buildbot freebsd

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @aisk for commit 5151a11 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F143230%2Fmerge

The command will test the builders whose names match following regular expression: freebsd

The builders matched are:

  • AMD64 FreeBSD14 PR
  • AMD64 FreeBSD PR
  • AMD64 FreeBSD Refleaks PR
  • AMD64 FreeBSD15 PR

@aisk aisk requested a review from picnixz December 27, 2025 17:46
@aisk
Copy link
Member Author

aisk commented Dec 27, 2025

@picnixz Hi, I'm not sure why FreeBSD doesn't support this usage, but I think we can just skip this test as a fix and assume that FreeBSD simply doesn't support m.flush(0, PAGESIZE, flags=mmap.MS_ASYNC | mmap.MS_INVALIDATE)?

@picnixz
Copy link
Member

picnixz commented Dec 27, 2025

I didn't look at the buildbot traceback but if the combination is not supported, I'd prefer checking for an exception being raised.

@aisk
Copy link
Member Author

aisk commented Dec 27, 2025

I have a FreeBSD VM and this is the traceback I got:

$ ./python -m test test_mmap
Using random seed: 1145639683
0:00:00 load avg: 0.85 Run 1 test sequentially in a single process
0:00:00 load avg: 0.85 [1/1] test_mmap
test test_mmap failed -- Traceback (most recent call last):
  File "/usr/home/asaka/cpython/Lib/test/test_mmap.py", line 1176, in test_flush_parameters
    m.flush(0, PAGESIZE, flags=mmap.MS_ASYNC | mmap.MS_INVALIDATE)
    ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 22] Invalid argument

0:00:00 load avg: 0.85 [1/1/1] test_mmap failed (1 error)

== Tests result: FAILURE ==

1 test failed:
    test_mmap

Total duration: 120 ms
Total tests: run=53 skipped=13
Total test files: run=1/1 failed=1
Result: FAILURE

I'm not very familiar with BSD, but I will try to just check the error on FreeBSD. If this is not acceptable, I'll dig into it tomorrow.

@picnixz
Copy link
Member

picnixz commented Dec 27, 2025

I think catching OSError would be sufficient then. What matters is that we don't crash.

@aisk
Copy link
Member Author

aisk commented Dec 28, 2025

!buildbot bsd

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @aisk for commit ba674d5 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F143230%2Fmerge

The command will test the builders whose names match following regular expression: bsd

The builders matched are:

  • AMD64 FreeBSD14 PR
  • AMD64 FreeBSD PR
  • AMD64 FreeBSD Refleaks PR
  • AMD64 FreeBSD15 PR

@picnixz
Copy link
Member

picnixz commented Dec 28, 2025

I'll wait for the bots to complete and then I'll merge this.

@picnixz picnixz merged commit c3bfe5d into python:main Dec 28, 2025
52 checks passed
@aisk aisk deleted the skip-mmap-bsd branch December 29, 2025 01:56
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
)

Fix `mmap.flush` tests introduced in 1af21ea
where some flag combinations are not supported on FreeBSD.
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.

3 participants