-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix broken stacktrace #851
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
@drigz are you windows guy by any chance? |
test/stacktrace/test.cpp
Outdated
@@ -0,0 +1,62 @@ | |||
#include <algorithm> |
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.
Are you sure these tests are necessary? There's a stacktrace_unittest.cc
already. Either way, the naming scheme does not follow glog conventions.
Thanks @sergiud I missed existing tests. I added Bazel rules for them, skipped few however, as I didn't have time to investigate why they are broken. There is some caveat, though. Current From what I can see they are defined in here https://github.com/google/glog/blob/master/src/utilities.h#L104. We could define those flags in Bazel, but that might fail tests in legit platforms that do not support them. |
I'm afraid not, almost all my Windows development experience comes from trying to keep this build working on Windows... Why do you ask? If it's about the current error:
I hope that However, if this is too fiddly, we could also consider a different approach: a bazel-only test that runs That said, I'd accept this PR even without tests, as adding a new test just to check we've kept Thanks again for taking the time to get to the bottom of this! |
@drigz adjusted test per your suggestion :) |
Codecov Report
@@ Coverage Diff @@
## master #851 +/- ##
=======================================
Coverage 73.28% 73.28%
=======================================
Files 17 17
Lines 3290 3290
=======================================
Hits 2411 2411
Misses 879 879 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Bazel changes LGTM, @sergiud if you're happy with the change to stacktrace_unittest.cc please submit. |
Thanks! |
due to the bug: google/glog#851
Since #846,
HAVE_UNWIND_H
is not really in use. Instead we should useHAVE__UNWIND_BACKTRACE
andHAVE__UNWIND_GETIP
(added in #846).To prevent that from happening again, also added Bazel tests that confirm stacktrace are still working.