-
Notifications
You must be signed in to change notification settings - Fork 196
ENT-3999: Atexit code coverage #3197
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
ENT-3999: Atexit code coverage #3197
Conversation
d14a79d to
867ebb6
Compare
Codecov Report
@@ Coverage Diff @@
## master #3197 +/- ##
==========================================
+ Coverage 61.87% 63.14% +1.27%
==========================================
Files 211 212 +1
Lines 46332 46360 +28
==========================================
+ Hits 28669 29276 +607
+ Misses 17663 17084 -579
Continue to review full report at Codecov.
|
e8a8f95 to
e5f2cb8
Compare
cf-serverd/server_transform.c
Outdated
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.
for what it's worth... I tried some
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-label"
...
#pragma GCC diagnostic pop
But it didn't seem to remove the warnings when I was compiling locally. :(
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.
as it turns out these unused labels don't seem to break travis/jenkins even though -Werror seems to be enabled. I fixed cf-monitor/env_monitor.c label with a gcc Label Attribute like:
__attribute__((unused));
So maybe just to be safe I will add that to these labels as well.
e3c802f to
9ebf3e3
Compare
vpodzime
left a comment
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 think the line "hard-coded" numbers are an issue. Maybe we should use something like grep -n to get the line numbers of particular labels and then use these "adapting" line numbers in the gdb scripts?
.travis.yml
Outdated
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.
Also add -ggdb3.
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, I worked on a grep -n solution for a little while but then dropped it. Will pick it back up now and try to get it done. :)
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.
@vpodzime do you think -g3 (-ggdb3 equivalent I think) would fix the labels problem I had? Maybe academic now since I likely have the grep -n solution working.
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.
Whose gonna update these line numbers when the file(s) is/are changed?
travis-scripts/script.sh
Outdated
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.
What is this about?
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.
That was an attempt by me to streamline the test cycle with jenkins and such... by settings a TESTS var and only running the test I wanted to check on. It's half-baked so will remove it. Thanks for the catch.
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.
@vpodzime something like the above? It seemed to work pretty well. I will work on the other two instances when I can.
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.
Yeah, something like that.
cf-serverd/server_transform.c
Outdated
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.
@vpodzime how about this? I like it pretty well. Need to implement the other two instances and test on travis/jenkins
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 think using a more noticeable prefix like GDB: would be better. Also it would be nice if the comment was aligned with the code. But it's not a big deal.
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 would be better done with a files: promise, right?
|
@cf-bottom jenkins build please |
|
Alright, I triggered a build: |
37d4ca0 to
9e0fef4
Compare
|
@cf-bottom jenkins builds please |
|
Alright, I triggered a build: |
Add tests to increase code coverage around exit()/atexit() calls.
…file:linenumber syntax for gdb driven tests
f4c325b to
ea8474c
Compare
|
made this a WIP in hopes that a combined refactor+tests PR works better: #3252 |
|
abandoning due to complexity of testing exit() calls. |
This PR is focused on only increasing code coverage to core as-is for exit() calls. This is in preparation for the refactor away from atexit() for Windows' sake.
Will squash once I get as much coverage as is reasonable.