Comments (33)
Same issue, Slackware 13. I commented out each test function body that failed and it finished the compilation. Total 3 test files with problems: src/pkg/os/os_test.go src/pkg/os/path_test.go src/pkg/net/net_test.go (tried to "dial out")
from go.
In src/pkg/os/path_test.go at line #122: if err = RemoveAll(path); err == nil { Is this a bug? The code at line #122 is different from any other codes calling RemoveAll() in path_test.go, at line #79, #100, #144, so I think the code should be if err = RemoveAll(path); err != nil { I modified the code and ran all.bash again, however I got another error message as below: gopack grc _test/os.a _gotest_.8 make[2]: Leaving directory `/root/go/src/pkg/os' --- FAIL: os_test.TestRemoveAll RemoveAll "_obj/_TestRemoveAll_" returned os.Error not *PathError FAIL
from go.
> Is this a bug? Sorry, my guess was wrong. This is NOT a bug. At line #122, it is expected that RemoveAll(path) will fail, because Chmod(dpath, 0) is called previously and nobody, except root, can remove subdirectory `dpath`. The reason why all.bash failed is that I ran all.bash as root. When I ran all.bash as a normal user, installation successfully completed. Thank you.
from go.
Same error, Centos 5.3 x64, running under root or sudo: 6g -o _gotest_.6 dir_linux.go env.go error.go exec.go file.go getwd.go path.go proc.go stat_linux.go sys_linux.go time.go types.go rm -f _test/os.a gopack grc _test/os.a _gotest_.6 make[2]: Leaving directory `/root/develop/go/src/pkg/os' --- FAIL: os_test.TestRemoveAll RemoveAll "_obj/_TestRemoveAll_" succeeded with chmod 0 subdirectory?(extra *os.PathError=lstat _obj/_TestRemoveAll_: no such file or directory) FAIL make[1]: *** [test] Error 1 make[1]: Leaving directory `/root/develop/go/src/pkg/os' make: *** [os.test] Error 2
from go.
Same error, Mac OS X Leopard 10.5.8: 8g -o _gotest_.8 dir_darwin.go env.go error.go exec.go file.go getwd.go path.go proc.go stat_darwin.go sys_darwin.go time.go types.go rm -f _test/os.a gopack grc _test/os.a _gotest_.8 --- FAIL: os_test.TestRemoveAll RemoveAll "_obj/_TestRemoveAll_" succeeded with chmod 0 subdirectory?(extra *os.PathError=lstat _obj/_TestRemoveAll_: no such file or directory) FAIL make[1]: *** [test] Error 1 make: *** [os.test] Error 2
from go.
Owner changed to [email protected].
Status changed to Started.
from go.
This issue was closed by revision 1971e1b.
Status changed to Fixed.
Merged into issue #-.
from go.
Comment 9 by larsgoran.forsberg:
Same, Mac OS X Lepoard 10.5.8 cd os && make test gotest rm -f _test/os.a _gotest_.8 8g -o _gotest_.8 dir_darwin.go env.go error.go exec.go file.go getwd.go path.go proc.go stat_darwin.go sys_darwin.go time.go types.go rm -f _test/os.a gopack grc _test/os.a _gotest_.8 --- FAIL: os_test.TestRemoveAll RemoveAll "_obj/_TestRemoveAll_" succeeded with chmod 0 subdirectory?(extra *os.PathError=lstat _obj/_TestRemoveAll_: no such file or directory) FAIL make[1]: *** [test] Error 1 make: *** [os.test] Error 2
from go.
You can run hg pull hg update and run again and it should not fail anymore.
from go.
Issue #46 has been merged into this issue.
from go.
Comment 12 by larsgoran.forsberg:
Still getting an error with new patch (mac os x 10.5) cd os && make test gotest rm -f _test/os.a _gotest_.8 8g -o _gotest_.8 dir_darwin.go env.go error.go exec.go file.go getwd.go path.go proc.go stat_darwin.go sys_darwin.go time.go types.go rm -f _test/os.a gopack grc _test/os.a _gotest_.8 --- FAIL: os_test.TestRemoveAll Chmod "_obj/_TestRemoveAll_/dir" 0777: chmod _obj/_TestRemoveAll_/dir: no such file or directory FAIL make[1]: *** [test] Error 1 make: *** [os.test] Error 2
from go.
Status changed to Started.
from go.
Ya I get the same pretty much on my snow leopard... cd os && make test gotest rm -f _test/os.a _gotest_.6 6g -o _gotest_.6 dir_darwin.go env.go error.go exec.go file.go getwd.go path.go proc.go stat_darwin.go sys_darwin.go time.go types.go rm -f _test/os.a gopack grc _test/os.a _gotest_.6 --- FAIL: os_test.TestRemoveAll Chmod "_obj/_TestRemoveAll_/dir" 0777: chmod _obj/_TestRemoveAll_/dir: no such file or directory FAIL make[1]: *** [test] Error 1 make: *** [os.test] Error 2
from go.
This issue was closed by revision 2cda46d.
Status changed to Fixed.
Merged into issue #-.
from go.
Issue #78 has been merged into this issue.
from go.
Comment 17 by larsgoran.forsberg:
Still can't compile. cd path && make test gotest rm -f _test/path.a _gotest_.8 8g -o _gotest_.8 path.go path_test.go rm -f _test/path.a gopack grc _test/path.a _gotest_.8 --- FAIL: path.TestWalk 1. error expected, none found node testdata/d/x mark = 2; expected 1 node testdata/d/y mark = 2; expected 1 node testdata/d/z mark = 2; expected 1 node testdata/d/z/u mark = 2; expected 1 node testdata/d/z/v mark = 2; expected 1 FAIL make[1]: *** [test] Error 1 make: *** [path.test] Error 2
from go.
Why do you all run so many things as root? ;-) Okay, reopening this bug. Will fix tomorrow.
Status changed to Started.
from go.
Issue #84 has been merged into this issue.
from go.
Comment 20 by larsgoran.forsberg:
Well, Im guessing the root-love comes from my time as BSD admin at a hosting company, where you actually compiled stuff as root or not at all.. Call it bad manors but hey.. In another sense, I tried to compile this as a normal user first and it gave me an instant failure and my brain just told me "ahh, this should be done as root".. I will give the normal user another go in a few hours but i'm guessing you will want to fix this either way.
from go.
Issue #111 has been merged into this issue.
from go.
Issue #120 has been merged into this issue.
from go.
Issue #134 has been merged into this issue.
from go.
This issue was closed by revision e7b8f5f.
Status changed to Fixed.
Merged into issue #-.
from go.
Issue #193 has been merged into this issue.
from go.
Issue #208 has been merged into this issue.
from go.
Issue #235 has been merged into this issue.
from go.
"Don't use root" cannot be the fix for this bug. Sometimes it's unavoidable.
from go.
Don't use root was the workaround. This has been fixed properly in the tree and the current release runs fine as root. Thanks for your feedback.
from go.
Comment 30 by nathan.beckmann:
This is failing on Debian Lenny: make[2]: Entering directory `/afs/csail.mit.edu/u/b/beckmann/tools/go/src/pkg/os' 6g -o _gotest_.6 dir_linux.go error.go exec.go file.go getwd.go path.go proc.go stat_linux.go time.go types.go env_unix.go file_unix.go sys_linux.go rm -f _test/os.a gopack grc _test/os.a _gotest_.6 make[2]: Leaving directory `/afs/csail.mit.edu/u/b/beckmann/tools/go/src/pkg/os' --- FAIL: os_test.TestRemoveAll RemoveAll "_obj/_TestRemoveAll_" succeeded with chmod 0 subdirectory?(extra *os.PathError=lstat _obj/_TestRemoveAll_: no such file or directory) FAIL make[1]: *** [test] Error 1 make[1]: Leaving directory `/afs/csail.mit.edu/u/b/beckmann/tools/go/src/pkg/os' make: *** [os.test] Error 2
from go.
Comment 31 by nathan.beckmann:
Apparently an AFS issue, must be built as root. This would be good to have in the documentation somewhere (maybe I missed it). Works now.
from go.
== Failure on Fedora 14, non-root user == === Version: === changeset: 6764:03404c0155f6 tag: tip user: Robert Griesemer date: Fri Nov 12 16:39:33 2010 -0800 summary: token/position: implemented Pos === Logs: === make[2]: Entering directory `/media/f/opt/go/src/pkg/os' rm -f _test/os.a _gotest_.8 make[2]: Leaving directory `/media/f/opt/go/src/pkg/os' make[2]: Entering directory `/media/f/opt/go/src/pkg/os' 8g -o _gotest_.8 dir_linux.go error.go env.go exec.go file.go getwd.go path.go proc.go stat_linux.go time.go types.go env_unix.go file_unix.go sys_linux.go rm -f _test/os.a gopack grc _test/os.a _gotest_.8 make[2]: Leaving directory `/media/f/opt/go/src/pkg/os' --- FAIL: os_test.TestRemoveAll RemoveAll "_obj/_TestRemoveAll_" succeeded with chmod 0 subdirectory%!(EXTRA *os.PathError=lstat _obj/_TestRemoveAll_: no such file or directory) FAIL make[1]: *** [test] Error 1 make[1]: Leaving directory `/media/f/opt/go/src/pkg/os' make: *** [os.test] Error 2
from go.
/media/f is probably a FAT file system which might as well be the same as running as root. I will disable the test.
Status changed to Accepted.
from go.
changeset: 6907:b66dc1a07967 user: Russ Cox date: Thu Dec 09 14:49:13 2010 -0500 summary: os: fix test of RemoveAll
Status changed to Fixed.
from go.
Related Issues (20)
- proposal: x/sync/errgroup: add `(Try?)Go` variants that return channel closed after `f` terminates HOT 1
- x/tools/gopls: release version v0.16.2 HOT 1
- x/tools/gopls: release version v0.16.2 HOT 1
- proposal: log/slog: add ParseLevel HOT 1
- x/tools/gopls: Highlight: nil deref panic on CompositeLiteral with no type HOT 3
- encoding/json: document behaviour of json.Marshal() with non-pointer elements with MarshalJSON() defined for pointers HOT 27
- Lines of code should not be there on error page HOT 3
- x/tools/gopls: get signature when cursor is over the function name HOT 5
- context: WithValue docs shouldn't say "return a copy" HOT 4
- proposal: Ability to redirect type defintions (for templating languages) HOT 1
- strings.Split of an empty string returns 1 HOT 3
- cmd/go: support `git/subcommand` invocations for git9 on plan9 HOT 8
- x/tools/gopls: invalid memory address or nil pointer dereference on highlight HOT 3
- cmd/go: GOTELEMETRY is not documented by go help environment HOT 9
- proposal: reflect: add TypeByName to create a type giving its fully-qualified name HOT 4
- cmd/go: "go env -changed" never include GOTELEMETRY HOT 5
- proposal: iter: Allow nil iterators HOT 9
- x/pkgsite: docs not shown for functions with language version build tags HOT 11
- runtime: consider using batched shuffle in selectgo HOT 1
- runtime: go can allocate 30x the memory limit without panic'ing HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go.