Commit Graph

1868 Commits

Author SHA1 Message Date
Nick Mathewson 31b385c5b2 Resolve roughly half of the XXXXs.
We want to only use TODO in the codebase for non-blockers, and open
tickets for anything that is a bigger blocker than a TODO.  These
XXXXs seem like definite non-blockers to me.

Part of arti#231.
2021-12-06 15:11:03 -05:00
Nick Mathewson e25c2d991e Start a TROUBLESHOOTING.md with known compilation issues. 2021-12-06 09:35:06 -05:00
Nick Mathewson 66d5f73b9c tor-linkspec: Remove redundant method; add more tests.
The redundant method was a `to_owned` that probably shouldn't have
been called that.  It was only used in one place.

The tests should get tor-linkspec's line coverage up above 90%.
2021-12-04 15:42:53 -05:00
Nick Mathewson 214c251e41 Remove the unused "Error" type from caret.
This was a relic of the old, now-unused "caret_enum!" macro.
Removing it gets caret's coverage to 100%.

Yes, technically this is a semver breaker on caret.
2021-12-04 15:13:43 -05:00
Nick Mathewson 68d4070038 Idle hacking: Get 90% coverage in tor-llcrypto
For this one I just wrote some "are things completely broken" tests
for the rand_compat wrappers. These won't detect subtle biases in
the RNGs! They'll only let you know if the wrappers have screwed up
in some way that always sets a given bit to 1 or 0.
2021-12-02 18:58:35 -05:00
Nick Mathewson 04d99ff1d0 Idle hacking to get 90% coverage in arti-config
This is just a matter of writing a few tests for some very easy
functions.
2021-12-02 18:55:30 -05:00
Nick Mathewson 2ee620ec46 Idle hacking to get tor-socksproto line coverage over 90%
This was just a matter of adding a call to one function.
2021-12-02 18:52:58 -05:00
Nick Mathewson d582b1c439 Python does not have quadruple-quote.
Fix a bug in postprocess_coverage.py that stuck a big row of '
characters in its output.
2021-12-02 17:38:27 -05:00
Nick Mathewson 99a046da46 Get tor-units grcov line coverage to 100%
This is mostly a finger exercise, and an experiment in "what does
grcov consider to be coverage".  Here's what I've found out...

* In grcov's eyes, most #[derive(Foo)] lines count as containing code;
  but calling any one derived function counts as calling those lines.

* Unlike with tarpaulin, it is actually possible to reach 100% grcov
  line coverage.  (Tarpaulin likes to pick "}" lines and tell you that
  you never reached them; or sometimes it picks expression
  statements that have the effect of a return, and tells you that
  they're unreached.  Even with these tests, tarpaulin claims that
  the line coverage of tor-units is only 97.3%.)

* In rust, it may be a bit hopeless trying to get high function
  coverage. Even though we've hit every line of the tor-units crate,
  the function coverage from its own tests is only 9.38% (55.41%
  from other crates).  I think this is probably due to derived
  functions, or maybe due to generics getting instantiated?
  I've got no idea; the denominator for the function coverage
  lines fluctuates oddly.
2021-12-02 17:08:22 -05:00
Nick Mathewson 47614ee737 Implement Eq,PartialEq for BoundedInt32. 2021-12-02 16:40:22 -05:00
Nick Mathewson 047f0fb571 Merge remote-tracking branch 'origin/mr/165' 2021-12-02 15:29:04 -05:00
eta dbc801f256 Merge branch 'postprocess_coverage' into 'main'
Postprocess coverage index.html with python instead

Closes #249

See merge request tpo/core/arti!163
2021-12-02 10:46:02 +00:00
Neel Chauhan f5362028b4 Remove dir_port from RouterStatusBuilder 2021-12-01 21:51:49 -08:00
Nick Mathewson 14eeff00ef Postprocess coverage index.html with python instead
This change jettisons the awk and ed dependencies and instead uses a
real HTML parser, via the BeautifulSoup library in python.

Using BeautifulSoup lets us do trickier stuff, like actually
extracting the coverage totals and adding our own table, with
per-crate coverage.

The script only does this post-processing when it finds python3; the
script exits with an error if BeautifulSoup isn't installed.
2021-12-01 12:02:53 -05:00
eta a4ec8476a7 Merge branch 'tor-dirmgr' into 'main'
Don't warn in bootstrap_from_config when error is  Error::ManagerDropped

See merge request tpo/core/arti!157
2021-12-01 13:00:39 +00:00
eta 740b798f69 Merge branch 'weightkind-bitflags' into 'main'
tor-netdir: Use bitflags for WeightKind

See merge request tpo/core/arti!161
2021-12-01 13:00:16 +00:00
Neel Chauhan d586925388 tor-netdir: Use bitflags for WeightKind 2021-11-30 15:16:12 -08:00
Nick Mathewson d3aecd5192 Add a semicolon. 2021-11-30 15:43:21 -05:00
Nick Mathewson c2804419ab Add constructor for TorAddr, to enforce port != 0
This makes sure that we're checking for a nonzero port in all cases.
2021-11-30 15:41:19 -05:00
Nick Mathewson 08267147ec Merge remote-tracking branch 'origin/mr/156' 2021-11-30 15:21:02 -05:00
Nick Mathewson c733374693 Merge remote-tracking branch 'origin/mr/154' 2021-11-30 14:12:08 -05:00
Nick Mathewson e2a7289aa7 Add comments about the absence of tap_key in microdesc. 2021-11-30 14:05:13 -05:00
Nick Mathewson 9afe5c09e7 Merge remote-tracking branch 'origin/mr/151' 2021-11-30 14:03:46 -05:00
Nick Mathewson d4ebda8e2a Note non-breaking API change in tor-proto. 2021-11-30 14:00:00 -05:00
Nick Mathewson 8dde60ca60 Merge remote-tracking branch 'origin/mr/160' 2021-11-30 13:57:43 -05:00
Nick Mathewson a49ee4d5f4 Merge remote-tracking branch 'origin/mr/159' 2021-11-30 13:53:53 -05:00
Nick Mathewson bafd56c461 Clear semver_status log now that 0.0.2 is out. 2021-11-30 12:58:29 -05:00
eta 9a94f72e42 Add tests & address review commentary 2021-11-30 16:58:08 +00:00
eta 9d0ede2680 Merge branch 'license' into 'main'
Add MIT and Apache licenses

Closes #243

See merge request tpo/core/arti!152
2021-11-30 14:38:38 +00:00
Nick Mathewson 0c7d83b0cd Add dagon to the acknowledgments section for 0.0.2--no-verify 2021-11-30 09:19:44 -05:00
Nick Mathewson 92c56eaa83 One more "cargo update" before the release. 2021-11-30 09:17:31 -05:00
Nick Mathewson 3b072c5420 Merge branch 'readme_fixes' 2021-11-30 09:12:51 -05:00
dagon 0162ea8210 Example needs to be the same as the readme 2021-11-30 09:09:42 -05:00
dagon bd1c37fe8a MR review feedback 2021-11-30 09:09:42 -05:00
dagon e0489328f6 fix arti-client doc example 2021-11-30 09:09:42 -05:00
dagon c2d357988c fix example for retry-error 2021-11-30 09:09:42 -05:00
Nick Mathewson b28adb31a8 Fixes for CHANGELOG.md 2021-11-30 09:07:36 -05:00
dagon 0c10f4ea0b add constructors 2021-11-30 23:51:03 +10:00
Nick Mathewson b9ad2f917c Fix a documentation link. 2021-11-30 08:37:21 -05:00
Nick Mathewson 320fa67aa2 Merge branch 'simplify_config_helpers' 2021-11-30 08:34:34 -05:00
dagon 9a8d883f35 remember utf8 check 2021-11-30 23:26:47 +10:00
dagon 0122e15339 dont warn on bootstrap error when error == manager dropped 2021-11-30 21:50:27 +10:00
Nick Mathewson c5181dc7f0 Fix a bad rustdoc reference. 2021-11-29 21:04:40 -05:00
eta 2920a4d084 Merge branch 'simplify_config_helpers' into 'main'
Change sane_defaults() and with_directories()

See merge request tpo/core/arti!155
2021-11-29 20:42:28 +00:00
Nick Mathewson eef81d9d57 Bump every crate by one patch version. 2021-11-29 15:21:58 -05:00
Nick Mathewson f0260e7475 script to tell which crates have changed since last release. 2021-11-29 15:17:51 -05:00
Nick Mathewson b749ffb4a0 More changelog entries for 0.0.2 2021-11-29 15:08:50 -05:00
Nick Mathewson 805e558045 Run "cargo update" to get latest versions.
Also fix a couple of warnings introduced by now-unneeded imports
with new ed25519 crate.

This is part of the process for releasing our next version.
2021-11-29 14:52:53 -05:00
Nick Mathewson 8466dcf2ae Run "cargo update" to get latest versions.
Also fix a couple of warnings introduced by now-unneeded imports
with new ed25519 crate.

This is part of the process for releasing our next version.
2021-11-29 14:45:50 -05:00
Nick Mathewson f107794b74 Change sane_defaults() and with_directories()
The sane_defaults() call is now the same as you get from a default
builder: by convention, we just call that method Default::default().

The with_directories() constructor makes more sense as a constructor
for the TorClientConfigBuilder than for TorClientConfig.
2021-11-29 14:20:34 -05:00