New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unit tests fail if UID is too large - Easily Reproducible #2109
Comments
This is testing the basic "ustar" format, which only supports UIDs with up to 6 octal digits (which means that it cannot store UIDs larger than 256k). If you run the test suite verbosely I'd be happy to have someone work on fixing this, but I don't like the idea of skipping all of these tests if there's a reasonable alternative. (Skipping tests can end up accidentally hiding real problems.)
|
To be precise, my idea of using up to 7 bytes would mean changing this bit of code in
to something like the following, which would try formatting the UID with 7 digits if 6 was not enough:
(It might be clearer to change "format_number" to accept a "relaxed size" that will be used even in "strict" mode. That would make it easier to extend this idea to the mode, GID, rdevmajor, and rdevminor fields as well.) Again, before doing this, I'd like to see if other tar implementations have tried this as well. |
I have not checked all error messages, but if I use a user with a small UID and small GID, all tests pass.
Yes, the goal is to have green tests when the UID is too large, but still have as much test coverage as possible. I will check what other tar implementations do and work on a solution once I find time. (I know, famous last words.) |
Long story short:
If you run these commands
Some tests fail:
It would be better if those tests would not fail, but would be skipped.
If you want me to, I am happy to work on a PR that fixes the issue.
The text was updated successfully, but these errors were encountered: