Commit Graph

84 Commits

Author SHA1 Message Date
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
Joseph Birr-Pixton 1d70e45af6 Move to using cargo workspaces
- rustls (the library) now lives in rustls/
- the mio examples/tests continue to live in rustls-mio, but
  are built by (eg) `cargo test` in the root of the repo.
2019-08-24 20:55:20 +01:00
Joseph Birr-Pixton 666a2cbd2a Update minimum rustc version to 1.36(!) 2019-07-22 21:21:19 +01:00
Joseph Birr-Pixton df8e45bf11 Tidy up bench-measure.mk 2019-07-03 21:30:42 +01:00
Joseph Birr-Pixton 6a47cd5cb4 Import rustup.yml and deal with preexisting rustup 2019-06-17 20:57:31 +01:00
Joseph Birr-Pixton 708b0a2ef7 Benchmark memory usage 2019-06-16 20:57:14 +01:00
Joseph Birr-Pixton 3e0e2e70d9 Benchmark TLS13 too 2019-06-01 18:03:39 +01:00
Joseph Birr-Pixton cbc4b2f0b6 Add azure minimal-versions checks 2019-05-27 18:26:31 +01:00
Joseph Birr-Pixton 3d33dd2bb0 Fix on lcov 1.14 2019-05-27 18:18:34 +01:00
Joseph Birr-Pixton a66884131e Fix path for benchmarks on Windows 2019-03-10 16:40:07 +00:00
Joseph Birr-Pixton 7597818244 Run bogo 2019-03-10 13:55:12 +00:00