Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path.TestWalk fails running as root #22

Closed
gopherbot opened this issue Nov 11, 2009 · 33 comments
Closed

path.TestWalk fails running as root #22

gopherbot opened this issue Nov 11, 2009 · 33 comments

Comments

@gopherbot
Copy link
Contributor

by DickFardos:

What steps will reproduce the problem?
1. set environment vars
2. pull down go from repos
3.  run all.bash

What is the expected output? What do you see instead?
make[2]: Entering directory `/root/go/src/pkg/os'
8g -o _gotest_.8 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_.8 
make[2]: Leaving directory `/root/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/go/src/pkg/os'
make: *** [os.test] Error 2

What is your $GOOS?  $GOARCH?
root@wboring:~/go/src$ set |grep GO
GOARCH=386
GOBIN=/usr/local/go/bin
GOOS=linux
GOROOT=/root/go

Which revision are you sync'ed to?  (hg log -l 1)
root@wboring:~/go/src$ hg log -l 1
changeset:   3975:b51fd2d6c160
tag:         tip
user:        Kevin Ballard <kevin@sb.org>
date:        Tue Nov 10 20:05:24 2009 -0800
summary:     Implement new emacs command M-x gofmt


Please provide any additional information below.
linux Ubuntu 9.10
@gopherbot
Copy link
Contributor Author

Comment 1 by zefonseca:

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")

@gopherbot
Copy link
Contributor Author

Comment 2 by bow.fujita:

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

@gopherbot
Copy link
Contributor Author

Comment 3 by bow.fujita:

> 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.

@gopherbot
Copy link
Contributor Author

Comment 4 by denis.kuzmenok:

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

@gopherbot
Copy link
Contributor Author

Comment 5 by renatoalbano:

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

@rsc
Copy link
Contributor

rsc commented Nov 11, 2009

Comment 7:

Owner changed to r...@golang.org.

Status changed to Started.

@rsc
Copy link
Contributor

rsc commented Nov 11, 2009

Comment 8:

This issue was closed by revision 1971e1b.

Status changed to Fixed.

Merged into issue #-.

@gopherbot
Copy link
Contributor Author

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

@rsc
Copy link
Contributor

rsc commented Nov 11, 2009

Comment 10:

You can run
hg pull
hg update
and run again and it should not fail anymore.

@rsc
Copy link
Contributor

rsc commented Nov 11, 2009

Comment 11:

Issue #46 has been merged into this issue.

@gopherbot
Copy link
Contributor Author

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

@rsc
Copy link
Contributor

rsc commented Nov 11, 2009

Comment 13:

Status changed to Started.

@gopherbot
Copy link
Contributor Author

Comment 14 by malatmals:

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

@rsc
Copy link
Contributor

rsc commented Nov 11, 2009

Comment 15:

This issue was closed by revision 2cda46d.

Status changed to Fixed.

Merged into issue #-.

@rsc
Copy link
Contributor

rsc commented Nov 12, 2009

Comment 16:

Issue #78 has been merged into this issue.

@gopherbot
Copy link
Contributor Author

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

@rsc
Copy link
Contributor

rsc commented Nov 12, 2009

Comment 18:

Why do you all run so many things as root?  ;-)
Okay, reopening this bug.  Will fix tomorrow.

Status changed to Started.

@rsc
Copy link
Contributor

rsc commented Nov 12, 2009

Comment 19:

Issue #84 has been merged into this issue.

@gopherbot
Copy link
Contributor Author

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.

@rsc
Copy link
Contributor

rsc commented Nov 12, 2009

Comment 21:

Issue #111 has been merged into this issue.

@rsc
Copy link
Contributor

rsc commented Nov 12, 2009

Comment 22:

Issue #120 has been merged into this issue.

@rsc
Copy link
Contributor

rsc commented Nov 13, 2009

Comment 23:

Issue #134 has been merged into this issue.

@rsc
Copy link
Contributor

rsc commented Nov 13, 2009

Comment 24:

This issue was closed by revision e7b8f5f.

Status changed to Fixed.

Merged into issue #-.

@rsc
Copy link
Contributor

rsc commented Nov 15, 2009

Comment 25:

Issue #193 has been merged into this issue.

@agl
Copy link
Contributor

agl commented Nov 15, 2009

Comment 26:

Issue #208 has been merged into this issue.

@agl
Copy link
Contributor

agl commented Nov 16, 2009

Comment 27:

Issue #235 has been merged into this issue.

@gopherbot
Copy link
Contributor Author

Comment 28 by robin.duckett:

"Don't use root" cannot be the fix for this bug. Sometimes it's unavoidable.

@rsc
Copy link
Contributor

rsc commented Nov 24, 2009

Comment 29:

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.

@gopherbot
Copy link
Contributor Author

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

@gopherbot
Copy link
Contributor Author

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.

@gopherbot
Copy link
Contributor Author

Comment 32 by 518lee:

== 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

@rsc
Copy link
Contributor

rsc commented Dec 9, 2010

Comment 33:

/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.

@rsc
Copy link
Contributor

rsc commented Dec 13, 2010

Comment 34:

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.

minux pushed a commit to minux/goios that referenced this issue Feb 27, 2015
Updates golang#22

Change-Id: I643ba889a2b6da03bf88b2131cf8118005302de5
minux pushed a commit to minux/goios that referenced this issue Feb 27, 2015
Technically this shouldn't be needed, for $8200(R2) we seem to get
a C_ADDR from aclass by mistake, but this change is correct and
gets us further. We'll deal with aclass later.

Fixes golang#22

Change-Id: Ief32b80100d7c1a02f8b57a1f4016463cfe52281
@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc removed their assignment Jun 22, 2022
gopherbot pushed a commit to golang/oscar that referenced this issue Sep 23, 2024
Add the /api/search route to gaby.

It is like /search, but for programs instead of people.

Fixes golang/go#22.

For golang/go#22.

Change-Id: I17518611d803e35401a08acbb2b215e49d273f9d
Reviewed-on: https://go-review.googlesource.com/c/oscar/+/614677
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants