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: build broken under go 1.4.2 @ commit 6dc0abc #10904

Open
NightTsarina opened this issue May 19, 2015 · 3 comments
Open

x/net/webdav: build broken under go 1.4.2 @ commit 6dc0abc #10904

NightTsarina opened this issue May 19, 2015 · 3 comments
Milestone

Comments

@NightTsarina
Copy link

Hi,

While working on Debian packages for x/net, I found that the tests were failing due to problems with XML parsing:

$ GOPATH=~/tmp/go go test golang.org/x/net/webdav
--- FAIL: TestMultistatusWriter (0.00s)
    xml_test.go:615: section 9.2.2 (failed dependency): XML body
        got  "<multistatus xmlns=\"DAV:\" xmlns=\"DAV:\" xmlns=\"DAV:\"><response xmlns=\"DAV:\" xmlns=\"DAV:\"><href xmlns=\"DAV:\" xmlns=\"DAV:\">http://example.com/foo</href><propstat xmlns=\"DAV:\" xmlns=\"DAV:\"><prop xmlns=\"DAV:\"><Authors xmlns=\"http://ns.example.com/\" xmlns=\"http://ns.example.com/\"></Authors></prop><status xmlns=\"DAV:\" xmlns=\"DAV:\">HTTP/1.1 424 Failed Dependency</status></propstat><propstat xmlns=\"DAV:\" xmlns=\"DAV:\"><prop xmlns=\"DAV:\"><Copyright-Owner xmlns=\"http://ns.example.com/\" xmlns=\"http://ns.example.com/\"></Copyright-Owner></prop><status xmlns=\"DAV:\" xmlns=\"DAV:\">HTTP/1.1 409 Conflict</status></propstat><responsedescription xmlns=\"DAV:\" xmlns=\"DAV:\">Copyright Owner cannot be deleted or altered.</responsedescription></response></multistatus>"
        want "<multistatus xmlns=\"DAV:\" xmlns=\"DAV:\"><response xmlns=\"DAV:\"><href xmlns=\"DAV:\">http://example.com/foo</href><propstat xmlns=\"DAV:\"><prop xmlns=\"DAV:\"><Authors xmlns=\"http://ns.example.com/\" xmlns=\"http://ns.example.com/\"></Authors></prop><status xmlns=\"DAV:\">HTTP/1.1 424 Failed Dependency</status></propstat><propstat xmlns=\"DAV:\" xmlns=\"DAV:\"><prop xmlns=\"DAV:\"><Copyright-Owner xmlns=\"http://ns.example.com/\" xmlns=\"http://ns.example.com/\"></Copyright-Owner></prop><status xmlns=\"DAV:\">HTTP/1.1 409 Conflict</status></propstat><responsedescription xmlns=\"DAV:\">Copyright Owner cannot be deleted or altered.</responsedescription></response></multistatus>"
    xml_test.go:615: section 9.6.2 (lock-token-submitted): XML body
        got  "<multistatus xmlns=\"DAV:\" xmlns=\"DAV:\" xmlns=\"DAV:\"><response xmlns=\"DAV:\" xmlns=\"DAV:\"><href xmlns=\"DAV:\" xmlns=\"DAV:\">http://example.com/foo</href><status xmlns=\"DAV:\" xmlns=\"DAV:\">HTTP/1.1 423 Locked</status><error xmlns=\"DAV:\" xmlns=\"DAV:\"><lock-token-submitted xmlns=\"DAV:\" xmlns=\"DAV:\"></lock-token-submitted></error></response></multistatus>"
        want "<multistatus xmlns=\"DAV:\" xmlns=\"DAV:\"><response xmlns=\"DAV:\"><href xmlns=\"DAV:\">http://example.com/foo</href><status xmlns=\"DAV:\">HTTP/1.1 423 Locked</status><error xmlns=\"DAV:\"><lock-token-submitted xmlns=\"DAV:\" xmlns=\"DAV:\"></lock-token-submitted></error></response></multistatus>"
    xml_test.go:615: section 9.1.3: XML body
        got  "<multistatus xmlns=\"DAV:\" xmlns=\"DAV:\" xmlns=\"DAV:\"><response xmlns=\"DAV:\" xmlns=\"DAV:\"><href xmlns=\"DAV:\" xmlns=\"DAV:\">http://example.com/foo</href><propstat xmlns=\"DAV:\" xmlns=\"DAV:\"><prop xmlns=\"DAV:\"><bigbox xmlns=\"http://ns.example.com/boxschema/\" xmlns=\"http://ns.example.com/boxschema/\"><BoxType xmlns=\"http://ns.example.com/boxschema/\" xmlns=\"http://ns.example.com/boxschema/\">Box type A</BoxType></bigbox><author xmlns=\"http://ns.example.com/boxschema/\" xmlns=\"http://ns.example.com/boxschema/\"><Name xmlns=\"http://ns.example.com/boxschema/\" xmlns=\"http://ns.example.com/boxschema/\">J.J. Johnson</Name></author></prop><status xmlns=\"DAV:\" xmlns=\"DAV:\">HTTP/1.1 200 OK</status></propstat><propstat xmlns=\"DAV:\" xmlns=\"DAV:\"><prop xmlns=\"DAV:\"><DingALing xmlns=\"http://ns.example.com/boxschema/\" xmlns=\"http://ns.example.com/boxschema/\"></DingALing><Random xmlns=\"http://ns.example.com/boxschema/\" xmlns=\"http://ns.example.com/boxschema/\"></Random></prop><status xmlns=\"DAV:\" xmlns=\"DAV:\">HTTP/1.1 403 Forbidden</status><responsedescription xmlns=\"DAV:\" xmlns=\"DAV:\">The user does not have access to the DingALing property.</responsedescription></propstat></response><responsedescription xmlns=\"DAV:\" xmlns=\"DAV:\">There has been an access violation error.</responsedescription></multistatus>"
        want "<multistatus xmlns=\"DAV:\" xmlns=\"DAV:\"><response xmlns=\"DAV:\"><href xmlns=\"DAV:\">http://example.com/foo</href><propstat xmlns=\"DAV:\"><prop xmlns=\"DAV:\"><bigbox xmlns=\"http://ns.example.com/boxschema/\" xmlns=\"http://ns.example.com/boxschema/\"><BoxType xmlns=\"http://ns.example.com/boxschema/\" xmlns=\"http://ns.example.com/boxschema/\">Box type A</BoxType></bigbox><author xmlns=\"http://ns.example.com/boxschema/\" xmlns=\"http://ns.example.com/boxschema/\"><Name xmlns=\"http://ns.example.com/boxschema/\" xmlns=\"http://ns.example.com/boxschema/\">J.J. Johnson</Name></author></prop><status xmlns=\"DAV:\">HTTP/1.1 200 OK</status></propstat><propstat xmlns=\"DAV:\"><prop xmlns=\"DAV:\"><DingALing xmlns=\"http://ns.example.com/boxschema/\" xmlns=\"http://ns.example.com/boxschema/\"></DingALing><Random xmlns=\"http://ns.example.com/boxschema/\" xmlns=\"http://ns.example.com/boxschema/\"></Random></prop><status xmlns=\"DAV:\">HTTP/1.1 403 Forbidden</status><responsedescription xmlns=\"DAV:\">The user does not have access to the DingALing property.</responsedescription></propstat></response><responsedescription xmlns=\"DAV:\">There has been an access violation error.</responsedescription></multistatus>"
FAIL
FAIL    golang.org/x/net/webdav 0.122s

The tests pass again if I checkout the commit previous to the one referenced in the title:

$ git checkout 3d87fd621ca9a824c5cff17216ce44769456cb3f
Previous HEAD position was 6dc0abc... webdav: fix XML golden tests for encoding/xml xmlns change.
HEAD is now at 3d87fd6... x/net/html: Sync the html parser and atom with the current whatwg spec

$ GOPATH=~/tmp/go go test golang.org/x/net/webdav
ok      golang.org/x/net/webdav 0.050s

Coincidentally, that commit is supposed to fix XML issues that arose with changes in the stdlib, but I guess it was not verified that they pass with an older stdlib. I am using the newest version of golang from Debian (1.4.2).

Thanks.

@adg adg changed the title Commit 6dc0abc in golang.org/x/net breaks tests when using an older stdlib x/net: build broken under go 1.4.2 @ commit 6dc0abc May 19, 2015
@mikioh mikioh changed the title x/net: build broken under go 1.4.2 @ commit 6dc0abc x/net/webdav: build broken under go 1.4.2 @ commit 6dc0abc May 19, 2015
@bradfitz
Copy link
Contributor

For @nigeltao

/cc @adg (for highlighting another case where we need subrepos getting tested regularly)

@nigeltao
Copy link
Contributor

Yes, x/net/webdav needs tip (which will be 1.5) stdlib, and will not pass with 1.4.2's insufficient encoding/xml package. I don't think that's easily fixed, so I'm marking this as working as intended.

@nigeltao
Copy link
Contributor

Actually, I suppose that we could skip the test on 1.4.2, without having to make the test pass for 1.4.2.

@nigeltao nigeltao reopened this May 19, 2015
@ianlancetaylor ianlancetaylor added this to the Unreleased milestone Jun 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants