Recalibrate unit tests #1036

issue sipa opened this issue on December 7, 2021
  1. sipa commented at 8:04 PM on December 7, 2021: contributor

    The tests (src/tests.cpp and included modules) consist of some tests whose runtime is independent of the TEST_ITERS variable, and some which are. The ones that are independent take a significant amount of time (compared to the other ones, at a normal TEST_ITERS level). The ones that do depend on it do so in a rather inconsistent way.

    So to improve upon that:

    • Turn constant-time tests into TEST_ITERS-proportional ones were possible.
    • Perhaps disable some very slow constant-time ones entirely at very low TEST_ITERS levels.
    • Run benchmarks on each of the proportional ones, and adjust to make sure they all get a somewhat representative amount of runtime in typical configurations.
  2. real-or-random commented at 10:27 AM on December 9, 2021: contributor

    gprof of ./tests 1 shows that the new test_ecmult_constants() tests is indeed very heavy.

    gprof-tests1.txt

Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 11:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me