test: Add missing check for empty stderr in util tester #32327

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2504-test-util-empty-err changing 1 files +8 −7
  1. maflcko commented at 4:00 pm on April 22, 2025: member

    Now that wine support was removed from the CI in 25b56fd9b469f8e5d36f0132c3b79a5214e3372a, it can probably be removed from the util tester as well.

    If someone really needs this, they can comment the new check out, or submit a patch to add an option/env var to silence the new check.

  2. test: Add missing check for empty stderr in util tester fadf12a56c
  3. DrahtBot commented at 4:00 pm on April 22, 2025: contributor

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

    Code Coverage & Benchmarks

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

    Reviews

    See the guideline for information on the review process.

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

  4. DrahtBot added the label Tests on Apr 22, 2025
  5. i-am-yuvi commented at 9:42 am on April 24, 2025: contributor

    tACK fadf12a56c294696052c4cb6ee5284030ada7498

    I’ve reviewed the changes and tested on my system

  6. BrandonOdiwuor commented at 2:03 am on April 25, 2025: contributor
    Code Review ACK fadf12a56c294696052c4cb6ee5284030ada7498
  7. ismaelsadeeq approved
  8. ismaelsadeeq commented at 2:59 pm on April 25, 2025: member

    Tested ACK fadf12a56c294696052c4cb6ee5284030ada7498

    I verified that with this patch, we now raise an exception whenever a ./bitcoin-util call returns an error message and the corresponding test case does not specify that call have a corresponding error_txt.

    For example, by removing the error_txt from the grind util test:

     0diff --git a/test/util/data/bitcoin-util-test.json b/test/util/data/bitcoin-util-test.json
     1index 83b3c430d53..d840c8fa1fb 100644
     2--- a/test/util/data/bitcoin-util-test.json
     3+++ b/test/util/data/bitcoin-util-test.json
     4@@ -14,7 +14,6 @@
     5   { "exec": "./bitcoin-util",
     6     "args": ["grind"],
     7     "return_code": 1,
     8-    "error_txt": "Must specify block header to grind",
     9     "description": ""
    10   },
    11   { "exec": "./bitcoin-util",
    

    On master commit 80e6ad9e3023a57a4ef19b7d0edf9ac5be71a584, the test passes:

    0abubakarismail@Abubakars-MacBook-Pro bitcoin % build/test/util/test_runner.py  
    

    Whereas on this PR fadf12a56c294696052c4cb6ee5284030ada7498, the test fails:

    0abubakarismail@Abubakars-MacBook-Pro bitcoin % build/test/util/test_runner.py
    12025-04-25 15:54:04,490 - ERROR - Unexpected error received: Must specify block header to grind
    2res: CompletedProcess(args=['/Users/abubakarismail/Desktop/Work/bitcoin-dev/bitcoin/build/bin/./bitcoin-util', 'grind'], returncode=1, stdout='', stderr='Must specify block header to grind\n')
    32025-04-25 15:54:07,683 - ERROR - FAILED_TESTCASES:
    4['']
    
  9. achow101 commented at 9:30 pm on April 28, 2025: member
    ACK fadf12a56c294696052c4cb6ee5284030ada7498
  10. achow101 merged this on Apr 28, 2025
  11. achow101 closed this on Apr 28, 2025

  12. maflcko deleted the branch on Apr 29, 2025

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: 2025-05-05 12:12 UTC

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