Skip to content

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 <[email protected]>
@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