GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tarfile doesn't set file modes correctly on FreeBSD: test_tarfile.test_modes() fails on FreeBSD · Issue #108948 · python/cpython

tarfile doesn't set file modes correctly on FreeBSD: test_tarfile.test_modes() fails on FreeBSD #108948

New issue
Copy link
New issue
Copy link
Closed
Closed
tarfile doesn't set file modes correctly on FreeBSD: test_tarfile.test_modes() fails on FreeBSD#108948
Copy link
Labels
OS-freebsdtestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@sorcio
sorcio
opened on Sep 5, 2023
Issue body actions

Bug report

Bug description:

The best example for this is given in the regression test suite. TestExtractionFilters.test_modes in test_tarfiles fails with OSError: [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

  • gh-108948: tarfile should handle sticky bit in FreeBSD #108950
  • gh-108948: Skip test_tarfile.test_modes() on EFTYPE error #109697
  • [3.12] gh-108948: Skip test_tarfile.test_modes() on EFTYPE error (#109697) #109698
  • [3.11] gh-108948: Skip test_tarfile.test_modes() on EFTYPE error (#109697) #109699

Activity

  1. sorcio
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Sep 5, 2023
  2. vstinner
    added
    OS-freebsd
    testsTests in the Lib/test dirTests in the Lib/test dir
    on Sep 5, 2023
  3. serhiy-storchaka
    added this to Tarfile issues 🗄️on Sep 10, 2023
  4. 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[/+] on Sep 14, 2023
  5. sorcio commented on Sep 18, 2023

    @sorcio
    sorcio
    on Sep 18, 2023
    ContributorAuthor
    More actions

    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.

  6. vstinner
    added 6 commits that reference this issue on Sep 21, 2023

    pythongh-108948: Skip test_tarfile.test_modes() on EFTYPE error

    8a7bb4a

    pythongh-108948: Skip test_tarfile.test_modes() on EFTYPE error

    24ca4cb

    pythongh-108948: Skip test_tarfile.test_modes() on EFTYPE error

    7c568a4

    gh-108948: Skip test_tarfile.test_modes() on EFTYPE error (#109697)

    26e06ad

    pythongh-108948: Skip test_tarfile.test_modes() on EFTYPE error (pyth…

    71a615d

    [3.11] gh-108948: Skip test_tarfile.test_modes() on EFTYPE error (#10…

    3a6d8e6
  7. vstinner commented on Sep 22, 2023

    @vstinner
    vstinner
    on Sep 22, 2023
    Member
    More actions

    Fixed by skipping the test if chmod() cannot set the sticky bit.

    See #108950 (comment) for the longer rationale.

  8. vstinner
    closed this as completedon Sep 22, 2023
  9. github-project-automation
    moved this to Done in Tarfile issues 🗄️on Sep 22, 2023
  10. csm10495
    added a commit that references this issue on Sep 28, 2023

    pythongh-108948: Skip test_tarfile.test_modes() on EFTYPE error (pyth…

    a6fc8f3
  11. Yhg1s
    added a commit that references this issue on Oct 2, 2023

    [3.12] gh-108948: Skip test_tarfile.test_modes() on EFTYPE error (#10…

    84ef145
  12. Glyphack
    added a commit that references this issue on Sep 2, 2024

    pythongh-108948: Skip test_tarfile.test_modes() on EFTYPE error (pyth…

    ec87325
  13. encukou
    added
    needs backport to 3.9
    needs backport to 3.10
    on Oct 10, 2024
  14. encukou
    added 2 commits that reference this issue on Oct 10, 2024

    pythongh-108948: Skip test_tarfile.test_modes() on EFTYPE error (pyth…

    95bfff7

    pythongh-108948: Skip test_tarfile.test_modes() on EFTYPE error (pyth…

    7ab6520
  15. pablogsal
    added a commit that references this issue on Oct 22, 2024

    [3.10] gh-107902: gh-108948: Don't test setting suid/sgid/sticky on s…

    6bbaab8
  16. miss-islington
    added a commit that references this issue on Oct 22, 2024

    [3.10] pythongh-107902: pythongh-108948: Don't test setting suid/sgid…

    3c00a44
  17. ambv
    added a commit that references this issue on Oct 28, 2024

    [3.9] gh-107902: gh-108948: Don't test setting suid/sgid/sticky on sy…

    eb16397
  18. picnixz
    removed
    needs backport to 3.9
    needs backport to 3.10
    on Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-freebsdtestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    • Tarfile issues 🗄️
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.