mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
Merge #17893: qa: Fix double-negative arg test
8b2f471a1bff753cc4df29805ef38c3623f64f6e qa: Fix double-negative arg test (Hennadii Stepanov) Pull request description: Commit 67518f7cc61bf59ddfa0fd7c8dbbdec3653b9556 tests do not catch that a pointer is returned instead of a value. This PR makes test to not accept trailing characters after 0. From [IRC](http://www.erisian.com.au/bitcoin-core-dev/log-2020-01-07.html#l-358): > \<hebasto\> ryanofsky: hmm, why test/functional/feature_config_args.py passed on 67518f7cc61bf59ddfa0fd7c8dbbdec3653b9556 ? > \<hebasto\> I see now: test is broken. > \<ryanofsky\> test should be unaffected by that change, do you see a break somewhere? > \<hebasto\> yes: "-connect=0x7fff50369968" != "-connect=0" > ... > \<ryanofsky\> Oh I see how that would happen, it should not be a problem in the current PR. > \<hebasto\> going to submit a pr to fix test > \<ryanofsky\> in the commit you mentioned, value is a pointer to a string, and it was printing the pointer address instead of the string on: LogPrintf("Warning: parsed potentially confusing double-negative -%s=%s\n", key, value); > \<hebasto\> correct > \<ryanofsky\> oh I see, test could be fixed to more robust and not accept trailing characters after 0 ACKs for top commit: ryanofsky: Code review ACK 8b2f471a1bff753cc4df29805ef38c3623f64f6e. I don't know how you found this but it's a nice catch! This change should make the test more reliable. Tree-SHA512: 454b3d4415771d353a2da766f6ae6e0bfae7bdf485aaa7bfdd323595282356eeaf3f40e556b39f753bc35f578cbe9684368887eef2d63c5d7f0d7d9fa971697a
This commit is contained in:
parent
bad56d0ee8
commit
037fa2dd14
@ -16,7 +16,7 @@ class ConfArgsTest(BitcoinTestFramework):
|
|||||||
|
|
||||||
|
|
||||||
def test_log_buffer(self):
|
def test_log_buffer(self):
|
||||||
with self.nodes[0].assert_debug_log(expected_msgs=['Warning: parsed potentially confusing double-negative -connect=0']):
|
with self.nodes[0].assert_debug_log(expected_msgs=['Warning: parsed potentially confusing double-negative -connect=0\n']):
|
||||||
self.start_node(0, extra_args=['-noconnect=0'])
|
self.start_node(0, extra_args=['-noconnect=0'])
|
||||||
self.stop_node(0)
|
self.stop_node(0)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user