test: Remove thread_local from test_bitcoin #14985

pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:Mf1812-testNoThreadLocal changing 3 files +17 −7
  1. MarcoFalke commented at 3:39 pm on December 17, 2018: member

    thread_local seems to be highly controversial according to the discussion in #14953, so remove it again from the tests.

    Also remove boost::thread_group in the test that uses it, since I am touching it anyway.

  2. test: Undo thread_local g_insecure_rand_ctx fa0d3c4407
  3. MarcoFalke added the label Refactoring on Dec 17, 2018
  4. MarcoFalke added the label Tests on Dec 17, 2018
  5. MarcoFalke added this to the milestone 0.18.0 on Dec 17, 2018
  6. test: Add comment to g_insecure_rand_ctx fa61202cae
  7. in src/test/test_bitcoin.h:31 in fa0d3c4407 outdated
    25@@ -26,7 +26,7 @@ std::ostream& operator<<(typename std::enable_if<std::is_enum<T>::value, std::os
    26     return stream << static_cast<typename std::underlying_type<T>::type>(e);
    27 }
    28 
    29-thread_local extern FastRandomContext g_insecure_rand_ctx;
    30+extern FastRandomContext g_insecure_rand_ctx;
    31 
    32 static inline void SeedInsecureRand(bool deterministic = false)
    


    laanwj commented at 4:40 pm on December 17, 2018:
    Would make sense to add a warning comment for these helper functions to only use them from the main thread.
  8. MarcoFalke force-pushed on Dec 17, 2018
  9. laanwj commented at 11:00 am on December 18, 2018: member
    utACK fa61202cae6979c754b11842c5ed8d90f1cdcc45
  10. promag commented at 3:09 pm on December 18, 2018: member
    utACK fa61202.
  11. in src/test/validation_block_tests.cpp:155 in fa61202cae
    151@@ -152,12 +152,13 @@ BOOST_AUTO_TEST_CASE(processnewblock_signals_ordering)
    152     // create a bunch of threads that repeatedly process a block generated above at random
    153     // this will create parallelism and randomness inside validation - the ValidationInterface
    154     // will subscribe to events generated during block validation and assert on ordering invariance
    155-    boost::thread_group threads;
    


    promag commented at 3:11 pm on December 18, 2018:
    👋
  12. MarcoFalke merged this on Dec 18, 2018
  13. MarcoFalke closed this on Dec 18, 2018

  14. MarcoFalke referenced this in commit d4197812d4 on Dec 18, 2018
  15. MarcoFalke deleted the branch on Dec 18, 2018
  16. Munkybooty referenced this in commit 4d5ae893ed on Aug 8, 2021
  17. Munkybooty referenced this in commit 2c534af879 on Aug 8, 2021
  18. Munkybooty referenced this in commit ac674a7daf on Aug 11, 2021
  19. Munkybooty referenced this in commit f26f5dee35 on Aug 11, 2021
  20. Munkybooty referenced this in commit 4a4ee90ad9 on Aug 13, 2021
  21. Munkybooty referenced this in commit 744813b454 on Aug 15, 2021
  22. MarcoFalke locked this on Sep 8, 2021


MarcoFalke laanwj promag

Labels
Refactoring Tests

Milestone
0.18.0


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-11-22 00:12 UTC

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