| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
Fixes #948
|
| | |/ / / / |
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Throughout: Use event_report!() macros for reporting Errors.
Closes #949
See merge request tpo/core/arti!1383
|
| | | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
I identified the cases to replace by searching for the string
`.report()`. There are a few that I didn't change:
* A couple of cases that used anyhow::Error,
* One case that reported two Errors.
* Two cases in `tor_hsclient::err` that just did
`error!("Bug: {}")`.
I have also not audited the cases in `tor-hsclient` where we're using
`tor_error::Report` manually.
Nonetheless, closes #949.
|
| | | | | | |
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
tor-error: tracing module: Use macro to generate macros
See merge request tpo/core/arti!1386
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This abolishes some quintuplication.
The output is identical except that:
* The syntax display in the rustdoc output for the resulting macros
seems to have somewhat less whitepsace.
* The whimsical error messages in the examples are all identical.
Ah well.
|
| | |/ / / / |
|
| |\ \ \ \ \
| |/ / / /
|/| | | |
| | | | |
| | | | | |
rng ranges: Use inclusive Duration ranges in several places
See merge request tpo/core/arti!1385
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Many of these call sites would panic if, somehow, the upper bound was
zero. In most cases it is very complicated to see if whether this
could happen.
However, there is a better answer:
Durations are (conceptually) dense, so picking the closed set (which
includes its boundary) rather than the open one (which doesn't) will
make little practical difference.
So change four call sites to use `..=` instead of just `..`.
|
| |\ \ \ \ \
| |/ / / /
|/| | | |
| | | | |
| | | | | |
Optional tracing support in tor-error for error reporting
See merge request tpo/core/arti!1379
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
(Also, document that this static assertion is the reason why you are
seeing a confusing error message.)
|
| | | | | |
| | | | |
| | | | |
| | | | | |
This simplifies our logging a little, and implements part of
|
| | |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The main contribution here is a set of convenience macros for
logging error `Report`s. Notably, this macros always logs
`Internal` and `BadAspiUsage` errors at `WARN`, unless they
are already at `ERROR` or more.
This is a little tricky because `tracing::event!()` requires
its Level argument to be a constant.
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
add_warning: Tolerate clippy::missing_panics_doc
Closes #950
See merge request tpo/core/arti!1380
|
| | | | | |
| | | | |
| | | | |
| | | | | |
These are no longer needed.
|
| | |/ / /
| | | |
| | | |
| | | | |
Closes #950.
|
| |\ \ \ \
| |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | | |
Fix various warnings from clippy nightly
Closes #943
See merge request tpo/core/arti!1369
|
| | | | |
| | | |
| | | |
| | | | |
This appeases clippy-nightly.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Clippy nightly doesn't like `#[cfg(all(...))]` with only a single
expression inside the `all(...)`.
This requires an adjustment in check_doc_features.
|
| | |/ /
| | |
| | |
| | | |
This is a new warning^Wsuggestion from clippy nightly.
|
| | | | |
|
| | | |
| | |
| | |
| | | |
These are always the same and probably always will be.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
Introduce a MockExecutor for fully-isolated test cases
See merge request tpo/core/arti!1375
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1375#note_2919976
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
Discussion:
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1375#note_2919928
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
Requested by:
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1375#note_2919926
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
This seems to have been overlooked.
|
| | | | |
| | | |
| | | |
| | | | |
This isn't used any more.
|
| | | | |
| | | |
| | | |
| | | | |
Run rustfmt.
|
| | | | |
| | | |
| | | |
| | | | |
This abolishes a bodge sleep. It should make the tests deterministic.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Now we can reliably wait precisely for the tasks to be all waiting.
This test case no longer involves any real executor.
|
| | | | |
| | | |
| | | |
| | | | |
In both fallible and infallible variants, for convenience.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We want MockNetProvider to be Default.
In this commit: impl Default for MockNetwork and use it in new().
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
Pick an arbitrary start time roughly now. This will do for many
tests.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
This deduplicates some imports, which would otherwise be about to
become triplicated.
|