-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tarfile doesn't set file modes correctly on FreeBSD: test_tarfile.test_modes() fails on FreeBSD #108948
Labels
needs backport to 3.9
only security fixes
needs backport to 3.10
only security fixes
OS-freebsd
tests
Tests in the Lib/test dir
type-bug
An unexpected behavior, bug, or error
Comments
vstinner
changed the title
tarfile doesn't set file modes correctly on FreeBSD
tarfile doesn't set file modes correctly on FreeBSD: test_tarfile.test_modes() fails on FreeBSD
Sep 14, 2023
On further assessment (thanks @encukou), this could be solely a tests issue, and not a library bug. Maybe it's okay that tarfile has different behaviors on different OSes, especially around exotic cases, and it's enough to relax the expectation in the failing test. |
vstinner
added a commit
to vstinner/cpython
that referenced
this issue
Sep 21, 2023
On FreeBSD, regular user cannot set the sticky bit. Skip the test if chmod() fails with EFTYPE error.
vstinner
added a commit
to vstinner/cpython
that referenced
this issue
Sep 21, 2023
On FreeBSD, regular user cannot set the sticky bit. Skip the test if chmod() fails with EFTYPE error.
vstinner
added a commit
to vstinner/cpython
that referenced
this issue
Sep 21, 2023
On FreeBSD, regular users cannot set the sticky bit. Skip the test if chmod() fails with EFTYPE error.
vstinner
added a commit
that referenced
this issue
Sep 21, 2023
On FreeBSD, regular users cannot set the sticky bit. Skip the test if chmod() fails with EFTYPE error.
vstinner
added a commit
to vstinner/cpython
that referenced
this issue
Sep 21, 2023
…on#109697) On FreeBSD, regular users cannot set the sticky bit. Skip the test if chmod() fails with EFTYPE error. (cherry picked from commit 26e06ad)
This was referenced Sep 21, 2023
Fixed by skipping the test if chmod() cannot set the sticky bit. See #108950 (comment) for the longer rationale. |
csm10495
pushed a commit
to csm10495/cpython
that referenced
this issue
Sep 28, 2023
…on#109697) On FreeBSD, regular users cannot set the sticky bit. Skip the test if chmod() fails with EFTYPE error.
Glyphack
pushed a commit
to Glyphack/cpython
that referenced
this issue
Sep 2, 2024
…on#109697) On FreeBSD, regular users cannot set the sticky bit. Skip the test if chmod() fails with EFTYPE error.
encukou
added
needs backport to 3.9
only security fixes
needs backport to 3.10
only security fixes
labels
Oct 10, 2024
encukou
pushed a commit
to encukou/cpython
that referenced
this issue
Oct 10, 2024
…on#109697) On FreeBSD, regular users cannot set the sticky bit. Skip the test if chmod() fails with EFTYPE error.
encukou
pushed a commit
to encukou/cpython
that referenced
this issue
Oct 16, 2024
…on#109697) On FreeBSD, regular users cannot set the sticky bit. Skip the test if chmod() fails with EFTYPE error.
pablogsal
pushed a commit
that referenced
this issue
Oct 22, 2024
…ystems that don't support them (GH-108368) (GH-109697) (#125255) * gh-107902: Don't test setting suid/sgid on systems that don't support them (GH-108368) * gh-108948: Skip test_tarfile.test_modes() on EFTYPE error (#109697) On FreeBSD, regular users cannot set the sticky bit. Skip the test if chmod() fails with EFTYPE error. --------- Co-authored-by: Victor Stinner <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Oct 22, 2024
…/sticky on systems that don't support them (pythonGH-108368) (pythonGH-109697) (pythonGH-125255) * pythongh-107902: Don't test setting suid/sgid on systems that don't support them (pythonGH-108368) * pythongh-108948: Skip test_tarfile.test_modes() on EFTYPE error (pythonGH-109697) On FreeBSD, regular users cannot set the sticky bit. Skip the test if chmod() fails with EFTYPE error. --------- (cherry picked from commit 6bbaab8) Co-authored-by: Petr Viktorin <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
ambv
pushed a commit
that referenced
this issue
Oct 28, 2024
…stems that don't support them (GH-108368) (GH-109697) (#125576) On FreeBSD, regular users cannot set the sticky bit. Skip the test if chmod() fails with EFTYPE error. Co-authored-by: Victor Stinner <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
needs backport to 3.9
only security fixes
needs backport to 3.10
only security fixes
OS-freebsd
tests
Tests in the Lib/test dir
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
The best example for this is given in the regression test suite.
TestExtractionFilters.test_modes
intest_tarfiles
fails withOSError: [Errno 79] Inappropriate file type or format
on FreeBSD.The reason is that chmod fails with EFTYPE (errno 79) when attempting to set the sticky bit (S_ISVTX) on a file when the effective user is not root. Most other platforms will just ignore the bit in chmod calls.
Tested on FreeBSD 13.2 but documentation suggests this is not a new behavior.
(Note that FreeBSD buildbots haven't been running for a while. This is probably why this issue, although it causes a test failure, hadn't been caught before)
CPython versions tested on:
3.12
Operating systems tested on:
Other
Linked PRs
The text was updated successfully, but these errors were encountered: