Skip to content

Conversation

@achow101
Copy link
Member

When running tests with --usecli, unify the conversion from argument objects to strings using a new function arg_to_cli(). This fixes boolean arguments when using named arguments.

Also use json.dumps() to get the string values for arguments that are dicts and lists so that bitcoind's JSON parser does not become confused.

@Sjors
Copy link
Member

Sjors commented Jan 31, 2019

tACK 2c847e8, Travis permitting

@laanwj
Copy link
Member

laanwj commented Jan 31, 2019

Nice ! Thank you for doing this.

utACK 2c847e8c10ccf06d6deb8650ee2f31204599fc0e

@Sjors
Copy link
Member

Sjors commented Jan 31, 2019

p2p_invalid_messages.py failed on Travis and also on my machine with macOS 10.14.3:

2019-01-31T16:36:14.813000Z TestFramework (INFO): Sending a bunch of large, junk messages to test memory exhaustion. May take a bit...
2019-01-31T16:36:18.519000Z TestFramework (INFO): Waiting for node to drop junk messages.
Fatal write error on socket transport
protocol: <test_framework.mininode.P2PDataStore object at 0x10ebcb8d0>
transport: <_SelectorSocketTransport fd=11 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
  File "/Users/bitcoin/.pyenv/versions/3.4.9/lib/python3.4/asyncio/selector_events.py", line 701, in write
    n = self._sock.send(data)
OSError: [Errno 41] Protocol wrong type for socket

The problem goes away when I rebase on master, which includes #15246. I assume merging will have the same effect.

@maflcko
Copy link
Member

maflcko commented Jan 31, 2019

@Sjors I am pretty sure this is an intermittent problem specific to macos and unrelated to any pull request.

… and lists

When running tests with --usecli, unify the conversion from argument objects to
strings using a new function arg_to_cli(). This fixes boolean arguments when
using named arguments.

Also use json.dumps() to get the string values for arguments that are dicts and
lists so that bitcoind's JSON parser does not become confused.
@achow101
Copy link
Member Author

@Sjors I've rebased it but I'm not sure that will matter. This was built on top of the latest master from a couple of hours ago.

@Sjors
Copy link
Member

Sjors commented Jan 31, 2019

tACK 2e02341

Weirdly enough it's spitting out that fatal write error on socket transport even when the test passes, so yeah, let's ignore that here.

@jnewbery
Copy link
Contributor

utACK 2e02341

@maflcko maflcko merged commit 2e02341 into bitcoin:master Jan 31, 2019
maflcko pushed a commit that referenced this pull request Jan 31, 2019
… arg conversion and handle dicts and lists

2e02341 tests: unify RPC argument to cli argument conversion and handle dicts and lists (Andrew Chow)

Pull request description:

  When running tests with --usecli, unify the conversion from argument objects to strings using a new function arg_to_cli(). This fixes boolean arguments when using named arguments.

  Also use json.dumps() to get the string values for arguments that are dicts and lists so that bitcoind's JSON parser does not become confused.

Tree-SHA512: 472bef3cd78410a8552fd342b1852bcd7c57721cfa9176b26bacda6b0791cc0b3758561a529c4117a7428242f98bb7d5482b2a2dcd06bea0ef2b15ae26183405
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants