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

gccgo: hugo tests fail with gccgo, works fine with gc #28669

Closed
glaubitz opened this issue Nov 8, 2018 · 4 comments · Fixed by gohugoio/hugo#5423
Closed

gccgo: hugo tests fail with gccgo, works fine with gc #28669

glaubitz opened this issue Nov 8, 2018 · 4 comments · Fixed by gohugoio/hugo#5423
Milestone

Comments

@glaubitz
Copy link

glaubitz commented Nov 8, 2018

Trying to build hugo with gccgo fails because the testsuite fails with:

=== RUN   TestMethodToName
--- FAIL: TestMethodToName (0.00s)
        assertions.go:256: 
                        Error Trace:    templatefuncRegistry_test.go:34
                        Error:          Not equal: 
                                        expected: "$thunk0"
                                        actual  : "thunk0"
                                    
                                        Diff:
                                        --- Expected
                                        +++ Actual
                                        @@ -1 +1 @@
                                        -$thunk0
                                        +thunk0
                        Test:           TestMethodToName
FAIL
FAIL    github.com/gohugoio/hugo/tpl/internal   0.523s

Full log available at: https://people.debian.org/~glaubitz/gccgo-logs/hugo_0.47.1-2_amd64.build

@gopherbot gopherbot added this to the Gccgo milestone Nov 8, 2018
@bradfitz bradfitz changed the title gccgo: hugo doesn't build with gccgo, builds fine with gc gccgo: hugo tests fail with gccgo, works fine with gc Nov 8, 2018
@bradfitz
Copy link
Contributor

bradfitz commented Nov 8, 2018

Fragile test making too many assumptions, or something gccgo should strive to match, even if not required?

/cc @spf13 @ianlancetaylor

@ianlancetaylor
Copy link
Contributor

Thanks for reporting this. This is a problem with the test, not with gccgo. Sent gohugoio/hugo#5423 to fix it.

bep pushed a commit to gohugoio/hugo that referenced this issue Nov 9, 2018
When run under gccgo, the test looks for the name that gccgo gives to
a thunk method.  This name is not normally visible, but can be seen
when using reflect.FuncForPC as this code does.  That name changed in
https://golang.org/cl/89555.  Change the test to work with both the
old name "$thunk0" and the new name "thunk0".

Fixes golang/go#28669
@bep
Copy link
Contributor

bep commented Nov 9, 2018

This test was originally adjusted to make the Debian build happy, so I guess this is full circle. The test in question is kind of superfluous, as lots of other tests would break if this name mapping construct was broken. But it should go green for Debian now.

@ianlancetaylor
Copy link
Contributor

@bep Thanks.

@golang golang locked and limited conversation to collaborators Nov 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants