aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2020-01-11 07:37:33 +0800
committerfanquake <fanquake@gmail.com>2020-01-11 07:53:33 +0800
commitf8c69677a1a899a662e02cff20b79dbe924f05dd (patch)
tree8207180ed5a0a6f371c68f0d427d39b9ff9f54d0 /test
parent62b189b91d4fc08f7da893d7874f17553f7e27b3 (diff)
parent8b2f471a1bff753cc4df29805ef38c3623f64f6e (diff)
downloadbitcoin-f8c69677a1a899a662e02cff20b79dbe924f05dd.tar.xz
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
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/feature_config_args.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/functional/feature_config_args.py b/test/functional/feature_config_args.py
index 801209b1c0..d1a4cda7a0 100755
--- a/test/functional/feature_config_args.py
+++ b/test/functional/feature_config_args.py
@@ -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)