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
29018: ExtraInfoStatistics fixes and unit tests #709
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When ExtraInfoStatistics is 0, stop including PaddingStatistics in relay and bridge extra-info documents. Fixes bug 29017; bugfix on 0.3.1.1-alpha.
When ExtraInfoStatistics is 0, stop including bandwidth usage statistics, GeoIPFile hashes, ServerTransportPlugin lines, and bridge statistics by country in extra-info documents. Fixes bug 29018; bugfix on 0.2.4.1-alpha (and earlier versions).
Split the body of router_build_fresh_descriptor() into static functions, by inserting function prologues and epilogues between existing sections. Write a new body for router_build_fresh_descriptor() that calls the new static functions. Initial refactor with no changes to the body of the old router_build_fresh_descriptor(), except for the split. Preparation for testing 29017 and 20918.
…rfaces Tidy the arguments and return values of these functions, and clean up their memory management. Preparation for testing 29017 and 20918.
…tions Make sure that these static functions aren't passed NULL. If they are, log a BUG() warning, and return an error. Preparation for testing 29017 and 20918.
Remove some tiny static functions called by router_build_fresh_descriptor(), and move their code into more relevant functions. Then, give router_update_{router,extra}info_descriptor_body identical layouts. Preparation for testing 29017 and 20918.
Remove router_update_info_send_unencrypted(), and move its code into the relevant functions. Then, re-use an options pointer. Preparation for testing 29017 and 20918.
This refactoring improves the structure of router_build_fresh_descriptor(). Preparation for testing 29017 and 20918.
…tors Also, explicitly state when routerinfos and extra-infos are signed. And tidy up some other comments. Preparation for testing 29017 and 20918.
Add comment in test_router_dump_router_to_string_no_bridge_distribution_method to explain the effect of a mocked function.
…ation Tests 29017 and 29018.
Also fix a missing mock in rsa-only parsing.
Also: * delete some obsolete code that was #if 0 * improve cleanup on failure * make the dir_format tests more consistent with each other * construct the descriptors using smartlist chunks This refactor is incomplete, because removing the remaining duplicate code would be time-consuming. Part of 29017 and 29018.
Including: * relays and bridges, * no stats, basic stats, and all stats Part of 29017 and 29018.
This was referenced Feb 19, 2019
Pull Request Test Coverage Report for Build 3861
💛 - Coveralls |
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.