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
many: fix tests with go1.8 / artful #3250
Conversation
7a701b4
to
17ee3a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what's going on but +1
17ee3a9
to
d9e2ce5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for iterating on those fixes
c.Check(all, Contains, &builtin.UhidInterface{}) | ||
c.Check(all, Contains, &builtin.Unity7Interface{}) | ||
c.Check(all, DeepContains, &builtin.BluezInterface{}) | ||
c.Check(all, DeepContains, &builtin.BoolFileInterface{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now I really wonder how this was working before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see two possibilities:
- compiler optimization resulted in the same pointer being returned for both
- check actually handing pointers to simple structures the same way as it would if the structure is passed by value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope for 1 (bad on go side), I might try to double-check that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it's 1 and something has changed, it's important to note that those structs are zero-sized.
The langref has this to say (at the very end):
"Two distinct zero-size variables may have the same address in memory."
may not must, so both <1.8 and 1.8 are doing acceptable things but the test was broken
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O-M-G that is utterly terrible. I'm happy that they changed this in 1.8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy-paste bug
spread.yaml
Outdated
- ubuntu-17.10-ppc64el: | ||
username: ubuntu | ||
password: ubuntu | ||
- ubuntu-17.04-armhf: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a copy-paste bug, I think you wanted 17.10-armhf
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Also run new "artful" autopkgtest hook that should ensure we run not into failures for this anymore.
This will also need to be distro-pachted into the artful package to make the build (or our SRU will be blocked on this).