Skip to content

Conversation

@pxinwr
Copy link
Contributor

@pxinwrpxinwr 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
ContributorAuthor

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]>
@vstinnervstinner merged commit 9a0dea6 into python:masterDec 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
@pxinwrpxinwr deleted the fix-issue-31904-chown branch May 7, 2021 07:42
@kuhlenoughkuhlenoughmannequin mentioned this pull request Jan 12, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testsTests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@pxinwr@vstinner@the-knights-who-say-ni@bedevere-bot