summaryrefslogtreecommitdiff
path: root/libgo/go/compress/gzip/gunzip_test.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-01-02 15:05:27 -0800
committerIan Lance Taylor <iant@golang.org>2020-01-21 23:53:22 -0800
commit5a8ea165926cb0737ab03bc48c18dc5198ab5305 (patch)
tree962dc3357c57f019f85658f99e2e753e30201c27 /libgo/go/compress/gzip/gunzip_test.go
parent6ac6529e155c9baa0aaaed7aca06bd38ebda5b43 (diff)
downloadgcc-5a8ea165926cb0737ab03bc48c18dc5198ab5305.tar.gz
libgo: update to Go1.14beta1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214297
Diffstat (limited to 'libgo/go/compress/gzip/gunzip_test.go')
-rw-r--r--libgo/go/compress/gzip/gunzip_test.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/libgo/go/compress/gzip/gunzip_test.go b/libgo/go/compress/gzip/gunzip_test.go
index fdea0c5d5ff..1b014041692 100644
--- a/libgo/go/compress/gzip/gunzip_test.go
+++ b/libgo/go/compress/gzip/gunzip_test.go
@@ -7,6 +7,7 @@ package gzip
import (
"bytes"
"compress/flate"
+ "encoding/base64"
"io"
"io/ioutil"
"os"
@@ -413,11 +414,16 @@ func TestDecompressor(t *testing.T) {
}
func TestIssue6550(t *testing.T) {
- f, err := os.Open("testdata/issue6550.gz")
+ // Appleā€™s notarization service will recursively attempt to decompress
+ // files in order to find binaries to notarize. Since the service is
+ // unable to decompress this file, it may reject the entire toolchain. Use a
+ // base64-encoded version to avoid this.
+ // See golang.org/issue/34986
+ f, err := os.Open("testdata/issue6550.gz.base64")
if err != nil {
t.Fatal(err)
}
- gzip, err := NewReader(f)
+ gzip, err := NewReader(base64.NewDecoder(base64.StdEncoding, f))
if err != nil {
t.Fatalf("NewReader(testdata/issue6550.gz): %v", err)
}