diff options
author | Russ Cox <rsc@golang.org> | 2011-06-02 12:26:43 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2011-06-02 12:26:43 -0400 |
commit | ef2d5f68d052412c50d9bf0da417da4c61fd8d7e (patch) | |
tree | c92daef6eea0a12e915d4388e596fcb11f2923a3 | |
parent | 2653b4fbcc5be866dd478f79bf6854db8ede7ffd (diff) | |
download | go-ef2d5f68d052412c50d9bf0da417da4c61fd8d7e.tar.gz go-ef2d5f68d052412c50d9bf0da417da4c61fd8d7e.zip |
path/filepath: skip permission test in all.bash
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4517132
-rw-r--r-- | src/pkg/path/filepath/path_test.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pkg/path/filepath/path_test.go b/src/pkg/path/filepath/path_test.go index 624c9d8ffd..6a5dd5b00d 100644 --- a/src/pkg/path/filepath/path_test.go +++ b/src/pkg/path/filepath/path_test.go @@ -315,7 +315,10 @@ func TestWalk(t *testing.T) { } checkMarks(t) - if os.Getuid() > 0 { + // Test permission errors. Only possible if we're not root + // and only on some file systems (AFS, FAT). To avoid errors during + // all.bash on those file systems, skip during gotest -short. + if os.Getuid() > 0 && !testing.Short() { // introduce 2 errors: chmod top-level directories to 0 os.Chmod(filepath.Join(tree.name, tree.entries[1].name), 0) os.Chmod(filepath.Join(tree.name, tree.entries[3].name), 0) |