| Commit message (Collapse) | Author | Age | Files | Lines | ||
|---|---|---|---|---|---|---|
| ... | ||||||
| * | tor-rtmock: MockSleepProvider docs: Move example (fmt) | Ian Jackson | 2023-10-05 | 1 | -12/+12 | |
| | | | | | | Adding "/// " to every line causes rustfmt to have conniptions about the trailing whitespace. | |||||
| * | tor-rtmock: MockSleepProvider docs: Move example | Ian Jackson | 2023-10-05 | 1 | -0/+73 | |
| | | | | | | | | | | | | This example demonstrates MockSleepRuntime, which we don't want to use in new tests. It's probably worth keeping it, though, to help with comprehension of existing tests. So move it. This does rather highlight the lack of good overall example/instructions for MockRuntime. | |||||
| * | tor-rtmock: simple_time: Rename `wakers` to `futures` (fmt) | Ian Jackson | 2023-10-05 | 1 | -1/+4 | |
| | | ||||||
| * | tor-rtmock: simple_time: Rename `wakers` to `futures` | Ian Jackson | 2023-10-05 | 1 | -11/+11 | |
| | | | | | This is clearer, I think. | |||||
| * | tor-rtmock: simple_time: Rename `pq` to `unready` | Ian Jackson | 2023-10-05 | 1 | -13/+13 | |
| | | | | | This is clearer, I think. | |||||
| * | tor-rtmock: simple_time: Expand on advance and task ordering | Ian Jackson | 2023-10-05 | 1 | -2/+8 | |
| | | ||||||
| * | tor-rtmock: simple_time: Clarify/correct comments about invariant | Ian Jackson | 2023-10-05 | 1 | -2/+2 | |
| | | ||||||
| * | tor-rtmock: Add deprecation warning to MockSleepRuntime | Ian Jackson | 2023-10-05 | 1 | -1/+7 | |
| | | ||||||
| * | tor-rtmock: MockSleepProvider docs: Move deprecation discussion | Ian Jackson | 2023-10-05 | 1 | -32/+38 | |
| | | | | | | The module-level docs here are less visible and also not where most of the other stuff was. | |||||
| * | tor-rtmock: MockSleepProvider docs: Compare with SimpleMockTimeProvider | Ian Jackson | 2023-10-05 | 1 | -0/+22 | |
| | | ||||||
| * | tor-rtmock: simple_time: Clarify some things in time_until_next_timeout | Ian Jackson | 2023-10-05 | 1 | -0/+6 | |
| | | ||||||
| * | tor-rtmock: simple_time: Give formal names to the states | Ian Jackson | 2023-10-05 | 1 | -2/+21 | |
| | | | | | And introduce a table showing the situations. | |||||
| * | tor-rtmock: simple_time: take() the waker when we wake | Ian Jackson | 2023-10-05 | 1 | -2/+5 | |
| | | | | | | We don't need it any more; we won't call wake again. So, call .wake() rather than .wake_by_ref(). | |||||
| * | tor-rtmock: Provide SimpleTimeProvider: clarify .sleep() innards | Ian Jackson | 2023-10-03 | 1 | -4/+6 | |
| | | | | | | | Making the SleepFuture first means we don't call .wake_any() with the other invariants violated. This doesn't actually matter with the code as it stands, but it's less confusing this way. | |||||
| * | tor-rtmock: MockRuntime: in advance_*, warn to stderr about looping | Ian Jackson | 2023-10-03 | 1 | -1/+21 | |
| | | | | | | This helped me diagnose https://gitlab.torproject.org/tpo/core/arti/-/issues/1040 | |||||
| * | tor-rtmock: Break out advance_inner | Ian Jackson | 2023-10-03 | 1 | -10/+31 | |
| | | | | | We're going to want to add something to it. | |||||
| * | tor-rtmock: Add a deprecation warning to MockSleepProvider | Ian Jackson | 2023-10-03 | 1 | -0/+13 | |
| | | ||||||
| * | tor-rtmock: Abolish deprecated Runtime::advance() | Ian Jackson | 2023-10-03 | 1 | -17/+0 | |
| | | | | | | Now we're making breaking changes anyway, in or mock crate, it is a convenient time to get rid of this. | |||||
| * | tor-rtmock: Fix doc refs to advance_* | Ian Jackson | 2023-10-03 | 1 | -2/+2 | |
| | | ||||||
| * | tor-rtmock: Rename MockRuntime::jump_to to jump_wallclock | Ian Jackson | 2023-10-03 | 1 | -2/+2 | |
| | | | | | | | This was named after the method from MockSleepRuntime. The name is confusing because it seems to imply it might do something to the monotonic time. | |||||
| * | tor-rtmock: Abolish just-introduced confusing type alias (fmt) | Ian Jackson | 2023-10-03 | 1 | -1/+1 | |
| | | ||||||
| * | tor-rtmock: Abolish just-introduced confusing type alias | Ian Jackson | 2023-10-03 | 1 | -8/+8 | |
| | | ||||||
| * | tor-rtmock: Switch MockRuntime to SimpleMockSleepProvider | Ian Jackson | 2023-10-03 | 2 | -12/+11 | |
| | | | | | | | | | | | | | | | | | For now we do this by changing the meaning of the name `MockSleepProvider` in runtime.rs. This is a bodge to reduce noise in this diff. Consequences at call sites: * If the type is named somehow, the other type must be used. * SimpleMockTimeProvider calls it jump_wallclock rather than jump_to, which is IMO a better name. (MockRuntime will change in a moment.) * SimpleMockTimeProvider's advance() function isn't async and doesn't yield. But none of the call sites actually mind that. | |||||
| * | tor-rtmock: Provide SimpleTimeProvider | Ian Jackson | 2023-10-03 | 2 | -0/+348 | |
| | | ||||||
| * | tor-rtmock: Drop some obsolete caveats | Ian Jackson | 2023-10-03 | 1 | -7/+2 | |
| | | | | | Nowadays there are methods for this. | |||||
| * | tor-rtmock: MockRuntime: Work around borrowck in Rust 1.65 | Ian Jackson | 2023-09-18 | 1 | -0/+2 | |
| | | ||||||
| * | tor-rtmock: MockRuntime: Move deprecated advance to end of impl block | Ian Jackson | 2023-09-18 | 1 | -17/+17 | |
| | | | | | This will change the ordering in the docs. | |||||
| * | tor-rtmock: MockRuntime: Add tests for advance_* | Ian Jackson | 2023-09-18 | 1 | -0/+177 | |
| | | ||||||
| * | tor-rtmock: MockRuntime: Provide advance_by() etc. and deprecate .advance() | Ian Jackson | 2023-09-18 | 1 | -1/+100 | |
| | | | | | | | | | advance_by can be used in a more natural way, rather than having to manually advance the clock in chunks to avoid triggering only the first sleep. It can also detects some "timeout triggered precisely" edge case bugs. | |||||
| * | tor-rtmock: MockRuntime: Provide spawn_identified() wrapper | Ian Jackson | 2023-09-18 | 1 | -0/+13 | |
| | | | | | We should encourage the use of this, rather than Spawn::spawn() | |||||
| * | tor-rtmock: task backtraces: Expand on spurious backtraces | Ian Jackson | 2023-09-13 | 1 | -2/+7 | |
| | | | | | There's another reason you can see multiple backtraces. | |||||
| * | tor-rtmock: task backtraces: Fix output re backtrace multiplicity | Ian Jackson | 2023-09-13 | 1 | -2/+10 | |
| | | | | | | | | There may be several backtraces for an asleep task. If so, print the prefix for each one. There may be no backtraces for an asleep task. If so, print a message. | |||||
| * | tor-rtmock: task: Add missing doc comment | Ian Jackson | 2023-09-13 | 1 | -1/+3 | |
| | | ||||||
| * | tor-rtmock: task: Add warning about backtrace salience | Ian Jackson | 2023-09-13 | 1 | -2/+34 | |
| | | | | | With explanation of how it works. | |||||
| * | tor-rtmock: task: Add backtrace dumping calls | Ian Jackson | 2023-09-13 | 1 | -4/+4 | |
| | | | | | | | | Do a full dump, not just a normal Debug dump, when we're panicking in progress_until_stalled. Add a debug dump call to one of the tests, so we can see it working. | |||||
| * | tor-rtmock: task: Add API for printing dumps including backtraces | Ian Jackson | 2023-09-13 | 1 | -3/+77 | |
| | | ||||||
| * | tor-rtmock: task: Capture sleep backtraces, with code to dump | Ian Jackson | 2023-09-13 | 1 | -4/+75 | |
| | | | | | Currently nothing actually calls the dumping code. | |||||
| * | tor-rtmock: task: Prepare for ActualWaker::clone taking the data lock | Ian Jackson | 2023-09-13 | 1 | -4/+28 | |
| | | ||||||
| * | tor-rtmock: task: Switch to unsafe RawWaker approach | Ian Jackson | 2023-09-13 | 1 | -5/+83 | |
| | | ||||||
| * | tor-rtmock: task: Add space in data for sleep backtraces | Ian Jackson | 2023-09-13 | 1 | -5/+8 | |
| | | | | | Currently this is just (). | |||||
| * | tor-rtmock: task: Disable traced_test under miri | Ian Jackson | 2023-09-13 | 1 | -2/+4 | |
| | | | | | The tests still run, just without the trace output. | |||||
| * | Add cognitive-complexity exceptions for clippy. | Nick Mathewson | 2023-09-05 | 3 | -0/+3 | |
| | | | | | I have no idea why these became necessary. | |||||
| * | Merge branch 'clippy' into 'main' | Ian Jackson | 2023-08-23 | 4 | -0/+4 | |
| |\ | | | | | | | | | clippy: Suppress needless_pass_by_value in tests See merge request tpo/core/arti!1535 | |||||
| | * | Run maint/add_warning to add lint block everywhere | Ian Jackson | 2023-08-23 | 4 | -0/+4 | |
| | | | ||||||
| * | | tor-rtmock: Relax Sync bound on spawned tasks in MockExecutor | Ian Jackson | 2023-08-23 | 1 | -2/+2 | |
| | | | | | | | | | | | Sync is actually otiose - and I'm about to have some test cases with futures that aren't Sync. | |||||
| * | | tor-rtmock: Expose time_until_next_timeout on MockRuntime | Ian Jackson | 2023-08-23 | 1 | -0/+25 | |
| |/ | ||||||
| * | Run add_warnings on all files. | Nick Mathewson | 2023-08-04 | 1 | -2/+2 | |
| | | ||||||
| * | Run cargo +nightly fmt to format many let ... else ... | Ian Jackson | 2023-07-24 | 1 | -2/+6 | |
| | | | | | | | | | | | | rustfmt has grown opinions about how let ... else ... ought to be formatted. They don't always agree with our previous manual decisions. I think our policy is to always insist on rustfmt. When that version of rustfmt hits stable, our CI will start to fail for everyone. (Right now this discrepancy just causes trouble for contributors who are using nightly by default.) | |||||
| * | Run maint/add_warning to actually apply new lint allows | Ian Jackson | 2023-07-10 | 5 | -0/+5 | |
| | | ||||||
| * | Add exceptions for some cases of diverging_sub_expression | Nick Mathewson | 2023-07-10 | 1 | -0/+1 | |
| | | | | | | | | | See here for documentation on the lint: https://rust-lang.github.io/rust-clippy/master/index.html#/diverging_sub_expression The issue here, from what I can tell, is that the lint triggers whenever you use a diverging expression as a function body within an | |||||
