Commit 2cda46dc authored by Russ Cox's avatar Russ Cox

fix TestRemoveAll again (tested as root this time).

Fixes #22.

R=r
https://golang.org/cl/154069
parent 2643f742
...@@ -134,14 +134,13 @@ func TestRemoveAll(t *testing.T) { ...@@ -134,14 +134,13 @@ func TestRemoveAll(t *testing.T) {
if perr.Path != dpath { if perr.Path != dpath {
t.Fatalf("RemoveAll %q failed at %q not %q", path, perr.Path, dpath) t.Fatalf("RemoveAll %q failed at %q not %q", path, perr.Path, dpath)
} }
} if err = Chmod(dpath, 0777); err != nil {
t.Fatalf("Chmod %q 0777: %s", dpath, err)
if err = Chmod(dpath, 0777); err != nil { }
t.Fatalf("Chmod %q 0777: %s", dpath, err) for _, s := range []string{fpath, path + "/zzz"} {
} if _, err := Lstat(s); err == nil {
for _, s := range []string{fpath, path + "/zzz"} { t.Fatalf("Lstat %q succeeded after partial RemoveAll", s)
if _, err := Lstat(s); err == nil { }
t.Fatalf("Lstat %q succeeded after partial RemoveAll", s)
} }
} }
if err = RemoveAll(path); err != nil { if err = RemoveAll(path); err != nil {
......
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