Visitar URL original
test_tar test_add_dir_getmember fails if uid/gid is larger than 16777215 · Issue #95675 · python/cpython · GitHub
Skip to content

test_tar test_add_dir_getmember fails if uid/gid is larger than 16777215 #95675

Description

@colesbury

Bug report

The test_add_dir_getmember added in #30283 fails if the current user's uid or gid is larger than 16777215 because of limitations of UStar format.

Note that the other test cases don't have this problem.

This test should either avoid depending on the current user's uid/gid (such as by using an explicit uid/gid) or be skipped if the current uid/gid is 8**8 or larger.

For example,

def filter(tarinfo):
 tarinfo.uid = 100
 tarinfo.gid = 100
 return tarinfo

...
tar.add(name, filter=filter)

Will use 100 as the uid and gid instead of the current user's uid/gid.

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    testsTests in the Lib/test dir
    3.11only security fixes
    3.12only security fixes
    on Aug 4, 2022
  2. corona10 commented on Feb 18, 2023

    @corona10
    Member

    @colesbury
    I will try to introduce this issue into the internal OSS sprint as the good first bug.
    I will delegate the issue to my mentees.

  3. self-assigned this
    on Feb 18, 2023
  4. uyw4687 commented on Feb 20, 2023

    @uyw4687
    Contributor

    I'll take it :)

  5. added 2 commits that reference this issue on Feb 24, 2023
  6. added a commit that references this issue on Feb 25, 2023
  7. added 2 commits that reference this issue on Feb 25, 2023
  8. added 2 commits that reference this issue on Feb 25, 2023
  9. corona10 commented on Feb 25, 2023

    @corona10
    Member

    Thank you @uyw4687!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

3.10 (EOL)end of life3.11only security fixes3.12only security fixestestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions