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

Bug29085 microcommits rebase #1014

Conversation

Labels
None yet
Projects
None yet
2 participants
@mikeperry-tor
Copy link
Contributor

@mikeperry-tor mikeperry-tor commented May 11, 2019

No description provided.

This commit moves the padding state limit checks and the padding rate limit
checks out of the token removal codepath, and causes all three functions to
get called from a single circpad_machine_count_nonpadding_sent() function.

It does not change functionality.
This commit moves code that updates the state length and padding limit counts
out from the callback to its own function, for clarity.

It does not change functionality.
Deliver nonpadding events instead of calling token removal functions.
Since RTT estimation is disabled in our default machines, this should not be
reached, but it may prove helpful in the future.
@mikeperry-tor mikeperry-tor mentioned this pull request May 11, 2019
@coveralls
Copy link

@coveralls coveralls commented May 11, 2019

Pull Request Test Coverage Report for Build 5013

  • 51 of 53 (96.23%) changed or added relevant lines in 1 file are covered.
  • 1338 unchanged lines in 7 files lost coverage.
  • Overall coverage increased (+0.03%) to 62.464%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/core/or/circuitpadding.c 51 53 96.23%
Files with Coverage Reduction New Missed Lines %
src/core/or/protover.c 17 92.35%
src/core/or/sendme.c 18 73.37%
src/core/or/circuitpadding.c 48 93.0%
src/core/or/connection_or.c 75 45.98%
src/core/or/channel.c 128 82.99%
src/core/or/circuituse.c 456 29.46%
src/app/config/config.c 596 72.49%
Totals Coverage Status
Change from base Build 4985: 0.03%
Covered Lines: 46576
Relevant Lines: 74564

💛 - Coveralls

…oval explicit.

Make this relationship and all the checks be part of its own function.
Everything is cleaner that way.
Our other tests tested state lengths against padding packets, and token counts
against non-padding packets. This test checks state lengths against
non-padding packets (and also padding packets too), and checks token counts
against padding packets (and also non-padding packets too).

The next three commits are needed to make this test pass (it found 3 bugs).
Yay?
We need to check here because otherwise we can try to schedule padding with no
tokens left upon the receipt of a padding event when our bins just became
empty.
Free circpad machine to pass leaksanitizer in CI.
@mikeperry-tor
Copy link
Contributor Author

@mikeperry-tor mikeperry-tor commented May 15, 2019

This PR got broken by a practracker commit in between fixups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment