Skip to content
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

[3.10] gh-107902: gh-108948: Don't test setting suid/sgid/sticky on systems that don't support them (GH-108368) (GH-109697) #125255

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

encukou
Copy link
Member

@encukou encukou commented Oct 10, 2024

This skips tarfile's chmod-related tests on

  • systems where setting suid/sgid is no-op (which are unsupported), and
  • systems where setting the sticky bit is an OSError (like the tier-3 FreeBSD)

This also adds a few directory-related tests, which were originally omitted because they failed on some platforms. Now they will be skipped on those platforms.

In 3.11+ this was done with two commits, GH-108368 & GH-109697:

(cherry-picked from 40e52c9)
(cherry-picked from 26e06ad)

One builds on the other. IMO it makes sense to backport it all, so that these tests are the same as in 3.11+.

encukou and others added 2 commits October 10, 2024 14:18
…on#109697)

On FreeBSD, regular users cannot set the sticky bit. Skip the test if
chmod() fails with EFTYPE error.
@bedevere-app bedevere-app bot added the tests Tests in the Lib/test dir label Oct 10, 2024
@bedevere-app bedevere-app bot mentioned this pull request Oct 10, 2024
2 tasks
@encukou encukou changed the title gh-107902: gh-108948: Don't test setting suid/sgid/sticky on systems that don't support them (GH-108368) (GH-109697) [3.10] gh-107902: gh-108948: Don't test setting suid/sgid/sticky on systems that don't support them (GH-108368) (GH-109697) Oct 10, 2024
@encukou encukou added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Oct 14, 2024
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @encukou for commit 95bfff7 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Oct 14, 2024
@encukou
Copy link
Member Author

encukou commented Oct 15, 2024

This fixes the test_tarfile test on the FreeBSD buildbots; the unrelated test_cmd_line_script failure is still there, to be fixed in #125109.

@encukou encukou marked this pull request as ready for review October 15, 2024 14:33
@encukou encukou requested a review from ethanfurman as a code owner October 15, 2024 14:33
@encukou encukou added the needs backport to 3.9 only security fixes label Oct 15, 2024
@encukou
Copy link
Member Author

encukou commented Oct 15, 2024

Issue for the generated files failure: #125529

@pablogsal pablogsal merged commit 6bbaab8 into python:3.10 Oct 22, 2024
61 of 85 checks passed
@miss-islington-app
Copy link

Thanks @encukou for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request 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]>
@bedevere-app
Copy link

bedevere-app bot commented Oct 22, 2024

GH-125835 is a backport of this pull request to the 3.9 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.9 only security fixes label Oct 22, 2024
@encukou encukou deleted the backport-26e06ad-3.10 branch October 22, 2024 12:48
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.

5 participants