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
Assignees
Milestone

Comments

@glaubitz
Copy link

@glaubitz 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

This comment has been minimized.

Copy link
Member

@bradfitz 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

This comment has been minimized.

Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Nov 9, 2018

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

bep added 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

This comment has been minimized.

Copy link
Contributor

@bep 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

This comment has been minimized.

Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Nov 9, 2018

@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
6 participants
You can’t perform that action at this time.