Skip to content

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

Closed
@colesbury

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

Metadata

Metadata

Labels

3.10only security fixes3.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