diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2019-03-04 21:54:19 +0000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-04-05 12:14:11 +1000 |
commit | b027b06dbbbfcac6be91a9a89bda0b0949bd8b7d (patch) | |
tree | 3f367576bddb083daed56385aece6b402fbabf5a /src/test/test_circuitpadding.c | |
parent | 1f48c6cd83d66c904e7339e1ff60f5e7c5f6bbf4 (diff) | |
download | tor-b027b06dbbbfcac6be91a9a89bda0b0949bd8b7d.tar.gz tor-b027b06dbbbfcac6be91a9a89bda0b0949bd8b7d.zip |
Bug 29500: Start monotime at 1000 nsec.
Hopefully this will stop monotime_absolute_usec() from returning 0 on some
platforms in the tests.
Diffstat (limited to 'src/test/test_circuitpadding.c')
-rw-r--r-- | src/test/test_circuitpadding.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/test/test_circuitpadding.c b/src/test/test_circuitpadding.c index 077529a0dc..cd150b0646 100644 --- a/src/test/test_circuitpadding.c +++ b/src/test/test_circuitpadding.c @@ -300,9 +300,9 @@ test_circuitpadding_rtt(void *arg) monotime_init(); monotime_enable_test_mocking(); - monotime_set_mock_time_nsec(1*TOR_NSEC_PER_USEC); - monotime_coarse_set_mock_time_nsec(1*TOR_NSEC_PER_USEC); - curr_mocked_time = 1*TOR_NSEC_PER_USEC; + monotime_set_mock_time_nsec(1000*TOR_NSEC_PER_USEC); + monotime_coarse_set_mock_time_nsec(1000*TOR_NSEC_PER_USEC); + curr_mocked_time = 1000*TOR_NSEC_PER_USEC; timers_initialize(); circpad_machines_init(); @@ -990,9 +990,9 @@ test_circuitpadding_tokens(void *arg) monotime_init(); monotime_enable_test_mocking(); - monotime_set_mock_time_nsec(1*TOR_NSEC_PER_USEC); - monotime_coarse_set_mock_time_nsec(1*TOR_NSEC_PER_USEC); - curr_mocked_time = 1*TOR_NSEC_PER_USEC; + monotime_set_mock_time_nsec(1000*TOR_NSEC_PER_USEC); + monotime_coarse_set_mock_time_nsec(1000*TOR_NSEC_PER_USEC); + curr_mocked_time = 1000*TOR_NSEC_PER_USEC; timers_initialize(); @@ -1254,9 +1254,9 @@ test_circuitpadding_wronghop(void *arg) monotime_init(); monotime_enable_test_mocking(); - monotime_set_mock_time_nsec(1*TOR_NSEC_PER_USEC); - monotime_coarse_set_mock_time_nsec(1*TOR_NSEC_PER_USEC); - curr_mocked_time = 1*TOR_NSEC_PER_USEC; + monotime_set_mock_time_nsec(1000*TOR_NSEC_PER_USEC); + monotime_coarse_set_mock_time_nsec(1000*TOR_NSEC_PER_USEC); + curr_mocked_time = 1000*TOR_NSEC_PER_USEC; timers_initialize(); circpad_machines_init(); @@ -1441,9 +1441,9 @@ test_circuitpadding_negotiation(void *arg) monotime_init(); monotime_enable_test_mocking(); - monotime_set_mock_time_nsec(1*TOR_NSEC_PER_USEC); - monotime_coarse_set_mock_time_nsec(1*TOR_NSEC_PER_USEC); - curr_mocked_time = 1*TOR_NSEC_PER_USEC; + monotime_set_mock_time_nsec(1000*TOR_NSEC_PER_USEC); + monotime_coarse_set_mock_time_nsec(1000*TOR_NSEC_PER_USEC); + curr_mocked_time = 1000*TOR_NSEC_PER_USEC; timers_initialize(); circpad_machines_init(); @@ -1716,9 +1716,9 @@ test_circuitpadding_conditions(void *arg) monotime_init(); monotime_enable_test_mocking(); - monotime_set_mock_time_nsec(1*TOR_NSEC_PER_USEC); - monotime_coarse_set_mock_time_nsec(1*TOR_NSEC_PER_USEC); - curr_mocked_time = 1*TOR_NSEC_PER_USEC; + monotime_set_mock_time_nsec(1000*TOR_NSEC_PER_USEC); + monotime_coarse_set_mock_time_nsec(1000*TOR_NSEC_PER_USEC); + curr_mocked_time = 1000*TOR_NSEC_PER_USEC; timers_initialize(); helper_create_conditional_machines(); @@ -2261,9 +2261,9 @@ test_circuitpadding_global_rate_limiting(void *arg) monotime_init(); monotime_enable_test_mocking(); - monotime_set_mock_time_nsec(1*TOR_NSEC_PER_USEC); - monotime_coarse_set_mock_time_nsec(1*TOR_NSEC_PER_USEC); - curr_mocked_time = 1*TOR_NSEC_PER_USEC; + monotime_set_mock_time_nsec(1000*TOR_NSEC_PER_USEC); + monotime_coarse_set_mock_time_nsec(1000*TOR_NSEC_PER_USEC); + curr_mocked_time = 1000*TOR_NSEC_PER_USEC; timers_initialize(); client_side = (circuit_t *)origin_circuit_new(); |