test: Move MakeNoLogFileContext to libtest_util, and use it in bench #21003

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2101-benchNoLog changing 15 files +38 −52
  1. MarcoFalke commented at 10:43 AM on January 25, 2021: member

    To avoid verbose code duplication, which may lead to accidental mishaps https://github.com/bitcoin/bitcoin/pull/20998/files#r563624041.

    Also fix a nit I found in #20946 (review).

  2. fanquake added the label Tests on Jan 25, 2021
  3. MarcoFalke cross-referenced this on Jan 25, 2021 from issue fuzz: Consolidate fuzzing TestingSetup initialization by dongcarl
  4. MarcoFalke cross-referenced this on Jan 25, 2021 from issue test: Fix BlockToJsonVerbose benchmark by martinus
  5. MarcoFalke renamed this:
    test: Move MakeNoLogFileContext to common libtest_util, and use it in bench
    test: Move MakeNoLogFileContext to libtest_util, and use it in bench
    on Jan 25, 2021
  6. MarcoFalke closed this on Jan 25, 2021

  7. MarcoFalke deleted the branch on Jan 25, 2021
  8. MarcoFalke cross-referenced this on Jan 25, 2021 from issue Remove gArgs by MarcoFalke
  9. MarcoFalke restored the branch on Jan 25, 2021
  10. MarcoFalke commented at 7:17 PM on January 25, 2021: member

    Worked around #21005

  11. MarcoFalke reopened this on Jan 25, 2021

  12. MarcoFalke force-pushed on Jan 25, 2021
  13. DrahtBot commented at 2:15 AM on January 26, 2021: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #20773 (refactor: split CWallet::Create by S3RK)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  14. DrahtBot cross-referenced this on Jan 26, 2021 from issue fuzz: Fail if message type is not fuzzed by MarcoFalke
  15. DrahtBot cross-referenced this on Jan 26, 2021 from issue rpc/validation: enable packages through testmempoolaccept by glozow
  16. DrahtBot cross-referenced this on Jan 26, 2021 from issue refactor: split CWallet::Create by S3RK
  17. DrahtBot cross-referenced this on Jan 26, 2021 from issue validation: UTXO snapshot activation by jamesob
  18. DrahtBot cross-referenced this on Jan 27, 2021 from issue [Bundle 2/n] Prune g_chainman usage in mempool-related validation functions by dongcarl
  19. DrahtBot cross-referenced this on Jan 28, 2021 from issue tree-wide: De-globalize ChainstateManager by dongcarl
  20. DrahtBot cross-referenced this on Feb 1, 2021 from issue [Bundle 3/n] Prune remaining g_chainman usage in validation functions by dongcarl
  21. DrahtBot cross-referenced this on Feb 2, 2021 from issue refactor: return MempoolAcceptResult from ATMP by glozow
  22. DrahtBot cross-referenced this on Feb 10, 2021 from issue fuzz: Add tx_pool fuzz target by MarcoFalke
  23. DrahtBot cross-referenced this on Feb 11, 2021 from issue validation/coins: limit MemPoolAccept access to coins cache + make it responsible for uncaching by glozow
  24. MarcoFalke force-pushed on Feb 11, 2021
  25. DrahtBot added the label Needs rebase on Feb 11, 2021
  26. MarcoFalke force-pushed on Feb 11, 2021
  27. DrahtBot removed the label Needs rebase on Feb 11, 2021
  28. DrahtBot added the label Needs rebase on Feb 11, 2021
  29. MarcoFalke force-pushed on Feb 11, 2021
  30. MarcoFalke commented at 2:06 PM on February 11, 2021: member

    Rebased (3x)

  31. DrahtBot removed the label Needs rebase on Feb 11, 2021
  32. DrahtBot cross-referenced this on Feb 13, 2021 from issue bench: Add benchmark to write JSON into a string by martinus
  33. DrahtBot added the label Needs rebase on Feb 16, 2021
  34. MarcoFalke force-pushed on Feb 17, 2021
  35. fanquake commented at 10:24 AM on February 17, 2021: member

    concept ack (1x)

  36. DrahtBot removed the label Needs rebase on Feb 17, 2021
  37. DrahtBot cross-referenced this on Feb 19, 2021 from issue build: Fix fuzz binary compilation under windows by danben
  38. DrahtBot added the label Needs rebase on Feb 19, 2021
  39. MarcoFalke force-pushed on Feb 19, 2021
  40. MarcoFalke commented at 11:12 AM on February 19, 2021: member

    Rebased (4x)

  41. DrahtBot removed the label Needs rebase on Feb 19, 2021
  42. DrahtBot added the label Needs rebase on Feb 20, 2021
  43. MarcoFalke force-pushed on Feb 22, 2021
  44. MarcoFalke commented at 9:25 AM on February 22, 2021: member

    Rebased (5x)

  45. MarcoFalke cross-referenced this on Feb 22, 2021 from issue fuzz: Two scripted diff renames by MarcoFalke
  46. DrahtBot removed the label Needs rebase on Feb 22, 2021
  47. MarcoFalke referenced this in commit cac10e66d2 on Feb 25, 2021
  48. MarcoFalke force-pushed on Feb 25, 2021
  49. sidhujag referenced this in commit ea890fd13a on Feb 25, 2021
  50. practicalswift commented at 4:03 PM on February 28, 2021: contributor

    Concept ACK (2x)

  51. DrahtBot added the label Needs rebase on Mar 1, 2021
  52. MarcoFalke force-pushed on Mar 3, 2021
  53. Move MakeNoLogFileContext to common libtest_util, and use it in bench
    Can be reviewed with --color-moved=dimmed-zebra
    fa576b4532
  54. MarcoFalke force-pushed on Mar 3, 2021
  55. DrahtBot removed the label Needs rebase on Mar 3, 2021
  56. in src/bench/rpc_blockchain.cpp:18 in fa576b4532
      14 | @@ -15,7 +15,7 @@
      15 |  namespace {
      16 |  
      17 |  struct TestBlockAndIndex {
      18 | -    TestingSetup test_setup{};
      19 | +    const std::unique_ptr<const TestingSetup> testing_setup{MakeNoLogFileContext<const TestingSetup>(CBaseChainParams::MAIN)};
    


    fanquake commented at 10:02 AM on March 3, 2021:

    This seems kind of unruly.


    MarcoFalke commented at 11:52 AM on March 3, 2021:

    unruly

    C++ requires this. (You can't use auto for non-static members)

  57. fanquake approved
  58. fanquake commented at 10:05 AM on March 3, 2021: member

    ACK fa576b4532814b4bca1936d170cabd01fbc51960

  59. MarcoFalke commented at 11:52 AM on March 3, 2021: member

    @dongcarl Mind to take a look here, as this builds on top of #20946?

  60. dongcarl commented at 7:23 PM on March 3, 2021: contributor

    Light Code-Review ACK fa576b4532814b4bca1936d170cabd01fbc51960

    Looks reasonable. Always good to coalesce these init codepaths.

  61. fanquake commented at 12:50 AM on March 4, 2021: member

    Failed merged (1x)

    This need fixing up post #19203 & #19288:

    test/fuzz/socks5.cpp:22:66: error: unknown type name 'BasicTestingSetup'
        static const auto testing_setup = MakeNoLogFileContext<const BasicTestingSetup>();
                                                                     ^
    1 error generated.
    gmake[2]: *** [Makefile:13693: test/fuzz/fuzz-socks5.o] Error 1
    gmake[2]: *** Waiting for unfinished jobs....
    test/fuzz/torcontrol.cpp:38:39: error: use of undeclared identifier 'MakeNoLogFileContext'
        static const auto testing_setup = MakeNoLogFileContext<>();
                                          ^
    1 error generated.
    
    diff --git a/src/test/fuzz/socks5.cpp b/src/test/fuzz/socks5.cpp
    index 123ee042e..72c3e8f71 100644
    --- a/src/test/fuzz/socks5.cpp
    +++ b/src/test/fuzz/socks5.cpp
    @@ -6,6 +6,7 @@
     #include <test/fuzz/FuzzedDataProvider.h>
     #include <test/fuzz/fuzz.h>
     #include <test/fuzz/util.h>
    +#include <test/util/setup_common.h>
     
     #include <cstdint>
     #include <string>
    diff --git a/src/test/fuzz/torcontrol.cpp b/src/test/fuzz/torcontrol.cpp
    index b7a42ea7f..a8e69dee3 100644
    --- a/src/test/fuzz/torcontrol.cpp
    +++ b/src/test/fuzz/torcontrol.cpp
    @@ -5,6 +5,7 @@
     #include <test/fuzz/FuzzedDataProvider.h>
     #include <test/fuzz/fuzz.h>
     #include <test/fuzz/util.h>
    +#include <test/util/setup_common.h>
     #include <torcontrol.h>
     
     #include <cstdint>
    
  62. MarcoFalke commented at 7:54 AM on March 4, 2021: member

    Not going to invalidate the precious reviews over an unrelated issue. Fixed in #21358, which can go in first.

  63. MarcoFalke cross-referenced this on Mar 4, 2021 from issue fuzz: Add missing include (test/util/setup_common.h) by MarcoFalke
  64. fanquake merged this on Mar 4, 2021
  65. fanquake closed this on Mar 4, 2021

  66. MarcoFalke deleted the branch on Mar 4, 2021
  67. sidhujag referenced this in commit 0ac2c0e46a on Mar 4, 2021
  68. bitcoin 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-05-20 06:54 UTC