Skip to content

bpo-31904: skip some tests of changing owner in _test_all_chown_common() on VxWorks #23716

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

Merged
merged 3 commits into from
Dec 15, 2020

Conversation

pxinwr
Copy link
Contributor

@pxinwr pxinwr commented Dec 9, 2020

On VxWorks root user id is 1 and 0 means no login user. It also allows non-root user to chown() to root. So related test on VxWorks is invalid. Skip them.

https://bugs.python.org/issue31904

# On VxWorks root user id is 1 and 0 means no login user. It also
# allows non-root user to chown() to root.
if sys.platform != "vxworks":
if uid == 0:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would the test work if you test for "uid == 1" on VxWorks?

Something like:

root_uid = (0 if sys.platform != "vxworks" else 1)
if uid == root_uid: ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modified accordingly.

Co-authored-by: Victor Stinner <vstinner@python.org>
@vstinner vstinner merged commit 9a0dea6 into python:master Dec 15, 2020
@vstinner
Copy link
Member

The updated PR is less intrusive, thanks. I merged it.

adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
@pxinwr pxinwr deleted the fix-issue-31904-chown branch May 7, 2021 07:42
@kuhlenough kuhlenough mannequin mentioned this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants