Commit Graph

1544 Commits

Author SHA1 Message Date
Trinity Pointard aad54a6969 replace IsolationToken::default with no_isolation 2021-08-18 18:07:56 +02:00
Nick Mathewson c5be8212de Add a split_from() API for infallible creation of Data messages. 2021-08-18 10:56:07 -04:00
Nick Mathewson 38621ea797 Remove panicking cases from tor-cell msg construction 2021-08-18 10:38:04 -04:00
Nick Mathewson cd202f48a7 Document panics in tor-netdir::testnet. 2021-08-18 10:11:50 -04:00
Nick Mathewson 341e3937b4 Revisions based on new documented-panics lint.
I've tried to remove some of possible panics, and improve the
documentation for when the others might occur.
2021-08-18 09:55:39 -04:00
Nick Mathewson ffc27999ef add_warning.py: explain what to do when no args are given 2021-08-18 08:56:44 -04:00
Nick Mathewson 0b6f638517 Add clippy::missing_panics_doc to add_warnings.py. 2021-08-18 08:53:58 -04:00
Nick Mathewson fe5d826942 Merge remote-tracking branch 'origin/mr/60' 2021-08-18 08:53:11 -04:00
Nick Mathewson 6895bc58f3 Merge remote-tracking branch 'origin/mr/61' 2021-08-18 08:49:19 -04:00
Nick Mathewson 9a9c8151e2 More tests for tor_netdir, plus a bugfix and a little refactoring.
(While messing around with test coverage on `in_same_subnet`, I
found that there was a copy-paste error where we were using v4_bits
when v6_bits would have been appropriate.)
2021-08-17 16:42:21 -04:00
S0AndS0 484cc24856 Add the "implicit_clone" lint.
> Check `implicit_clone` section of Clippy documentation for details;
>
>   https://rust-lang.github.io/rust-clippy/master/index.html#implicit_clone

This adds, and addresses, the following Clippy configuration to crates;

    #![deny(clippy::implicit_clone)]

And moves related line within `maint/add_warning.py` file. My intent is to
mitigate extra edits after merging, so please let me know if I need to do this
last bit differently.
2021-08-17 11:49:39 -07:00
Nick Mathewson a484d911a8 Make construct_netdir() return a PartialNetDir.
This way we can still use it even if we've removed too many
microdescriptors to make a real network.
2021-08-17 14:28:02 -04:00
Nick Mathewson 46519d87d7 Test Netdir behavior with BadExit flag. 2021-08-17 14:24:31 -04:00
Nick Mathewson aa942f33b5 Make MicrodescBuilder implement Debug and Clone 2021-08-17 14:24:31 -04:00
Nick Mathewson 1a65448eb5 Re-work the test network generator to take a customization function. 2021-08-17 14:24:31 -04:00
Nick Mathewson 3d550b73c2 X_m tiebreaker rules are now specified 2021-08-17 09:33:42 -04:00
Nick Mathewson 910f0bf556 Update tor-netdir path fractions to avoid NaN. 2021-08-16 12:19:42 -04:00
Nick Mathewson aa765c8869 Remove SPEC note in tor-consdiff: dir-spec has been updated. 2021-08-16 11:49:44 -04:00
Nick Mathewson fe1ca7d4db Note SPEC statuses in tor-netdoc 2021-08-16 11:40:33 -04:00
Nick Mathewson 048134d7de Remove some notes about SPEC issues that are now resolved. 2021-08-16 11:32:26 -04:00
Nick Mathewson a4773c9fc4 Make PaddingNegotiate parsing match C tor. 2021-08-16 11:13:05 -04:00
Nick Mathewson eb1ae9ce25 More channel-cell coverage.
"Every little helps": This gets tor-cell coverage over 90%.
2021-08-16 11:04:05 -04:00
S0AndS0 b5a58f5871 Add the "missing_panics_doc" lint.
> Check `missing_panics_doc` section of Clippy documentation for details;
>
>   https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc

This adds the following Clippy configuration to crates;

    #![deny(clippy::missing_panics_doc)]

And adds necessary doc-comments to methods that may panic.
2021-08-13 15:11:04 -07:00
Nick Mathewson 9c6dd27ca1 Use add_warnings.py for clippy::cast_lossless 2021-08-13 11:36:14 -04:00
Nick Mathewson 7af73d4e81 Merge remote-tracking branch 'origin/mr/59' 2021-08-13 11:32:59 -04:00
Nick Mathewson 6a3fdbcda1 More test cases for tor_cell::relaycell::msg 2021-08-13 10:41:59 -04:00
Nick Mathewson f21fc355fc Comment fixes in tor_cell::err 2021-08-13 10:40:53 -04:00
Nick Mathewson 18341920f7 Misc fake coverage improvements
These aren't true coverage improvements; they're just either
improving the coverage of test code, or telling the coverage tool
that it shouldn't worry about code in the fuzzers.
2021-08-13 09:54:01 -04:00
Nick Mathewson 8e00ed6f2e Improve test coverage on tor-units 2021-08-13 09:27:00 -04:00
Nick Mathewson 9bd6670bcf Restore success and failure counts with timeout state. 2021-08-13 08:55:16 -04:00
S0AndS0 657e7b2246 Add the "cast_lossless" lint.
> Check `cast_lossless` section of Clippy documentation for details;
>
>   https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless

This adds the following Clippy configuration to crates;

    #![deny(clippy::cast_lossless)]

And applies suggested Clippy and `cargo fmt` fixes.
2021-08-12 17:25:15 -07:00
Nick Mathewson d2172b518d Merge commit 'origin/mr/46^' 2021-08-12 15:29:55 -04:00
Nick Mathewson bb45c5e932 Fix a few rustdoc link warnings. 2021-08-12 11:16:50 -04:00
Nick Mathewson f87a4987be Merge remote-tracking branch 'origin/mr/58' 2021-08-12 11:07:16 -04:00
Nick Mathewson b6e07ce5bf Fix documentation link issues. 2021-08-12 11:02:50 -04:00
Lennart Kloock 420c00d83f
Fix code snippet in tor-persist docs 2021-08-12 17:01:29 +02:00
Nick Mathewson cac8c29abd Use real network parameter values to tune test circuits.
Finishes #145.
2021-08-12 10:45:51 -04:00
Nick Mathewson 7aa964a141 Periodically launch timeout-testing circuits.
Our path-spec says that, if we don't have enough build-time data to
make a good estimate for our timeouts, we should periodically try
launching testing circuits just to see how long they take to build.

Here we implement that.  The implementation is a bit wonky because
of how our crates are factored; see arti#161 for more info.

Closes #145.

Closes #57.
2021-08-12 10:30:04 -04:00
Lennart Kloock beee8c4626
Fix code snippet in arti docs 2021-08-12 16:08:28 +02:00
Lennart Kloock 5c075be5c4
Fix warning sign emoji in tor-client doc 2021-08-12 16:01:22 +02:00
Lennart Kloock fe462c832c
Reorder doc headlines in tor-circmgr 2021-08-12 15:36:34 +02:00
Lennart Kloock d929ce02ae
Fix typos in tor-chanmgr 2021-08-12 15:30:32 +02:00
Lennart Kloock feccd209a8
Add brackets and remove colon for better consistency 2021-08-12 15:06:28 +02:00
Nick Mathewson d8ad0e4609 WIP: Launch testing circuits as needed to find timeouts
This won't work yet, since it needs directories and doesn't have them.
2021-08-11 15:02:39 -04:00
Lennart Kloock f2063d2810
Rerun readmes.sh 2021-08-11 20:10:36 +02:00
Lennart Kloock 02a5a1c92d
Sync docs with readmes 2021-08-11 20:08:24 +02:00
Lennart Kloock 9ff8a0ff0e
Fix code snippet in tor-socksproto README.md and docs 2021-08-11 19:33:34 +02:00
Nick Mathewson 3dc951193a For timeout testing, support for "useless" circuits.
We need the idea of launching a circuit for timeout testing, and
getting something that either exits someplace or exits noplace at all.
2021-08-11 13:26:33 -04:00
Lennart Kloock c886e7926e
Fix typos in tor-protover README.md and docs 2021-08-11 19:10:56 +02:00
Nick Mathewson 474398a7b4 tor-client: remove workaround now that #155 is in. 2021-08-11 13:06:23 -04:00