]> Cypherpunks repositories - gostls13.git/commitdiff
path/filepath: skip permission test in all.bash
authorRuss Cox <rsc@golang.org>
Thu, 2 Jun 2011 16:26:43 +0000 (12:26 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 2 Jun 2011 16:26:43 +0000 (12:26 -0400)
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4517132

src/pkg/path/filepath/path_test.go

index 624c9d8ffdd895c296edc7c0ec0c93b398af609d..6a5dd5b00d592953d46bfc425080c23978c513d2 100644 (file)
@@ -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)