bpo-31904: skip some tests of changing owner in _test_all_chown_common() on VxWorks by pxinwr · Pull Request #23716 · python/cpython
Conversation
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.
| # 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: |
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: ...
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modified accordingly.
pxinwr
deleted the
fix-issue-31904-chown
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters