test: script_error checking in script_invalid tests #7517

pull laanwj wants to merge 3 commits into bitcoin:master from laanwj:2016_02_test_script_errors changing 2 files +685 −553
  1. laanwj commented at 3:49 PM on February 11, 2016: member

    Check the returned script_error. Add expected script_error for generated as well as custom tests.

    The specific error is not part of consensus, however it could avoid unclear reporting issues such as #6862 in the future. It also makes it easier to verify that all potential error conditions are checked.

    It also reveals that overflow conditions return UNKNOWN_ERROR, there appears to be no specific error code for that.

    Fixes #7513.

    Changes are best reviewed using git --word-diff.

  2. test: Move non-generated script_invalid test to the correct place
    This test was introduced in 9fadf1c874f938f87395495776dbae896551873d,
    but accidentally added in the autogenerated area.
    b0ff8572ae
  3. laanwj added the label Tests on Feb 11, 2016
  4. laanwj force-pushed on Feb 11, 2016
  5. laanwj commented at 4:02 PM on February 11, 2016: member

    These are not returned in any of the script tests:

    • SCRIPT_ERR_CHECKMULTISIGVERIFY (OP_CHECKMULTISIGVERIFY)
    • SCRIPT_ERR_CHECKSIGVERIFY (OP_CHECKSIGVERIFY)
    • SCRIPT_ERR_NUMEQUALVERIFY (OP_NUMEQUALVERIFY)
    • SCRIPT_ERR_NEGATIVE_LOCKTIME (OP_CHECKLOCKTIMEVERIFY - BIP65)
    • SCRIPT_ERR_UNSATISFIED_LOCKTIME (OP_CHECKLOCKTIMEVERIFY - BIP65)
  6. test: Re-introduce JSON pretty printing in test builder 2317ad7c56
  7. test: Script_error checking in script_invalid tests
    Check the returned script_error. Add expected script_error
    for generated as well as custom tests.
    
    The specific error is not part of consensus, however
    it could avoid unclear reporting issues such as #6862 in the future.
    
    Fixes #7513.
    0ecb3401fe
  8. laanwj force-pushed on Feb 11, 2016
  9. laanwj commented at 1:09 PM on March 1, 2016: member
  10. laanwj closed this on Mar 2, 2016

  11. theuni commented at 1:07 AM on March 3, 2016: member

    @laanwj Closed on purpose? I didn't see this before, but sounds like a good idea for sure.

  12. laanwj commented at 1:32 PM on March 3, 2016: member

    @theuni Closed because I've been asking for review a few times for this, but never received any answer (neither positive nor negative) so I was assuming it was too much review work relative to some extra testing coverage.

    Happy to reopen though!

  13. laanwj reopened this on Mar 3, 2016

  14. laanwj merged this on Mar 14, 2016
  15. laanwj closed this on Mar 14, 2016

  16. laanwj referenced this in commit f1ca8915bb on Mar 14, 2016
  17. MarcoFalke referenced this in commit 7610d14fcd on May 4, 2016
  18. MarcoFalke referenced this in commit 87129b24e1 on May 4, 2016
  19. nomnombtc referenced this in commit 0b46f8ee1a on Nov 12, 2016
  20. nomnombtc referenced this in commit 4554c67365 on Nov 12, 2016
  21. nomnombtc referenced this in commit a4ec135bf5 on Nov 13, 2016
  22. sickpig referenced this in commit b251e59aaf on Nov 14, 2016
  23. MarcoFalke locked this on Sep 8, 2021

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-04-13 15:15 UTC

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