Commit Graph

94 Commits

Author SHA1 Message Date
Joseph Birr-Pixton ce3d12a933 Replace manual feature computations with python script
Inspired by actix/actix-net's justfile.
2024-05-21 07:16:33 +00:00
Joe Birr-Pixton 03e44999a5 admin/coverage: pass script args to all llvm-cov calls
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
2024-03-20 16:28:08 +00:00
Simon Tate b3750ee835 Add auto build to bench-measure
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.
2024-03-19 08:41:19 +00:00
Joe Birr-Pixton cf098b08d3 Cargo.toml: disentangle std/aws_lc_rs features 2024-02-28 20:27:34 +00:00
Joseph Birr-Pixton 3f0e0fc66f Fix broken link to `CryptoProvider` 2024-02-19 11:05:47 +00:00
Joseph Birr-Pixton e2c5276cac Update manual::features and refer to it 2024-02-19 11:05:47 +00:00
Sean McGrail 6bd851e72e Add 'fips' Cargo feature
Add `rustls::crypto::default_fips_provider()` behind this
feature.
2024-02-02 16:57:39 +00:00
Daniel McCarney d9d0879432 docs: add more documentation on crypto providers
* 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
2024-01-18 15:18:26 +00:00
Joseph Birr-Pixton c8c46bea4d Run bogo against both ring and aws-lc-rs providers 2023-11-21 09:58:03 +00:00
Dirkjan Ochtman 78c8ff4d96 Use Cargo.lock for CI builds 2023-09-26 13:38:35 +00:00
Daniel McCarney 25bc1b3ecd chore: delete admin/format-bench.
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.
2023-03-03 22:08:14 +01:00
Daniel McCarney 2149288539 fix: avoid hardcoded python3 path, fix prints.
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.
2023-03-02 10:28:10 +01:00
Daniel McCarney 44bac99c6e fix: avoid hardcoded (ba)sh path in helper scripts.
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.
2023-03-02 10:28:10 +01:00
Joseph Birr-Pixton 6087246dbf Measure coverage using cargo-llvm-cov
This deletes quite a bit of ad-hoc scripting that is
replaced by llvm-cov.
2022-12-31 13:23:01 +00:00
Francis Russell 4e6fe619c1 Update `pull-usage` script. 2022-10-31 10:21:28 +01:00
Joseph Birr-Pixton 8f10338d53 Use absolute path to admin/llvm-gcov 2022-08-15 15:45:22 +02:00
Dirkjan Ochtman f2e4d88d05 Use stable instrument-coverage flag 2022-08-15 15:45:22 +02:00
Dirkjan Ochtman 00486d39a0 Use Python 3 to run coverage script 2022-08-15 15:45:22 +02:00
Dirkjan Ochtman 6b8de51b26 Upgrade coverage LLVM to 15 to track nightly Rust 2022-08-15 15:45:22 +02:00
Brian Smith 71c902cd5e Use LLVM 14 for code coverage.
Rust Nightly recently upgraded to LLVM 14, and coverage jobs in CI
are currently broken. Fix them by upgrading to LLVM 14.
2022-02-19 08:15:08 +01:00
Brian Smith 50f2c6c266 Remove redundant rustls-mio/tests/{client,server}_suites.rs tests.
These are now redundant with the Bogo tests.
2022-01-26 22:41:04 +01:00
Brian Smith b849ef1c90 Remove redundant rustls-mio/tests/curves.rs.
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": "",
```
2022-01-26 22:10:54 +01:00
Brian Smith 0fe3052208 Tests: Move dangerous_configuration` cert verifier tests into separate suites.
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
```
2022-01-25 10:28:44 +01:00
Brian Smith 8c203e1500 Restore thread-safety to the integration test suite w.r.t. `env::set_var`.
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
```
2022-01-22 11:27:08 +00:00
Joseph Birr-Pixton 7f7bf75ff3 List 0-RTT data as a supported feature. 2022-01-15 12:12:16 +00:00
Dirkjan Ochtman 6628e54651 Use stable rustfmt in CI 2021-09-12 17:48:00 +02:00
Joseph Birr-Pixton 19357c4028 Track nightly's move to LLVM13 2021-08-28 13:51:30 +01:00
Dirkjan Ochtman 6e05d9222e Adapt to changed rustc unstable option handling 2021-07-23 14:12:27 +01:00
Joseph Birr-Pixton b65b466f6c Fix coverage measurements
Bogo tests were being excluded, since 035178d3.
2021-04-09 11:02:24 +01:00
Dirkjan Ochtman f9b8d68d10 Pin rustfmt and nightly revision used to build it 2021-04-06 12:23:05 +01:00
Joseph Birr-Pixton 394f241039 Update verifybench test data 2021-04-01 19:17:55 +01:00
Dirkjan Ochtman 222d757da5 Pass through arguments to admin/fmt 2021-03-31 21:57:17 +02:00
Dirkjan Ochtman a8012e4afd admin/fmt: fix path to fmt binaries 2021-03-31 21:57:17 +02:00
Dirkjan Ochtman 9ceff5e988 Add fmt script to admin dir 2021-03-27 13:47:49 +00:00
Joseph Birr-Pixton a5b3e35f45 Remove azure and improve github actions
Maintaining two of these is pretty annoying, and github actions
seems to be pretty good quality.
2021-03-14 17:08:13 +00:00
Dirkjan Ochtman 8ebe493675 Check LLVM version in coverage script (see #551) 2021-03-12 21:07:03 +00:00
ctz f9e1dd3566
Install llvm 12 for coverage build
Rust nightly seem to have moved to LLVM 12 recently.
2021-03-11 19:29:56 +00:00
Joseph Birr-Pixton 7a0d32560c Remove coverage from azure pipelines 2020-12-23 13:15:21 +00:00
Joseph Birr-Pixton 4ce9a1baab Install and use llvm11 for coverage tooling 2020-10-25 09:02:17 +00:00
Joseph Birr-Pixton 1d84ad77d4 Try out github actions 2020-07-04 15:10:56 +01:00
Andrew Bennett 7e993dcd6b WIP - change admin/coverage to point to llvm-7 instead of llvm-3.8 2020-06-20 16:35:09 +01:00
Andrew Bennett fad4101b91 WIP - sudo already available on Azure Pipelines (maybe?) 2020-06-20 14:42:39 +01:00
Andrew Bennett 262c61b301 WIP - sudo is needed 2020-06-20 14:42:39 +01:00
Andrew Bennett 1a117807b0 WIP - ensure build-essentials are installed prior to running tests on azure pipelines 2020-06-20 14:42:39 +01:00
Andrew Bennett 9ca4933470 WIP - bump container image versions for OpenSSL 1.1.1 support 2020-06-20 14:42:39 +01:00
Joseph Birr-Pixton 6f252aa812 Fix coverage: output binaries have moved in nightly 2020-06-08 21:23:50 +01:00
Joseph Birr-Pixton cb397f0e15 Test detection of truncated handshake messages 2020-05-08 16:55:34 +01:00
Joseph Birr-Pixton b2fa83cada Fix coverage build
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.
2020-05-03 11:34:02 +01:00
Joseph Birr-Pixton d132d48a23 Work around bug in cargo workspaces
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
2019-10-27 05:00:18 -07:00
Joseph Birr-Pixton f53300ff83 Assorted README/scripts fixes 2019-08-25 10:33:52 +01:00