Fix Tar test failure in Apple OSs due to paths too long and using the wrong Tar entry format #71115
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #68360 (failed again, in runtime-extra-platforms)
Failure log example: https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-70869-merge-94a11d3c9e2e440fac/System.Formats.Tar.Tests/1/console.0b65156e.log?helixlogtype=result
The new issue was that the test was creating a
UstarTarEntry
. The V7 and Ustar formats do not have a way to handle long paths (the limit is 100 bytes). In Apple OSs, theTempDirectory
gets created in a folder with a long name that surpasses the 100 bytes.I fixed the tests by only verifying them in Gnu and Pax, which are formats that do support long paths.
I also made sure to test in the rest of the OSs with long paths, so that not only runtime-extra-platforms runs this scenario.