Commit ef2d5f68 authored by Russ Cox's avatar Russ Cox

path/filepath: skip permission test in all.bash

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4517132
parent 2653b4fb
...@@ -315,7 +315,10 @@ func TestWalk(t *testing.T) { ...@@ -315,7 +315,10 @@ func TestWalk(t *testing.T) {
} }
checkMarks(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 // 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[1].name), 0)
os.Chmod(filepath.Join(tree.name, tree.entries[3].name), 0) os.Chmod(filepath.Join(tree.name, tree.entries[3].name), 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment