mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 04:12:36 -03:00
Merge #17893: qa: Fix double-negative arg test
8b2f471a1b
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 ACK8b2f471a1b
. 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:
commit
f8c69677a1
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ class ConfArgsTest(BitcoinTestFramework):
|
|||
conf.write('') # clear
|
||||
|
||||
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.stop_node(0)
|
||||
|
||||
|
|
Loading…
Reference in a new issue