tests: Make test updatecoins_simulation_test deterministic #15327

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:SeedInsecureRand(true); changing 1 files +2 −0
  1. practicalswift commented at 6:35 pm on February 2, 2019: contributor

    Make test updatecoins_simulation_test deterministic.

    Can be verified using contrib/test_deterministic_coverage.sh introduced in #15296.

    Related:

    • #15296: “tests: Add script checking for deterministic line coverage in unit tests”
    • #15324: “test: Make bloom tests deterministic”
    • #14343: “coverage reports non-deterministic”
  2. MarcoFalke commented at 7:17 pm on February 2, 2019: member
    utACK f72aea270304808815757f523ef5867e53cd1b59
  3. MarcoFalke added the label Tests on Feb 2, 2019
  4. tests: Make updatecoins_simulation_test deterministic ef0b01217a
  5. in src/test/coins_tests.cpp:282 in f72aea2703 outdated
    278@@ -279,6 +279,8 @@ UtxoData::iterator FindRandomFrom(const std::set<COutPoint> &utxoSet) {
    279 // has the expected effect (the other duplicate is overwritten at all cache levels)
    280 BOOST_AUTO_TEST_CASE(updatecoins_simulation_test)
    281 {
    282+    SeedInsecureRand(true);
    


    Empact commented at 8:13 am on February 3, 2019:
    nit: comment arg name?
  6. practicalswift force-pushed on Feb 3, 2019
  7. practicalswift renamed this:
    tests: Make tests updatecoins_simulation_test and knapsack_solver_test deterministic
    tests: Make test updatecoins_simulation_test deterministic
    on Feb 3, 2019
  8. practicalswift commented at 8:18 pm on February 4, 2019: contributor
    @MarcoFalke Would you mind re-reviewing? It gets easier to tackle the hard non-determinism cases with the noise from these trivial cases out of the way :-)
  9. MarcoFalke commented at 9:26 pm on February 4, 2019: member
    I’d prefer to do make more than one test deterministic in its coverage, otherwise this will end up in a flood of pull requests. Unless of course one of the fixes is potentially too controversial (e.g. modifies validation code or other Core code)
  10. MarcoFalke referenced this in commit 9e7f8f6c82 on Feb 5, 2019
  11. MarcoFalke merged this on Feb 5, 2019
  12. MarcoFalke closed this on Feb 5, 2019

  13. deadalnix referenced this in commit d64efa6c63 on Jun 18, 2020
  14. ftrader referenced this in commit ab9446f517 on Oct 16, 2020
  15. practicalswift deleted the branch on Apr 10, 2021
  16. PastaPastaPasta referenced this in commit 7fe7b445f2 on Jun 27, 2021
  17. PastaPastaPasta referenced this in commit 3b989cd794 on Jun 28, 2021
  18. PastaPastaPasta referenced this in commit 28b30d5464 on Jun 28, 2021
  19. PastaPastaPasta referenced this in commit 4eafb4dea6 on Jun 29, 2021
  20. DrahtBot locked this on Aug 18, 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: 2024-10-05 01:12 UTC

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