From 510a36278e74da48389f5a3dc21058bfac324f96 Mon Sep 17 00:00:00 2001 From: Adeel <3840695+am11@users.noreply.github.com> Date: Wed, 2 Nov 2022 16:26:32 +0200 Subject: [PATCH 1/2] Update tar test data version --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- .../TarFile.ExtractToDirectoryAsync.Stream.Tests.cs | 2 +- .../tests/TarReader/TarReader.File.Tests.cs | 8 ++++++++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index da4fbb5adfe08..30daaee6301ba 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -166,9 +166,9 @@ https://github.com/dotnet/runtime-assets b01aa5cb4e2b16f4259f13b92b450fb9b616a826 - + https://github.com/dotnet/runtime-assets - b01aa5cb4e2b16f4259f13b92b450fb9b616a826 + a6e2984f63e3809fcdc607bc88bbf257a6c6b4e4 https://github.com/dotnet/runtime-assets diff --git a/eng/Versions.props b/eng/Versions.props index 0069178e2b349..372be14851e0a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -145,7 +145,7 @@ 7.0.0-beta.22524.1 7.0.0-beta.22524.1 7.0.0-beta.22524.1 - 7.0.0-beta.22524.1 + 7.0.0-beta.22552.1 7.0.0-beta.22524.1 7.0.0-beta.22524.1 7.0.0-beta.22524.1 diff --git a/src/libraries/System.Formats.Tar/tests/TarFile/TarFile.ExtractToDirectoryAsync.Stream.Tests.cs b/src/libraries/System.Formats.Tar/tests/TarFile/TarFile.ExtractToDirectoryAsync.Stream.Tests.cs index 82c37fb0dd0a7..ec32ab1ab8136 100644 --- a/src/libraries/System.Formats.Tar/tests/TarFile/TarFile.ExtractToDirectoryAsync.Stream.Tests.cs +++ b/src/libraries/System.Formats.Tar/tests/TarFile/TarFile.ExtractToDirectoryAsync.Stream.Tests.cs @@ -102,7 +102,7 @@ public async Task ExtractEntry_DockerImageTarWithFileTypeInDirectoriesInMode_Suc { using (TempDirectory root = new TempDirectory()) { - await using MemoryStream archiveStream = GetTarMemoryStream(CompressionMethod.Uncompressed, "golang_tar", "docker-hello-world"); + await using MemoryStream archiveStream = GetTarMemoryStream(CompressionMethod.Uncompressed, "misc", "docker-hello-world"); await TarFile.ExtractToDirectoryAsync(archiveStream, root.Path, overwriteFiles: true); Assert.True(File.Exists(Path.Join(root.Path, "manifest.json"))); diff --git a/src/libraries/System.Formats.Tar/tests/TarReader/TarReader.File.Tests.cs b/src/libraries/System.Formats.Tar/tests/TarReader/TarReader.File.Tests.cs index 17c67423c390b..8705fe47a5ad9 100644 --- a/src/libraries/System.Formats.Tar/tests/TarReader/TarReader.File.Tests.cs +++ b/src/libraries/System.Formats.Tar/tests/TarReader/TarReader.File.Tests.cs @@ -241,6 +241,14 @@ public void Throw_SingleExtendedAttributesEntryWithNoActualEntry() Assert.Throws(() => reader.GetNextEntry()); } + [Fact] + public void ReadDataStreamOfGoLangTarTarGzGnu() + { + using MemoryStream archiveStream = GetTarMemoryStream(CompressionMethod.GZip, "golang_tar", "pax-bad-hdr-large"); + using GZipStream decompressor = new GZipStream(archiveStream, CompressionMode.Decompress); + VerifyDataStreamOfTarInternal(decompressor, copyData: false); + } + [Theory] [InlineData("tar-rs", "spaces")] [InlineData("golang_tar", "v7")] From b2be9a5c75458dbdfb466a2dfc3cccf6e9c4efd1 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Wed, 2 Nov 2022 17:23:35 +0200 Subject: [PATCH 2/2] Fix typo --- .../System.Formats.Tar/tests/TarReader/TarReader.File.Tests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Formats.Tar/tests/TarReader/TarReader.File.Tests.cs b/src/libraries/System.Formats.Tar/tests/TarReader/TarReader.File.Tests.cs index 8705fe47a5ad9..6b5dae94caf6b 100644 --- a/src/libraries/System.Formats.Tar/tests/TarReader/TarReader.File.Tests.cs +++ b/src/libraries/System.Formats.Tar/tests/TarReader/TarReader.File.Tests.cs @@ -242,7 +242,7 @@ public void Throw_SingleExtendedAttributesEntryWithNoActualEntry() } [Fact] - public void ReadDataStreamOfGoLangTarTarGzGnu() + public void ReadDataStreamOfGoLangTarGzGnu() { using MemoryStream archiveStream = GetTarMemoryStream(CompressionMethod.GZip, "golang_tar", "pax-bad-hdr-large"); using GZipStream decompressor = new GZipStream(archiveStream, CompressionMode.Decompress);