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

x/net/webdav: TestDir fails on Plan 9 #11453

Open
mikioh opened this issue Jun 29, 2015 · 11 comments

Comments

@mikioh
Copy link
Contributor

commented Jun 29, 2015

See http://build.golang.org/log/86c5f54b2e864b4a89f8756c4c069739fb314cc9

--- FAIL: TestDir (0.00s)
    file_test.go:501: test case #7 "mk-dir /a want errExist": got "ok" (<nil>), want "errExist"
FAIL
FAIL    golang.org/x/net/webdav 1.019s

@mikioh mikioh added this to the Unreleased milestone Jun 29, 2015

@rsto

This comment has been minimized.

Copy link
Contributor

commented Jun 29, 2015

I am one of the net/webdav developers. I can look into this but I do not have access to a Plan9 system. Is there some build machine available to run test code?

@bradfitz

This comment has been minimized.

Copy link
Member

commented Jun 29, 2015

I can get you trybot access. Email me your Gerrit email address.

@rsto

This comment has been minimized.

Copy link
Contributor

commented Jun 29, 2015

@bradfitz Sent you a private mail @golang

@rsto

This comment has been minimized.

Copy link
Contributor

commented Jun 30, 2015

@bradfitz @mikioh Most probably I am doing something wrong, but I can't get the trybot to run my test CL, despite the Run-TryBot+1 label. The CL is here https://go-review.googlesource.com/#/c/11782 and I set the Run-TryBot label almost two hours ago.

Maybe it doesn't work because of the DO NOT REVIEW comment? Sorry to bother you, I just couldn't find much info on how to use this except for looking at other CLs.

@rsto

This comment has been minimized.

Copy link
Contributor

commented Jul 1, 2015

Until the trybots start working with the x/net subrepo, I'll have to postpone debugging of this issue.

If it is critical to get this working again ASAP, I suggest to hand this over to someone with a Plan9 system; I'll be happy to assist then. Alternatively, if someone provides me with a ready-to-use Plan9 ISO that works with Parallels or SSH access to a Plan9 machine I can debug as well. Thanks.

@0intro

This comment has been minimized.

Copy link
Member

commented Jul 2, 2015

@rsto Don't worry, I'll investigate this issue on my side.

@rsto

This comment has been minimized.

Copy link
Contributor

commented Jul 2, 2015

@0intro thanks.

FYI, on a high level this is what happens in the currently broken test case:

- create a directory with ioutil.Tempdir, then create an arbitrary, 
  regular file in it, called "a".
- Then try to mkdir a directory named "a" in the same temporary 
  directory and assert that the returned error is os.IsErrExist. 

The test currently fails, since somewhere along the call chain there is a nil error returned instead. Of course there could be anything to blame, including the test code (which works on other systems, though).

@0intro

This comment has been minimized.

Copy link
Member

commented Jul 2, 2015

This issue is not specific to the x/net/webdav package.
It seems to be a bug in the os or syscall package.

Here is an example to reproduce it using the os package:

http://play.golang.org/p/m3hhhvBxA7

@rsto

This comment has been minimized.

Copy link
Contributor

commented Jul 2, 2015

So I guess its better to open a new issue for that? One additional data point: this bug could have sneaked in recently, since this test case hasn't been touched for at least the last three months or so. I don't know how often the buildbots run, though.

@0intro

This comment has been minimized.

Copy link
Member

commented Jul 2, 2015

In fact, on Plan 9, the create syscall doesn't return an error when creating a directory
when a file with the same name already exists.

The mkdir command calls the access function from the libc
to check if the file already exists, before calling create.

https://github.com/0intro/plan9/blob/d1d89ac329/sys/src/cmd/mkdir.c#L19

The access function calls dirstats to check if the file already exists.

https://github.com/0intro/plan9/blob/c0f3d9569e/sys/src/libc/9sys/access.c#L21

Maybe we should implement the same logic for os.Mkdir on Plan 9.

@0intro

This comment has been minimized.

Copy link
Member

commented Jul 2, 2015

So I guess its better to open a new issue for that?

I believe it's fine here, so we have everything in the same place.

One additional data point: this bug could have sneaked in recently, since this test case hasn't been touched for at least the last three months or so. I don't know how often the buildbots run, though.

As far I can tell, this issue has been present for months.

@0intro 0intro self-assigned this Jul 2, 2015

gopherbot pushed a commit to golang/net that referenced this issue Jul 30, 2015
Mikio Hara
webdav: disable TestDir on Plan 9
Updates golang/go#11453.

Change-Id: Ia3560d382daffde995e9824b924d1938f08e6e41
Reviewed-on: https://go-review.googlesource.com/12880
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.