This allows the new, nightly-only, `--branch` argument to
get everywhere it needs to. That enables branch coverage
tracking.
Example use:
$ ./admin/coverage --branch --html --open
To allow for easy running and simplification of benchmarking, add cargo
build to the bench measure.
Also add .PHONY for recipes with no output that are always expected to
run.
* Describe why crypto providers exist, how they are chosen
* Enumerate the built-in providers and associated feature flags
* Link to third-party providers we're aware of
* Add some documentation about implementing a custom provider
The `admin/format-bench` script has bitrot so that it no longer
functions with the current output produced by the benchmark tooling.
It's not clear that this tool is still needed, so rather than fix it or
port it to Rust, we choose to remove it outright.
If it turns out there is a need for formatting benchmarking output we
should consider building that into the benchmark tool itself to avoid
needing to deal with a Python tool-chain and associated versioning
challenges.
Prior to this commit the admin `bench-range`, `capture-certdata` and
`format-bench` Python helpers used a hardcoded path to Python3 in their
shebang. This commit updates each to use `/usr/bin/env` to find
`python3` in the `$PATH`.
These helpers also used Python2 style `print` statements instead of the
Python3 style `print` function. This commit adds the required braces to
fix Python3 usage.
Prior to this commit some helper scripts used hardcoded paths to
`/bin/sh` and `/bin/bash` in script shebangs. This will error on systems
that don't place `bash` in `/bin/` (e.g. NixOS).
This commit updates the scripts to use `/usr/bin/env` to find `bash`
based on the user's `$PATH`. This has better portability and allows the
scripts to run without err (or specifying an interpreter explicitly) on
systems with atypical `bash` installs.
These tests are redundant with the Bogo "CurveTest-" tests. Of those,
only the ones that are testing unsupported curves are disabled:
```
"CurveTest-Client-P-521-TLS12": "",
"CurveTest-Server-P-521-TLS12": "",
"CurveTest-Client-Compressed-P-521-TLS12": "",
"CurveTest-Server-Compressed-P-521-TLS12": "",
"CurveTest-Client-P-521-TLS13": "",
"CurveTest-Server-P-521-TLS13": "",
"CurveTest-Client-Compressed-P-521-TLS13": "",
"CurveTest-Server-Compressed-P-521-TLS13": "",
```
Make it easier to find the {Client,Server}CertVerifier tests. Split
them into separate files so that we can use `diff` to compare how we're
testing each.
This removes all of the `dangerous_configuration` tests from tests/api.rs.
Each of the mock Client/Server verifiers were eached move into the single test
suite that uses it.
Use these commands with a whitespace-smart diff tool to see that the tests
were not modified except for whitespace and formatting:
```
git difftool HEAD^1:rustls/tests/api.rs rustls/tests/server_cert_verifier.rs
git difftool HEAD^1:rustls/tests/api.rs rustls/tests/client_cert_verifier.rs
git difftool HEAD^1:rustls/tests/common/mod.rs rustls/tests/client_cert_verifier.rs
git difftool HEAD^1:rustls/tests/common/mod.rs rustls/tests/server_cert_verifier.rs
```
Serialize all tests that use `std::env::set_var` & isolate them. See the
comments in key_log_file_env.rs for details.
Also add notes about the fact that these tests aren't really testing the
functionality.
Use a whitespace-smart diff tool to compare the new file to what was in
api.rs:
```
git difftool HEAD^1:rustls/tests/api.rs rustls/tests/key_log_file_env.rs
```
Upstream removed -Zno-landing-pads; unfortunately there's still
no better coverage tooling.
Fortunately -Cpanic=abort is now feasible for tests thanks to
-Zpanic-abort-tests.
To me, it's intuitive that `cargo test --no-default-features`
should run the tests for all subcrates in a workspace, building
each subcrate without its default features.
In fact, this doesn't work and has never worked. And now it's
explicitly rejected in nightly.
Tracked upstream as rust-lang/cargo#4753