tests: Make coins_tests/updatecoins_simulation_test deterministic #16225

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:deterministic-updatecoins_simulation_test changing 1 files +3 −0
  1. practicalswift commented at 5:19 PM on June 17, 2019: contributor

    Make coins_tests/updatecoins_simulation_test deterministic.

    Before:

    $ contrib/devtools/test_deterministic_coverage.sh 1000
    [2019-06-15 05:36:20] Measuring coverage, run [#1](/bitcoin-bitcoin/1/) of 1000
    [2019-06-15 05:38:05] Measuring coverage, run [#2](/bitcoin-bitcoin/2/) of 1000
    [2019-06-15 05:39:49] Measuring coverage, run [#3](/bitcoin-bitcoin/3/) of 1000
    [2019-06-15 05:41:38] Measuring coverage, run [#4](/bitcoin-bitcoin/4/) of 1000
    [2019-06-15 05:43:16] Measuring coverage, run [#5](/bitcoin-bitcoin/5/) of 1000
    ...
    [2019-06-16 18:25:23] Measuring coverage, run [#880](/bitcoin-bitcoin/880/) of 1000
    [2019-06-16 18:27:12] Measuring coverage, run [#881](/bitcoin-bitcoin/881/) of 1000
    [2019-06-16 18:29:33] Measuring coverage, run [#882](/bitcoin-bitcoin/882/) of 1000
    [2019-06-16 18:33:00] Measuring coverage, run [#883](/bitcoin-bitcoin/883/) of 1000
    [2019-06-16 18:35:32] Measuring coverage, run [#884](/bitcoin-bitcoin/884/) of 1000
    
    The line coverage is non-deterministic between runs. Exiting.
    
    The test suite must be deterministic in the sense that the set of lines executed at least
    once must be identical between runs. This is a necessary condition for meaningful
    coverage measuring.
    
    --- gcovr.run-1.txt     2019-06-15 05:38:05.282359029 +0200
    +++ gcovr.run-884.txt   2019-06-16 18:37:23.518298374 +0200
    @@ -269,7 +269,7 @@
     test/bloom_tests.cpp                         320     320   100%   
     test/bswap_tests.cpp                          13      13   100%   
     test/checkqueue_tests.cpp                    223     222    99%   169
    -test/coins_tests.cpp                         478     472    98%   52,68,344-345,511,524
    +test/coins_tests.cpp                         478     474    99%   52,68,511,524
     test/compilerbug_tests.cpp                    18      18   100%   
     test/compress_tests.cpp                       27      27   100%   
     test/crypto_tests.cpp                        268     268   100%   
    @@ -401,5 +401,5 @@
     zmq/zmqpublishnotifier.h                       5       0     0%   12,31,37,43,49
     zmq/zmqrpc.cpp                                23       3    13%   16,18,20,23,33-35,37,40-47,51,62,64-65
     ------------------------------------------------------------------------------
    -TOTAL                                      53323   28305    53%
    +TOTAL                                      53323   28307    53%
     ------------------------------------------------------------------------------
    

    After:

    $ contrib/devtools/test_deterministic_coverage.sh 1000
    [2019-06-15 05:36:20] Measuring coverage, run [#1](/bitcoin-bitcoin/1/) of 1000
    [2019-06-15 05:38:05] Measuring coverage, run [#2](/bitcoin-bitcoin/2/) of 1000
    [2019-06-15 05:39:49] Measuring coverage, run [#3](/bitcoin-bitcoin/3/) of 1000
    [2019-06-15 05:41:38] Measuring coverage, run [#4](/bitcoin-bitcoin/4/) of 1000
    [2019-06-15 05:43:16] Measuring coverage, run [#5](/bitcoin-bitcoin/5/) of 1000
    ...
    $
    
  2. tests: Make coins_tests/updatecoins_simulation_test deterministic f8995807e4
  3. MarcoFalke commented at 6:28 PM on June 17, 2019: member

    ACK f8995807e4f08fd0266899e3e227903f06da6ab1 (checked that the randomness state of g_insecure_rand_ctx is the same after three test runs)

    <details><summary>Show signature and timestamp</summary>

    Signature:

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512
    
    ACK f8995807e4f08fd0266899e3e227903f06da6ab1 (checked that the randomness state of g_insecure_rand_ctx is the same after three test runs)
    -----BEGIN PGP SIGNATURE-----
    
    iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
    pUh/+wwAxYNb2M6IZES0gJ6KK9SGZvycjpgARTOB07s3pmAuWh531I8M1XV5RO+u
    v4WVJrhaHWzkuVpU7KKHhNH+9qf96LlV0/zA3vlPi3QGxtrWoY2Sum2FFzLaA9Wr
    Qj8wPTEjZshUN3syrD+bVLHO01RZ0mZCM1ve2mkMNWJgDPAYbJt6HAQ7pM8J0K9U
    dT0UwLncjnLaxLgHEH4GsH9CFi16g3gLFzwB/evNVBUU/aCR9s++wHT/zZEHSXFg
    tp/heV/EDkv7fEO6zFjBZ8NiB/Nsrr0ac7yJu/JBWAXoGoTwZx7HW1dKvqFFloZb
    KQWvLXqFKZRnofBw8gzsBpotkSzegQ31KY/6CGMkVrfDMcsxSKoHW8uqI3I4XpvH
    Tfa5M2acQcbUHz1zi2IglVhZZ0lao6f6rAJkRM8By02h1HRjZqzz9fdvb9b0uYY/
    In8gP+HJ/OuyFiiPwQTlVb8jOrZGn+/Z0OayPVL723gIt102a/l0H3FkMH6sTlZZ
    miQbB9AL
    =Tpp7
    -----END PGP SIGNATURE-----
    

    Timestamp of file with hash 2488b0f07eaf701b85ba2ada131d501c865e3c2cfd81b08cd0cb4180ed9f9e6f -

    </details>

  4. MarcoFalke added the label Tests on Jun 17, 2019
  5. MarcoFalke merged this on Jun 17, 2019
  6. MarcoFalke closed this on Jun 17, 2019

  7. MarcoFalke referenced this in commit 98958c81f5 on Jun 17, 2019
  8. deadalnix referenced this in commit 2c9b8b60c3 on Jun 18, 2020
  9. practicalswift deleted the branch on Apr 10, 2021
  10. PastaPastaPasta referenced this in commit 9f20f829b1 on Jun 27, 2021
  11. PastaPastaPasta referenced this in commit 9d4ddb02c8 on Jun 28, 2021
  12. PastaPastaPasta referenced this in commit e1b37504aa on Jun 29, 2021
  13. PastaPastaPasta referenced this in commit 4665841146 on Jul 1, 2021
  14. PastaPastaPasta referenced this in commit 5ce21eade5 on Jul 1, 2021
  15. PastaPastaPasta referenced this in commit 6774ad990d on Jul 12, 2021
  16. PastaPastaPasta referenced this in commit bde02315f0 on Jul 13, 2021
  17. DrahtBot locked this on Aug 16, 2022

github-metadata-mirror

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

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