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

Ticket3723 03 squashed rebased #241

Merged

Conversation

Labels
None yet
Projects
None yet
4 participants
@teor2345
Copy link
Contributor

@teor2345 teor2345 commented Jul 17, 2018

Opening this pull request so that Windows CI runs on this branch.

juga0 and others added 14 commits Jul 16, 2018
* add bwlist_headers argument to dirserv_read_measured_bandwidth
  in order to store all the headers found when parsing the file
* add bwlist_headers to networkstatus_t in order to store the
  the headers found by the previous function
* include the bandwidth headers as string in vote documents
* add test to check that dirserv_read_measured_bandwidth generates
  the bwlist_headers
when there are not bw file headers lines.
to avoid interpreting as headers extra lines that are not key_values
and add bw file terminator constant
If bandwidth file terminator is found, set end of headers flag
and do not store the line.
If it is not, parse a relay line and check whether it is a header
line.
also add tests for bw_file_headers.
Headers are all that is found before a correct relay line or
the terminator.
Tests include:
* a empty bandwidth file
* a bandwidth file with only timestamp
* a bandwidth file with v1.0.0 headers
* a bandwidth file with v1.0.0 headers and relay lines
* a bandwidth file with v1.1.0 headers and v1.0.0 relay lines
* a bandwidth file with v1.0.0 headers, malformed relay lines and
  relay lines
* a bandwidth file with v1.0.0 headers, malformed relay lines,
  relay lines and malformed relay lines
* a bandwidth file with v1.1.0 headers without terminator
* a bandwidth file with v1.1.0 headers with terminator
* a bandwidth file with v1.1.0 headers without terminator and
  relay lines
* a bandwidth file with v1.1.0 headers with terminator and relay
  lines
* a bandwidth file with v1.1.0 headers without terminator, bad
  relay lines and relay lines
* a bandwidth file with v1.1.0 headers with terminator, bad relay
  lines and relay lines
and complete v1.0.0 bandwidth file
If an authority is not configured with a V3BandwidthsFile, this line
SHOULD NOT appear in its vote.

If an authority is configured with a V3BandwidthsFile, but parsing
fails, this line SHOULD appear in its vote, but without any headers.

Part of 3723, implements the spec in 26799.
@coveralls
Copy link

@coveralls coveralls commented Jul 17, 2018

Coverage Status

Coverage increased (+0.01%) to 59.538% when pulling 6d59ab1 on juga0:ticket3723_03_squashed_rebased into 9ae3597 on torproject:master.

@teor2345 teor2345 mentioned this pull request Jul 18, 2018
@teor2345 teor2345 mentioned this pull request Jul 18, 2018
@juga0 juga0 force-pushed the ticket3723_03_squashed_rebased branch from 247fdfc to 6d59ab1 Jul 23, 2018
@torproject-pusher torproject-pusher merged commit 6d59ab1 into torproject:master Jul 30, 2018
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment