Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: local test speed optimizations, add cargo hack feature powerset #176

Merged
merged 5 commits into from
Sep 13, 2023

Commits on Sep 13, 2023

  1. verify_cert: slim down test_too_many_path_calls

    The `test_too_many_path_calls` unit test artificially inflates the
    budget for signature validation operations so that it can easily force
    quadratic path building runtime, up to the default `build_chain_calls`
    budget.
    
    As a result this test takes a long time relative to our other unit
    tests: it completes in ~3s while the entire project test suite without
    this test and the bettertls tests in 0.6s.
    
    This commit adjusts the test to use a lower-than-default
    `build_chain_calls` budget. This lets us test the mechanics of the
    budget are working as intended, without having to expend a lot of
    runtime to run up the budget to the large default.
    cpu committed Sep 13, 2023
    Configuration menu
    Copy the full SHA
    ad732ef View commit details
    Browse the repository at this point in the history
  2. bettertls: make test suite opt-in

    The Netflix bettertls test suite for pathbuilding and name constraint
    validation take an outsized amount of runtime compared to our other
    tests. These tests can take ~8s locally and the entire project test
    suite with these tests ignored can be run in 0.6s.
    
    This commit adds an `#[ignore]` flag so it won't be run by
    default. We will opt-in to running this test in CI w/ `cargo test --
    --ignored`.
    cpu committed Sep 13, 2023
    Configuration menu
    Copy the full SHA
    6a9e318 View commit details
    Browse the repository at this point in the history
  3. tests: rename better_tls test to path_building

    The `better_tls` unit test in the `better_tls.rs` integration test
    module was named before we added the `name_constraints` unit test. This
    commit renames the `better_tls` unit test to `path_building` to reflect
    that it runs the path building testsuite from bettertls.
    cpu committed Sep 13, 2023
    Configuration menu
    Copy the full SHA
    52ba3ed View commit details
    Browse the repository at this point in the history
  4. ci: run ignored tests in CI

    We ignore the bettertls path building and name constraint test suites
    because they take longer than the rest of the webpki test suite, bogging
    down local development.
    
    In the context of CI we don't mind that extra runtime (on the order of
    ~15..30s) so this commit updates the CI configuration to always run
    ignored tests alongside the rest of the test suite.
    cpu committed Sep 13, 2023
    Configuration menu
    Copy the full SHA
    ac03e85 View commit details
    Browse the repository at this point in the history
  5. ci: add cargo hack feature powerset test

    This commit updates CI to use `cargo hack` to test the feature powerset,
    ensuring that we can catch feature interplay related breakages early.
    
    Unlike w/ the main Rustls repo the webpki powerset is small and the test
    completes in <30s, so it's fair to include in the default CI instead of
    needing to be separated into a separate daily tests workflow.
    cpu committed Sep 13, 2023
    Configuration menu
    Copy the full SHA
    dc8f5d8 View commit details
    Browse the repository at this point in the history