Commit Graph

1584 Commits

Author SHA1 Message Date
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
Nick Mathewson 100042b85d Add ability to launch a circuit to _some_ exit, without giving ports.
We'll want this for testing circuits and for RESOLVE requests.

Closes #155.
2021-08-11 13:03:24 -04:00
Nick Mathewson b4bb082153 Add functions to check whether port policies are nonempty. 2021-08-11 12:32:21 -04:00
David Goulet f9c23bc376 fallbackdir: Regenerate list
Closes #160

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-08-11 09:15:55 -04:00
Nick Mathewson f2be513fe6 Bump to latest arti-corpora. 2021-08-11 08:51:35 -04:00
Nick Mathewson 648a822e3a Upgrade to latest fslock and use its per-fd exclusion feature.
The latest version of the fslock crate has an optional feature that
allows file-locks to exclude one another even if they are opened
within the same process.  On Windows this behavior comes for free;
on Unix it depends on an internal map of (dev,inode) pairs.

Here we upgrade to the latest version of the fslock crate, and use
this feature.
2021-08-11 07:15:08 -04:00
Lennart Kloock ea21b95dcc
Fix previously fixed typos in docs too 2021-08-10 22:28:11 +02:00
Lennart Kloock 5f202a30fd
Fix a typo in tor-rtmock README.md
Remove a '#'
2021-08-10 21:39:07 +02:00
Lennart Kloock 1186de6df8
Fix a few typos in tor-rtcompat README.md 2021-08-10 21:24:39 +02:00
Lennart Kloock 10226872a0
Fix typo in tor-rtcompat README.md
Change 'if' to 'is'
2021-08-10 21:12:24 +02:00
Nick Mathewson 5f7f845d60 Use the correct unused-circuit timeout when we're learning timeouts. 2021-08-10 15:06:22 -04:00