diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-07-27 22:27:54 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-08-01 11:21:40 -0700 |
commit | f75af8c1464e948b5e166cf5ab09ebf0d82fc253 (patch) | |
tree | 3ba3299859b504bdeb477727471216bd094a0191 /libgo/go/path | |
parent | 75a23e59031fe673fc3b2e60fd1fe5f4c70ecb85 (diff) | |
download | gcc-f75af8c1464e948b5e166cf5ab09ebf0d82fc253.zip gcc-f75af8c1464e948b5e166cf5ab09ebf0d82fc253.tar.gz gcc-f75af8c1464e948b5e166cf5ab09ebf0d82fc253.tar.bz2 |
libgo: update to go1.15rc1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/245157
Diffstat (limited to 'libgo/go/path')
-rw-r--r-- | libgo/go/path/filepath/match.go | 6 | ||||
-rw-r--r-- | libgo/go/path/filepath/path_test.go | 16 |
2 files changed, 8 insertions, 14 deletions
diff --git a/libgo/go/path/filepath/match.go b/libgo/go/path/filepath/match.go index 46badb5..20a3348 100644 --- a/libgo/go/path/filepath/match.go +++ b/libgo/go/path/filepath/match.go @@ -310,14 +310,14 @@ func glob(dir, pattern string, matches []string) (m []string, e error) { m = matches fi, err := os.Stat(dir) if err != nil { - return + return // ignore I/O error } if !fi.IsDir() { - return + return // ignore I/O error } d, err := os.Open(dir) if err != nil { - return + return // ignore I/O error } defer d.Close() diff --git a/libgo/go/path/filepath/path_test.go b/libgo/go/path/filepath/path_test.go index d3f43a6..537d848 100644 --- a/libgo/go/path/filepath/path_test.go +++ b/libgo/go/path/filepath/path_test.go @@ -434,12 +434,9 @@ func chtmpdir(t *testing.T) (restore func()) { } func TestWalk(t *testing.T) { - if runtime.GOOS == "darwin" { - switch runtime.GOARCH { - case "arm", "arm64": - restore := chtmpdir(t) - defer restore() - } + if runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" { + restore := chtmpdir(t) + defer restore() } tmpDir, err := ioutil.TempDir("", "TestWalk") @@ -1285,11 +1282,8 @@ func TestDriveLetterInEvalSymlinks(t *testing.T) { func TestBug3486(t *testing.T) { // https://golang.org/issue/3486 t.Skip("skipping test because gccgo sources are arranged differently.") - if runtime.GOOS == "darwin" { - switch runtime.GOARCH { - case "arm", "arm64": - t.Skipf("skipping on %s/%s", runtime.GOOS, runtime.GOARCH) - } + if runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" { + t.Skipf("skipping on %s/%s", runtime.GOOS, runtime.GOARCH) } root, err := filepath.EvalSymlinks(runtime.GOROOT() + "/test") if err != nil { |