python / python/cpython

test_os fails on FreeBSD 15 with zfs filesystem

Open
#148,841 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

OS-freebsd tests type-bug
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Bug report

Bug description:

fallocate() fails with EOPNOTSUPP, rather than EINVAL on FreeBSD 15 with zfs.

 ======================================================================
    ERROR: test_posix_fallocate (test.test_os.test_posix.PosixTester.test_posix_fallocate)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/nick/src/cpython-fixes/Lib/test/test_os/test_posix.py", line 409, in test_posix_fallocate
        posix.posix_fallocate(fd, 0, 10)
        ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
    OSError: [Errno 45] Operation not supported
CPython versions tested on:

CPython main branch

Operating systems tested on:

Other - FreeBSD

% uname -a
FreeBSD lappy-freebsd 15.0-RELEASE FreeBSD 15.0-RELEASE releng/15.0-n280995-7aedc8de6446 GENERIC arm64
Linked PRs
  • gh-148844

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Lib/test/test_os/test_posix.py at test_posix_fallocate and reproduce the failure on FreeBSD 15 with ZFS. Compare the expected errno with the platform behavior and review linked PR gh-148844; done means the relevant test passes without regressing supported platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
operating-systems, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.