[3.9] gh-107902: gh-108948: Don't test setting suid/sgid/sticky on systems that don't support them (GH-108368) (GH-109697) by encukou · Pull Request #125576 · python/cpython · GitHub
Skip to content

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

Merged
ambv merged 2 commits into
python:3.9from
encukou:backport-26e06ad-3.9
Oct 28, 2024
Merged

[3.9] gh-107902: gh-108948: Don't test setting suid/sgid/sticky on systems that don't support them (GH-108368) (GH-109697)#125576
ambv merged 2 commits into
python:3.9from
encukou:backport-26e06ad-3.9

Conversation

@encukou

@encukou encukou commented Oct 16, 2024

Copy link
Copy Markdown
Member

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 15, 2024 18:32
…on#109697)

On FreeBSD, regular users cannot set the sticky bit. Skip the test if
chmod() fails with EFTYPE error.
@encukou

encukou commented Oct 16, 2024

Copy link
Copy Markdown
Member Author

@bedevere-bot

Copy link
Copy Markdown

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