summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | tor-config: Use next_back() instead of rev().next()Nick Mathewson2023-07-031-1/+1
| | | | | | | | | | | | | | | | This is a new warning^Wsuggestion from clippy nightly.
* | | | Merge branch 'task5' into 'main'gabi-2502023-07-064-10/+14
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | tor-rtmock: Minor followups for impl_runtime See merge request tpo/core/arti!1378
| * | | | tor-rtmock: statically assert that the macro makes a Runtime implIan Jackson2023-07-061-0/+6
| | | | |
| * | | | tor-rtmock: Use the same specified field for BlockOn and SpawnIan Jackson2023-07-064-10/+8
|/ / / / | | | | | | | | | | | | These are always the same and probably always will be.
* | | | Merge branch 'task4' into 'main'Ian Jackson2023-07-0614-454/+1488
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Introduce a MockExecutor for fully-isolated test cases See merge request tpo/core/arti!1375
| * | | | tor-rtmock: Add semver.mdIan Jackson2023-07-061-0/+3
| | | | |
| * | | | tor-rtmock: task: Fix a typoIan Jackson2023-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1375#note_2919976
| * | | | tor-rtmock: task: clarify progress_until_stalled a littleIan Jackson2023-07-062-1/+5
| | | | |
| * | | | tor-rtmock: Runtime: Expand on "allowed" documentationIan Jackson2023-07-061-3/+33
| | | | |
| * | | | tor-rtmock: task: Remove a () assignmentIan Jackson2023-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Discussion: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1375#note_2919928
| * | | | tor-rtmock: task: Abolish TaskFutureInfo alias (fmt)Ian Jackson2023-07-061-1/+3
| | | | |
| * | | | tor-rtmock: task: Abolish TaskFutureInfo aliasIan Jackson2023-07-061-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Requested by: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1375#note_2919926
| * | | | tor-rtmock: Net: Make UDP sockets un-constructableIan Jackson2023-07-061-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will hopefully mean anyone trying to use this will notice that it's not implemented. Prompted by: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1375#note_2919925
| * | | | tor-rtmock: Add a cross-reference from MockSleepRuntime::wait_forIan Jackson2023-07-061-0/+4
| | | | |
| * | | | tor-dirmgr: bridge descriptor tests: Add a missing #[traced_test]Ian Jackson2023-07-061-0/+1
| | | | | | | | | | | | | | | | | | | | This seems to have been overlooked.
| * | | | tor-dirmgr: bridge descriptor tests: Use MockRuntime (drop Tokio dep)Ian Jackson2023-07-062-2/+0
| | | | | | | | | | | | | | | | | | | | This isn't used any more.
| * | | | tor-dirmgr: bridge descriptor tests: Use MockRuntime (fmt)Ian Jackson2023-07-061-270/+271
| | | | | | | | | | | | | | | | | | | | Run rustfmt.
| * | | | tor-dirmgr: bridge descriptor tests: Use MockRuntimeIan Jackson2023-07-061-35/+25
| | | | | | | | | | | | | | | | | | | | This abolishes a bodge sleep. It should make the tests deterministic.
| * | | | tor-dirmgr: bridge descriptor tests: Fix a v. low prob. raceIan Jackson2023-07-061-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drain a number of events, not just one. The stream might yield many events, as explained in this new comment. This fails every time with MockExecutor::try_test_with_various(). I think it might fail with the tokio exeuctor too, but evidently not with high probability or we would have noticed.
| * | | | tor-hsclient: Abolish ad-hoc real-world-time sleepsIan Jackson2023-07-061-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we can reliably wait precisely for the tasks to be all waiting. This test case no longer involves any real executor.
| * | | | tor-rtmock: MockRuntime: provide test_with_variousIan Jackson2023-07-063-0/+45
| | | | | | | | | | | | | | | | | | | | In both fallible and infallible variants, for convenience.
| * | | | tor-rtmock: MockExecutor: Configurable scheduling policyIan Jackson2023-07-064-5/+76
| | | | |
| * | | | tor-rtmock: Provide MockRuntimeIan Jackson2023-07-064-0/+133
| | | | |
| * | | | tor-rtmock: Unit tests for MockExecutorIan Jackson2023-07-063-0/+108
| | | | |
| * | | | tor-rtmock: Provide MockExecutorIan Jackson2023-07-064-0/+588
| | | | |
| * | | | tor-rtmock: impl Default for MockNetProviderIan Jackson2023-07-061-0/+6
| | | | |
| * | | | tor-rtmock: impl Default for MockNetProvider (prep)Ian Jackson2023-07-061-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want MockNetProvider to be Default. In this commit: impl Default for MockNetwork and use it in new().
| * | | | tor-rtmock: impl Default for MockSleepProviderIan Jackson2023-07-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Pick an arbitrary start time roughly now. This will do for many tests.
| * | | | tor-rtmock: net: "Provide" a UDP "implementation" which doesn't workIan Jackson2023-07-064-5/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nothing in our tree actually *uses* the UDP in tests. We want a mock UDP provider that isn't part of a real runtime, so that we can make a totally-mock runtime for properly controlled testing. It seems best to make this part of MockNetProvider rather than a separate type.
| * | | | tor-rtmock: Introduce impl_runtime_prelude (fmt)Ian Jackson2023-07-061-1/+3
| | | | |
| * | | | tor-rtmock: Introduce impl_runtime_preludeIan Jackson2023-07-063-17/+26
| | | | | | | | | | | | | | | | | | | | | | | | | This deduplicates some imports, which would otherwise be about to become triplicated.
| * | | | tor-rtmock: Introduce impl_runtime! macroIan Jackson2023-07-064-118/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This deduplicates some trait delegation. We want this now because we're about to introduce a third mock runtime, so this would become triplication otherwise.
* | | | | Merge branch 'log_precision' into 'main'Nick Mathewson2023-07-066-4/+385
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | arti: Add a `logging.time_granularity` option with 1s default. Closes #551 See merge request tpo/core/arti!1376
| * | | | arti: comments about catch_unwindNick Mathewson2023-07-061-0/+9
| | | | |
| * | | | time_granularity: Make sure formatter can't panicNick Mathewson2023-07-061-17/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was unable to assure myself that tracing_subscriber could withstand a panicking Timer, so instead I'm trying to make sure our own LogTimer can't panic.
| * | | | arti: Add a `logging.time_granularity` option with 1s default.Nick Mathewson2023-07-066-5/+346
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | This lets us provide less information in our logs: in particular, it lets us avoid logging with microsecond precision. Closes #551.
* | | | Merge branch 'tracing-panic' into 'main'Nick Mathewson2023-07-064-2/+42
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arti: Install a panic hook that sends messages to `tracing` Closes #921 See merge request tpo/core/arti!1377
| * | | | arti: Note possibility for future use of other tracing panic providerNick Mathewson2023-07-061-0/+5
| | | | |
| * | | | arti: On panic, avoid allocation even more.Nick Mathewson2023-07-061-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original version of our panic handler would allocate a string for the panic `Location`. But if we're panicking we'd like to keep allocations to a minimum: so instead format the `Location` conditionally. This also drops a useless `std::borrow::Cow`. (The possibility of a "Don't have a `Cow`" commit message was considered and rejected.)
| * | | | Add TODO comments about possibly migrating away from the backtrace crate.Nick Mathewson2023-07-052-1/+4
| | | | |
| * | | | arti: Install a panic hook that sends messages to `tracing`Nick Mathewson2023-07-053-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Also leaves installed the default handler that sends messages to stderr.) Closes #921.
* | | | | Merge branch 'keymgr-enc-key-todo' into 'main'gabi-2502023-07-051-1/+12
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | keymgr: Explain why the TODO regarding EncodableKey can't be addressed. See merge request tpo/core/arti!1372
| * | | | keymgr: Explain why the TODO regarding EncodableKey can't be addressed.Gabriela Moldovan2023-07-051-1/+12
|/ / / /
* | | | Merge branch 'shadow-onion' into 'main'Nick Mathewson2023-07-0541-29/+133
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | CI: extend shadow test to test an onion service connection See merge request tpo/core/arti!1292
| * | | | CI: enable onion-service-client in rust-latest buildJim Newsome2023-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The shadow test needs this to use this build when testing onion services.
| * | | | articlient-onion: don't filter onion addressesJim Newsome2023-07-033-1/+5
| | | | |
| * | | | Dedupe arti configs and match TestingTorNetworks HS configJim Newsome2023-07-039-49/+17
| | | | |
| * | | | shadow test: disable trace-level loggingJim Newsome2023-07-031-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some hosts were configured to log at trace level instead of the global default (debug level). This was resulting in quite large shadow log output.
| * | | | shadow test: disable worker spinningJim Newsome2023-07-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This optimization doesn't seem to help much for this test; disable it to avoid burning CI runner CPU.
| * | | | shadow test: enable arti's `log_sensitive_information` optionJim Newsome2023-07-033-0/+9
| | | | |