summaryrefslogtreecommitdiff
path: root/src/pkg/path
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-06-02 12:26:43 -0400
committerRuss Cox <rsc@golang.org>2011-06-02 12:26:43 -0400
commit8b73f90cbd5b4d5a36ba11a5ea583287aa0cbba7 (patch)
treefc5dd9d4e170e6ab710813eb93169ff728da4325 /src/pkg/path
parent4cefc566fdbccd90de70d0faab5dea276954bfd8 (diff)
downloadgo-8b73f90cbd5b4d5a36ba11a5ea583287aa0cbba7.tar.gz
path/filepath: skip permission test in all.bash
R=golang-dev, gri CC=golang-dev http://codereview.appspot.com/4517132
Diffstat (limited to 'src/pkg/path')
-rw-r--r--src/pkg/path/filepath/path_test.go5
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 624c9d8ff..6a5dd5b00 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)