test: Move `script_assets_tests` into its own suite #31576

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:241227-test-assets changing 3 files +181 −141
  1. hebasto commented at 7:28 PM on December 27, 2024: member

    This PR ensures that the script_assets_tests test case is explicitly reported as "Skipped" when it is not run, making it clearer when running the test suite with ctest:

    • on the master branch @ 9355578a77978a0c2f189bd7315a2883142d8119:
    $ env -u DIR_UNIT_TEST_DATA ctest --test-dir build -j 16 -R "^script_"
    Internal ctest changing into directory: /home/hebasto/git/bitcoin/build
    Test project /home/hebasto/git/bitcoin/build
        Start 87: script_tests
        Start 83: script_p2sh_tests
        Start 85: script_segwit_tests
        Start 86: script_standard_tests
        Start 84: script_parse_tests
    1/5 Test [#84](/bitcoin-bitcoin/84/): script_parse_tests ...............   Passed    0.11 sec
    2/5 Test [#86](/bitcoin-bitcoin/86/): script_standard_tests ............   Passed    0.11 sec
    3/5 Test [#85](/bitcoin-bitcoin/85/): script_segwit_tests ..............   Passed    0.12 sec
    4/5 Test [#83](/bitcoin-bitcoin/83/): script_p2sh_tests ................   Passed    0.12 sec
    5/5 Test [#87](/bitcoin-bitcoin/87/): script_tests .....................   Passed    0.36 sec
    
    100% tests passed, 0 tests failed out of 5
    
    Total Test time (real) =   0.37 sec
    
    • with this PR:
    $ env -u DIR_UNIT_TEST_DATA ctest --test-dir build -j 16 -R "^script_"
    Internal ctest changing into directory: /home/hebasto/git/bitcoin/build
    Test project /home/hebasto/git/bitcoin/build
        Start 83: script_assets_tests
        Start 88: script_tests
        Start 84: script_p2sh_tests
        Start 86: script_segwit_tests
        Start 87: script_standard_tests
        Start 85: script_parse_tests
    1/6 Test [#85](/bitcoin-bitcoin/85/): script_parse_tests ...............   Passed    0.11 sec
    2/6 Test [#83](/bitcoin-bitcoin/83/): script_assets_tests ..............***Skipped   0.12 sec
    3/6 Test [#86](/bitcoin-bitcoin/86/): script_segwit_tests ..............   Passed    0.11 sec
    4/6 Test [#87](/bitcoin-bitcoin/87/): script_standard_tests ............   Passed    0.11 sec
    5/6 Test [#84](/bitcoin-bitcoin/84/): script_p2sh_tests ................   Passed    0.12 sec
    6/6 Test [#88](/bitcoin-bitcoin/88/): script_tests .....................   Passed    0.36 sec
    
    100% tests passed, 0 tests failed out of 6
    
    Total Test time (real) =   0.37 sec
    
    The following tests did not run:
    	 83 - script_assets_tests (Skipped)
    $ env DIR_UNIT_TEST_DATA=/home/hebasto/git/bitcoin/qa-assets/unit_test_data ctest --test-dir build -j 16 -R "^script_"
    Internal ctest changing into directory: /home/hebasto/git/bitcoin/build
    Test project /home/hebasto/git/bitcoin/build
        Start 83: script_assets_tests
        Start 88: script_tests
        Start 84: script_p2sh_tests
        Start 86: script_segwit_tests
        Start 87: script_standard_tests
        Start 85: script_parse_tests
    1/6 Test [#85](/bitcoin-bitcoin/85/): script_parse_tests ...............   Passed    0.11 sec
    2/6 Test [#87](/bitcoin-bitcoin/87/): script_standard_tests ............   Passed    0.11 sec
    3/6 Test [#86](/bitcoin-bitcoin/86/): script_segwit_tests ..............   Passed    0.11 sec
    4/6 Test [#84](/bitcoin-bitcoin/84/): script_p2sh_tests ................   Passed    0.12 sec
    5/6 Test [#88](/bitcoin-bitcoin/88/): script_tests .....................   Passed    0.35 sec
    6/6 Test [#83](/bitcoin-bitcoin/83/): script_assets_tests ..............   Passed    1.58 sec
    
    100% tests passed, 0 tests failed out of 6
    
    Total Test time (real) =   1.58 sec
    
  2. hebasto added the label Tests on Dec 27, 2024
  3. DrahtBot commented at 7:28 PM on December 27, 2024: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31576.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko, ajtowns, achow101
    Stale ACK yuvicc

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #33012 (script: return verification flag responsible for error upon validation failure by darosior)
    • #32998 (Bump SCRIPT_VERIFY flags to 64 bit by ajtowns)
    • #32473 (Introduce per-txin sighash midstate cache for legacy/p2sh/segwitv0 scripts by sipa)

    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.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. hebasto marked this as a draft on Dec 27, 2024
  5. hebasto force-pushed on Dec 27, 2024
  6. hebasto marked this as ready for review on Dec 27, 2024
  7. hebasto commented at 3:01 PM on January 7, 2025: member
  8. hebasto commented at 9:54 AM on February 10, 2025: member

    Friendly ping @maflcko ;)

  9. maflcko commented at 5:17 PM on February 25, 2025: member

    Seems fine. No strong opinion.

  10. yuvicc commented at 7:27 PM on May 17, 2025: contributor

    tACK 0859fc22f0baf00259cf964f9d39d36fba6cd291

    • making skipped tests explicitly appear as 'Skipped' rather than silently omitting
        Start 89: script_tests
        Start 85: script_p2sh_tests
        Start 87: script_segwit_tests
        Start 88: script_standard_tests
        Start 86: script_parse_tests
        Start 84: script_assets_tests
    1/6 Test [#86](/bitcoin-bitcoin/86/): script_parse_tests ...............   Passed    0.16 sec
    2/6 Test [#84](/bitcoin-bitcoin/84/): script_assets_tests ..............***Skipped   0.16 sec
    3/6 Test [#88](/bitcoin-bitcoin/88/): script_standard_tests ............   Passed    0.17 sec
    4/6 Test [#87](/bitcoin-bitcoin/87/): script_segwit_tests ..............   Passed    0.17 sec
    5/6 Test [#85](/bitcoin-bitcoin/85/): script_p2sh_tests ................   Passed    0.17 sec
    6/6 Test [#89](/bitcoin-bitcoin/89/): script_tests .....................   Passed    0.37 sec
    
    100% tests passed, 0 tests failed out of 6
    
    Total Test time (real) =   0.38 sec
    
    The following tests did not run:
    	 84 - script_assets_tests (Skipped)
    
  11. in src/test/script_assets_tests.cpp:33 in 0859fc22f0 outdated
      28 | +unsigned int ParseScriptFlags(std::string strFlags);
      29 | +
      30 | +BOOST_AUTO_TEST_SUITE(script_assets_tests)
      31 | +
      32 | +/* Wrapper around ProduceSignature to combine two scriptsigs */
      33 | +SignatureData CombineSignatures(const CTxOut& txout, const CMutableTransaction& tx, const SignatureData& scriptSig1, const SignatureData& scriptSig2)
    


    maflcko commented at 8:01 AM on June 20, 2025:

    what is this for?


    hebasto commented at 9:10 AM on June 20, 2025:

    Thanks! Dropped.

  12. maflcko approved
  13. maflcko commented at 8:04 AM on June 20, 2025: member

    makes sense to be explicit here to avoid confusion

    lgtm ACK 0859fc22f0baf00259cf964f9d39d36fba6cd291 🐽

    <details><summary>Show signature</summary>

    Signature:

    untrusted comment: signature from minisign secret key on empty file; verify via: minisign -Vm "${path_to_any_empty_file}" -P RWTRmVTMeKV5noAMqVlsMugDDCyyTSbA3Re5AkUrhvLVln0tSaFWglOw -x "${path_to_this_whole_four_line_signature_blob}"
    RUTRmVTMeKV5npGrKx1nqXCw5zeVHdtdYURB/KlyA/LMFgpNCs+SkW9a8N95d+U4AP1RJMi+krxU1A3Yux4bpwZNLvVBKy0wLgM=
    trusted comment: lgtm ACK 0859fc22f0baf00259cf964f9d39d36fba6cd291 🐽
    oguvM7vjti8dmtabMmgzCKuxp+/7OOHqZVEMvjj+RjTVxfTJLoC+HJhdnAQ11Y5a2tsJI5smtPebrAKwdUAKBA==
    

    </details>

  14. test: Move `script_assets_tests` into its own suite
    This change ensures that the `script_assets_tests` test case is
    explicitly reported as "Skipped" when it is not run, making it clearer
    when running the test suite with `ctest`.
    c40dbbbf77
  15. hebasto force-pushed on Jun 20, 2025
  16. hebasto commented at 9:11 AM on June 20, 2025: member

    Addressed feedback from @maflcko.

  17. maflcko commented at 9:42 AM on June 20, 2025: member

    only change is dropping dead code

    re-ACK c40dbbbf77078bb86a652ca151b472e7bef61ae0 👈

    <details><summary>Show signature</summary>

    Signature:

    untrusted comment: signature from minisign secret key on empty file; verify via: minisign -Vm "${path_to_any_empty_file}" -P RWTRmVTMeKV5noAMqVlsMugDDCyyTSbA3Re5AkUrhvLVln0tSaFWglOw -x "${path_to_this_whole_four_line_signature_blob}"
    RUTRmVTMeKV5npGrKx1nqXCw5zeVHdtdYURB/KlyA/LMFgpNCs+SkW9a8N95d+U4AP1RJMi+krxU1A3Yux4bpwZNLvVBKy0wLgM=
    trusted comment: re-ACK c40dbbbf77078bb86a652ca151b472e7bef61ae0 👈
    NetYDFd/QmbGErA2ugrrDGOZgiUEvhYtaPbG9oaznL6YlEGo5+XntdHOPsxEkTl4G1PYEoc+dEs9jOccdWLJDA==
    

    </details>

  18. DrahtBot requested review from yuvicc on Jun 20, 2025
  19. ajtowns commented at 1:12 AM on July 23, 2025: contributor

    ACK c40dbbbf77078bb86a652ca151b472e7bef61ae0

    You could consider rebasing it on top of #32945 in order to not move the code to a different file, but that still involves moving code about and only avoids duplicating the ToScript function across both files.

  20. achow101 commented at 9:33 PM on July 25, 2025: member

    ACK c40dbbbf77078bb86a652ca151b472e7bef61ae0

  21. achow101 merged this on Jul 25, 2025
  22. achow101 closed this on Jul 25, 2025

  23. l0rinc commented at 12:42 AM on July 26, 2025: contributor

    test-only post-merge ACK

    It's reporting script_assets_tests as skipped on Mac

    <details> <summary>Details</summary>

    129/144 Test  [#86](/bitcoin-bitcoin/86/): script_assets_tests ..................***Skipped   0.36 sec
    ...
    The following tests did not run:
             86 - script_assets_tests (Skipped)
    

    </details>

    and on Linux

    <details> <summary>Details</summary>

    139/144 Test  [#86](/bitcoin-bitcoin/86/): script_assets_tests ..................***Skipped   0.20 sec
    ...
    The following tests did not run:
             86 - script_assets_tests (Skipped)
    

    </details>

    While CI ran it successfully

    <details> <summary>Details</summary>

    131/143 Test  [#87](/bitcoin-bitcoin/87/): script_assets_tests ..................   Passed  184.12 sec
    

    </details>

  24. hebasto deleted the branch on Jul 26, 2025
  25. sedited referenced this in commit 02ded863ba on Jul 28, 2025
  26. sedited referenced this in commit 52d7f32bd6 on Jul 28, 2025
  27. alexanderwiederin referenced this in commit 28fe919bf7 on Aug 6, 2025
  28. sedited referenced this in commit b98d982d79 on Aug 7, 2025
  29. alexanderwiederin referenced this in commit 4152176d02 on Aug 8, 2025
  30. alexanderwiederin referenced this in commit 9ef94c31db on Aug 8, 2025
  31. stringintech referenced this in commit 71275a1b5e on Aug 17, 2025
  32. yuvicc referenced this in commit 22f55cf11d on Aug 26, 2025
  33. bug-castercv502 referenced this in commit 4aa5572aea on Sep 28, 2025
  34. stickies-v referenced this in commit a19c56cd7c on Nov 4, 2025
  35. Kino1994 referenced this in commit 8a8ce29939 on Jun 28, 2026
  36. BigcoinBGC referenced this in commit fd1174790c on Jun 30, 2026
  37. bitcoin locked this on Jul 30, 2026

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-08-04 00:51 UTC

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