jnewbery
commented at 8:42 PM on March 30, 2017:
member
Check number of arguments passed to bitcoin-tx in outaddr and outpubkey.
This PR also updates the bitcoin-tx tests to check bitcoin-tx stderr and verify that expected errors are raised.
Adds test cases for calling bitcoin-tx with wrong number of separators in outaddr and outpubkey.
bitcoin-tx: Fix missing range check
The number of arguments is not checked MutateTxAddOutAddr(..), meaning
that
> ./bitcoin-tx -create outaddr=
accessed the vStrInputParts vector beyond its bounds.
This also includes work by jnewbery to check the inputs for
MutateTxAddPubKey()
eb66bf9bdd
Check stderr when testing bitcoin-tx21704f6334
Add tests for bitcoin-tx input checking19ecd1e2e1
jnewbery
commented at 8:46 PM on March 30, 2017:
member
fanquake added the label Needs backport on Mar 30, 2017
fanquake added this to the milestone 0.14.1 on Mar 30, 2017
jnewbery
commented at 10:08 PM on March 30, 2017:
member
@theuni has suggested that checking the stderr for error text may cause problems due to unicode, eols, etc, and that we'd be better off defining our own exit codes in bitcoin-tx and testing on those. I think it's ok to test for text in stderr for now, but we a future PR should define exit codes and test them in bctest.py.
fanquake added this to the "For backport" column in a project
laanwj
commented at 6:15 AM on March 31, 2017:
member
I don't disagree with @theuni on that in general, however checking for text in error messages is perfectly fine for tests that are supposed to test these errors. Especially for a user-facing tool. We do a similar thing for checking e.g. RPC errors where we check both the code and the message.
laanwj
commented at 6:30 AM on March 31, 2017:
member
utACK19ecd1e
gmaxwell
commented at 6:39 AM on March 31, 2017:
contributor
@awemany Fix moved over here, your review/testing would be very welcome!
gmaxwell approved
gmaxwell
commented at 6:41 AM on March 31, 2017:
contributor
ACK (did not test test, e.g. by introducing a bug).
theuni
commented at 7:00 AM on March 31, 2017:
member
As mentioned in the comments: for reference, I suggested using exit codes rather than comparing text because (here specifically), Wine piles nonsense about window creation into stderr when running without DISPLAY set. For that reason, we can't test that "stderr == expected", rather we have to test "expected in stderr". That's not great, but it's not a huge deal either.
utACK19ecd1e2e13514c8a92a2a4337c2568c3d5d13e5
MarcoFalke renamed this: bitcoin-tx input verification bitcoin-tx input verification (awemany, jnewbery) on Mar 31, 2017
laanwj merged this on Mar 31, 2017
laanwj closed this on Mar 31, 2017
laanwj referenced this in commit de301b0488 on Mar 31, 2017
laanwj referenced this in commit 04c21afcdf on Mar 31, 2017
laanwj referenced this in commit ecc523288c on Mar 31, 2017
laanwj referenced this in commit f59e3dfc59 on Mar 31, 2017
laanwj removed the label Needs backport on Mar 31, 2017
laanwj removed this from the "For backport" column in a project
codablock referenced this in commit a149129656 on Jan 26, 2018
andvgal referenced this in commit 5f89df41e2 on Jan 6, 2019
CryptoCentric referenced this in commit c5878f73dc on Feb 27, 2019
PastaPastaPasta referenced this in commit a05f5ac881 on Mar 15, 2019
PastaPastaPasta referenced this in commit 7aa47ee091 on May 20, 2019
PastaPastaPasta referenced this in commit 2538f8334c on May 20, 2019
PastaPastaPasta referenced this in commit e798b83cbc on May 21, 2019
PastaPastaPasta referenced this in commit 3ce2d6fb93 on May 22, 2019
PastaPastaPasta referenced this in commit f9c2cd915c on May 22, 2019
PastaPastaPasta referenced this in commit 10d3311b22 on May 22, 2019
PastaPastaPasta referenced this in commit 4dd3af6441 on May 22, 2019
PastaPastaPasta referenced this in commit 61b0481944 on May 23, 2019
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-29 03:15 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me