aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_shared_random.c
AgeCommit message (Collapse)Author
2020-03-03Stop using all dirauth-only options in shared_random_client.cNick Mathewson
This is not as clean a patch as I would like: see the comment on ASSUME_AUTHORITY_SCHEDULING. This issue here is that the unit tests sometimes assume that we are going to be looking at the dirauth options and behaving like a dirauth, but without setting the options to turn is into one. This isn't an issue for actually running Tor, as far as I can tell with chutney.
2020-02-24Rename voting_schedule_*() functions.Nick Mathewson
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ voting_schedule_recalculate_timing dirauth_sched_recalculate_timing \ voting_schedule_get_start_of_next_interval voting_sched_get_start_of_interval_after \ voting_schedule_get_next_valid_after_time dirauth_sched_get_next_valid_after_time
2020-02-24Move voting_schedule.[ch] to src/feature/dirauth/Nick Mathewson
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-06-05Run "make autostyle."Nick Mathewson
2019-04-30Replace all remaining tor_mem_is_zero() with fast_mem_is_zero()Nick Mathewson
2019-03-24Refactor test_utils_general() to fix Coverity warningsrl1987
2019-03-18Merge branch 'bug29706_035_minimal_merge' into bug29706_040_minimal_mergeteor
Comment merge.
2019-03-18Merge branch 'bug29706_034_minimal_merge' into bug29706_035_minimal_mergeteor
2019-03-18test/sr: update sr_state_free() to sr_state_free_all() in a commentteor
2019-03-18Merge branch 'bug29706_029_minimal' into bug29706_034_minimal_mergeteor
2019-03-18test/sr: Clear SRVs after init, and before setupteor
Already merged to 0.4.0 and later in tor-github/pr/776. Backported to 0.2.9 and later with minor comment changes. Part of 29706.
2019-03-15Merge remote-tracking branch 'tor-github/pr/776' into maint-0.4.0Nick Mathewson
2019-03-13test/sr: Clear SRVs after init, and before setupteor
Part of 29706.
2019-03-12Merge remote-tracking branch 'tor-github/pr/776' into maint-0.4.0Nick Mathewson
2019-03-12test/sr: update sr_state_free() to sr_state_free_all()teor
The function name changed between 0.2.9 and 0.3.4.
2019-03-12Merge branch bug29706_029_refactor into bug29706_034_refactorteor
2019-03-12sr: Check for replacing a SRV pointer with the same pointerteor
Check if the new pointer is the same as the old one: if it is, it's probably a bug: * the caller may have confused current and previous, or * they may have forgotten to sr_srv_dup(). Putting NULL multiple times is allowed. Part of 29706.
2019-03-09sr: rename srv_dup() to sr_srv_dup()teor
2019-03-09sr: Free SRVs before replacing them in state_query_put_()teor
Refactor the shared random state's memory management so that it actually takes ownership of the shared random value pointers. Fixes bug 29706; bugfix on 0.2.9.1-alpha.
2019-03-09test/sr: Free SRVs before replacing them in test_sr_setup_srv()teor
Stop leaking parts of the shared random state in the shared-random unit tests. The previous fix in 29599 was incomplete. Fixes bug 29706; bugfix on 0.2.9.1-alpha.
2019-02-28Merge branch 'maint-0.3.4' into maint-0.3.5teor
2019-02-28Merge branch 'maint-0.3.3' into maint-0.3.4teor
2019-02-28Merge branch 'maint-0.3.4' into maint-0.3.5teor
2019-02-28Merge branch 'maint-0.3.3' into maint-0.3.4teor
2019-02-28Merge branch 'maint-0.2.9' into maint-0.3.3teor
2019-02-27Merge remote-tracking branch 'tor-github/pr/731' into maint-0.4.0Nick Mathewson
2019-02-27test/shared-random: use sr_state_free_all() rather than sr_state_free()teor
sr_state_free() was renamed to sr_state_free_all() between 0.2.9 and 0.3.3. Part of 29599.
2019-02-27Merge branch 'bug29599_029' into bug29599_033teor
2019-02-27test/shared-random: Stop leaking shared random state in the unit teststeor
Stop leaking parts of the shared random state in the shared-random unit tests. Fixes bug 29599; bugfix on 0.2.9.1-alpha.
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick Mathewson
2018-12-17Fix dead-assignment warning in test_shared_random.cNick Mathewson
2018-10-31Merge branch 'networkstatus_mmap' into networkstatus_mmap_mergeNick Mathewson
2018-10-01Remove routerparse include from files that dont use itNick Mathewson
2018-10-01Split the authority-cert and signature/hash code from routerparseNick Mathewson
2018-10-01Move routerparse and parsecommon to their own module.Nick Mathewson
2018-09-19Split routerlist.c into 4 separate modulesNick Mathewson
There are now separate modules for: * the list of router descriptors * the list of authorities and fallbacks * managing authority certificates * selecting random nodes
2018-09-11Followup: Make authority_cert_parse_from_string() take length tooNick Mathewson
2018-09-04Merge branch 'nss_squashed' into nss_mergeNick Mathewson
2018-08-22Fix revision counter bugs caused by bad SRV start time computation.George Kadianakis
Bug description: For each descriptor, its revision counter is the OPE ciphertext of the number of seconds since the start time of its SRV value. This bug caused us to confuse the SRV start time in the middle of the lifetime of a descriptor in some edge-cases, which caused descriptor rejects. Bug cause: The bug occurs when we fetch a 23:00 consensus after midnight (e.g. at 00:08 when not all dirauths have fetched the latest 00:00 consensus). In that case, the voting schedule (which was used for SRV start time calculation) would return a valid-after past-midnight, whereas our consensus would be pre-midnight, and that would confuse the SRV start time computation which is used by HS revision counters (because we would reset the start time of SRV, without rotating descriptors). Bug fix: We now use our local consensus time to calculate the SRV start time, instead of the voting schedule. The voting schedule does not work as originally envisioned in this case, because it was created for voting by dirauths and not for scheduling stuff on clients.
2018-08-22Change log_test_helpers macros to use printf, not pastingNick Mathewson
This ensures that our test failure messages actually tell us what strings Tor was expecting. I will need this to debug some test failures.
2018-07-17Merge branch 'bug25552_ope_squashed'Nick Mathewson
2018-07-17Fix time source bug in sr_state_get_start_time_of_current_protocol_run().George Kadianakis
The following bug was causing many issues for this branch in chutney: In sr_state_get_start_time_of_current_protocol_run() we were using the consensus valid-after to calculate beginning_of_current_round, but we were using time(NULL) to calculate the current_round slot. This was causing time sync issues when the consensus valid-after and time(NULL) were disagreeing on what the current round is. Our fix is to use the consensus valid-after in both places. This also means that we are not using 'now' (aka time(NULL)) anymore in that function, and hence we can remove that argument from the function (and its callers). I'll do this in the next commit so that we keep things separated. Furthermore, we fix a unittest that broke.
2018-07-09Fix some lingering windows compilation issues from Jenkins.Nick Mathewson
These were caused by the recent refactoring.
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
2018-07-01Remove system headers from or.hNick Mathewson
2018-07-01Extract or_state_t to its own header.Nick Mathewson
Fewer modules needed this than I had expected.
2018-06-29Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-06-29Merge branch 'maint-0.3.3' into maint-0.3.4Nick Mathewson