Ian Jackson
6ed8e0b669
tor-rtmock: task: Fix a typo
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1375#note_2919976
2023-07-06 15:14:41 +01:00
Ian Jackson
7e7428611e
tor-rtmock: task: clarify progress_until_stalled a little
2023-07-06 15:14:41 +01:00
Ian Jackson
6aff623c08
tor-rtmock: Runtime: Expand on "allowed" documentation
2023-07-06 15:14:41 +01:00
Ian Jackson
02293bd42d
tor-rtmock: task: Remove a () assignment
...
Discussion:
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1375#note_2919928
2023-07-06 15:14:41 +01:00
Ian Jackson
89994142d3
tor-rtmock: task: Abolish TaskFutureInfo alias (fmt)
2023-07-06 15:14:41 +01:00
Ian Jackson
78071c30ef
tor-rtmock: task: Abolish TaskFutureInfo alias
...
Requested by:
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1375#note_2919926
2023-07-06 15:14:41 +01:00
Ian Jackson
55329fe85b
tor-rtmock: Net: Make UDP sockets un-constructable
...
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
2023-07-06 15:14:41 +01:00
Ian Jackson
5a05960958
tor-rtmock: Add a cross-reference from MockSleepRuntime::wait_for
2023-07-06 15:14:41 +01:00
Ian Jackson
1f41281cfd
tor-dirmgr: bridge descriptor tests: Add a missing #[traced_test]
...
This seems to have been overlooked.
2023-07-06 15:14:41 +01:00
Ian Jackson
a4bb2a8b57
tor-dirmgr: bridge descriptor tests: Use MockRuntime (drop Tokio dep)
...
This isn't used any more.
2023-07-06 15:14:40 +01:00
Ian Jackson
25e51f212a
tor-dirmgr: bridge descriptor tests: Use MockRuntime (fmt)
...
Run rustfmt.
2023-07-06 15:14:40 +01:00
Ian Jackson
5eb066acf9
tor-dirmgr: bridge descriptor tests: Use MockRuntime
...
This abolishes a bodge sleep. It should make the tests deterministic.
2023-07-06 15:14:40 +01:00
Ian Jackson
473fd23f8b
tor-dirmgr: bridge descriptor tests: Fix a v. low prob. race
...
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.
2023-07-06 15:14:40 +01:00
Ian Jackson
bc63fdb34c
tor-hsclient: Abolish ad-hoc real-world-time sleeps
...
Now we can reliably wait precisely for the tasks to be all waiting.
This test case no longer involves any real executor.
2023-07-06 15:14:40 +01:00
Ian Jackson
dc28b320f4
tor-rtmock: MockRuntime: provide test_with_various
...
In both fallible and infallible variants, for convenience.
2023-07-06 15:14:40 +01:00
Ian Jackson
e23b1e00b5
tor-rtmock: MockExecutor: Configurable scheduling policy
2023-07-06 15:14:40 +01:00
Ian Jackson
be632ba0f9
tor-rtmock: Provide MockRuntime
2023-07-06 15:14:40 +01:00
Ian Jackson
67941488ab
tor-rtmock: Unit tests for MockExecutor
2023-07-06 15:14:40 +01:00
Ian Jackson
d82ed8d793
tor-rtmock: Provide MockExecutor
2023-07-06 15:14:40 +01:00
Ian Jackson
70fdd92030
tor-rtmock: impl Default for MockNetProvider
2023-07-06 15:14:40 +01:00
Ian Jackson
24da490ef5
tor-rtmock: impl Default for MockNetProvider (prep)
...
We want MockNetProvider to be Default.
In this commit: impl Default for MockNetwork and use it in new().
2023-07-06 15:14:40 +01:00
Ian Jackson
29cc83b35e
tor-rtmock: impl Default for MockSleepProvider
...
Pick an arbitrary start time roughly now. This will do for many
tests.
2023-07-06 15:14:40 +01:00
Ian Jackson
395a616c9f
tor-rtmock: net: "Provide" a UDP "implementation" which doesn't work
...
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.
2023-07-06 15:14:40 +01:00
Ian Jackson
070a934451
tor-rtmock: Introduce impl_runtime_prelude (fmt)
2023-07-06 15:14:40 +01:00
Ian Jackson
492699d522
tor-rtmock: Introduce impl_runtime_prelude
...
This deduplicates some imports, which would otherwise be about to
become triplicated.
2023-07-06 15:14:40 +01:00
Ian Jackson
97e817b330
tor-rtmock: Introduce impl_runtime! macro
...
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.
2023-07-06 15:14:40 +01:00
Nick Mathewson
5a46dfef8f
arti: comments about catch_unwind
2023-07-06 09:44:51 -04:00
Nick Mathewson
6b6b3d9e53
time_granularity: Make sure formatter can't panic
...
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.
2023-07-06 09:44:50 -04:00
Nick Mathewson
512064cc19
arti: Add a `logging.time_granularity` option with 1s default.
...
This lets us provide less information in our logs: in particular, it
lets us avoid logging with microsecond precision.
Closes #551 .
2023-07-06 09:44:09 -04:00
Nick Mathewson
5f896aa504
Merge branch 'tracing-panic' into 'main'
...
arti: Install a panic hook that sends messages to `tracing`
Closes #921
See merge request tpo/core/arti!1377
2023-07-06 13:09:54 +00:00
Nick Mathewson
d2b6fee3f9
arti: Note possibility for future use of other tracing panic provider
2023-07-06 08:50:53 -04:00
Nick Mathewson
01f1192b20
arti: On panic, avoid allocation even more.
...
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.)
2023-07-06 08:45:34 -04:00
gabi-250
e3189857c4
Merge branch 'keymgr-enc-key-todo' into 'main'
...
keymgr: Explain why the TODO regarding EncodableKey can't be addressed.
See merge request tpo/core/arti!1372
2023-07-05 22:32:20 +00:00
Gabriela Moldovan
258dd195e0
keymgr: Explain why the TODO regarding EncodableKey can't be addressed.
2023-07-05 22:21:47 +01:00
Nick Mathewson
afa51fd5ca
Add TODO comments about possibly migrating away from the backtrace crate.
2023-07-05 16:39:11 -04:00
Nick Mathewson
9c4de185e9
arti: Install a panic hook that sends messages to `tracing`
...
(Also leaves installed the default handler that sends messages to
stderr.)
Closes #921 .
2023-07-05 16:37:10 -04:00
Nick Mathewson
877c480bfe
Merge branch 'shadow-onion' into 'main'
...
CI: extend shadow test to test an onion service connection
See merge request tpo/core/arti!1292
2023-07-05 19:50:53 +00:00
Ian Jackson
0003a632de
Merge branch 'unpublishing' into 'main'
...
Mark several crates with `publish=false`.
Closes #944
See merge request tpo/core/arti!1371
2023-07-05 16:49:41 +00:00
Saksham Mittal
c94b1b6574
Remove now unnecessary lines for import
2023-07-05 19:03:53 +05:30
Saksham Mittal
68948e9677
Import CompoundFactory regardless of feature level
2023-07-05 18:59:54 +05:30
Saksham Mittal
58df83dcde
Create new method to expose CompoundFactory
2023-07-05 18:53:22 +05:30
Saksham Mittal
7600200f15
Expose CompoundFactory for later exposure in API
2023-07-05 18:39:44 +05:30
gabi-250
d0c9140bb2
Merge branch 'faster-ci' into 'main'
...
try making CI faster
See merge request tpo/core/arti!1373
2023-07-04 23:56:10 +00:00
trinity-1686a
7c797d822e
fix audit
2023-07-04 20:57:25 +02:00
trinity-1686a
25f4eb1dc5
try making CI faster
2023-07-04 20:53:38 +02:00
Alexander Færøy
b77a7280f5
Merge branch 'bridge-pt-docs' into 'main'
...
Additional documentation around bridges/PT configuration
Closes #706
See merge request tpo/core/arti!1370
2023-07-03 21:56:48 +00:00
Jim Newsome
0b33969030
CI: enable onion-service-client in rust-latest build
...
The shadow test needs this to use this build when testing onion
services.
2023-07-03 14:44:33 -05:00
Jim Newsome
3eda3a7936
articlient-onion: don't filter onion addresses
2023-07-03 14:15:23 -05:00
Jim Newsome
3b01f3ba61
Dedupe arti configs and match TestingTorNetworks HS config
2023-07-03 14:15:23 -05:00
Nick Mathewson
517bf1cf03
Mark arti-bench with "publish = false"
...
This crate is only useful for development; earlier we published it,
but I believe that was in error.
2023-07-03 13:52:20 -04:00