tests: Re-enable RPC tests for Windows #8227

pull laanwj wants to merge 3 commits into bitcoin:master from laanwj:2016_05_win_reenable_rpc_tests changing 2 files +6 −10
  1. laanwj commented at 8:14 am on June 20, 2016: member

    Try RPC tests in Travis windows builds.

    Just a test, don’t merge this yet.

  2. laanwj added the label Tests on Jun 20, 2016
  3. laanwj commented at 9:07 am on June 20, 2016: member

    p2p-versionbits-warning.py fails while shutting down the nodes. This seems to be a randomly occuring issue, not related to the specific test.

     0
     1stderr:
     2   File "/home/travis/build/bitcoin/bitcoin/qa/rpc-tests/test_framework/test_framework.py", line 144, in main
     3    self.run_test()
     4  File "/home/travis/build/bitcoin/bitcoin/build/../qa/rpc-tests/p2p-versionbits-warning.py", line 154, in run_test
     5    self.test_versionbits_in_alert_file()
     6  File "/home/travis/build/bitcoin/bitcoin/build/../qa/rpc-tests/p2p-versionbits-warning.py", line 99, in test_versionbits_in_alert_file
     7    assert(self.vb_pattern.match(alert_text))
     8Traceback (most recent call last):
     9  File "/home/travis/build/bitcoin/bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 121, in _request
    10    return self._get_response()
    11  File "/home/travis/build/bitcoin/bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 159, in _get_response
    12    http_response = self.__conn.getresponse()
    13  File "/usr/lib/python3.4/http/client.py", line 1147, in getresponse
    14    response.begin()
    15  File "/usr/lib/python3.4/http/client.py", line 351, in begin
    16    version, status, reason = self._read_status()
    17  File "/usr/lib/python3.4/http/client.py", line 321, in _read_status
    18    raise BadStatusLine(line)
    19http.client.BadStatusLine: ''
    20During handling of the above exception, another exception occurred:
    21Traceback (most recent call last):
    22  File "/home/travis/build/bitcoin/bitcoin/build/../qa/rpc-tests/p2p-versionbits-warning.py", line 161, in <module>
    23    VersionBitsWarningTest().main()
    24  File "/home/travis/build/bitcoin/bitcoin/qa/rpc-tests/test_framework/test_framework.py", line 165, in main
    25    stop_nodes(self.nodes)
    26  File "/home/travis/build/bitcoin/bitcoin/qa/rpc-tests/test_framework/util.py", line 347, in stop_nodes
    27    node.stop()
    28  File "/home/travis/build/bitcoin/bitcoin/qa/rpc-tests/test_framework/coverage.py", line 49, in __call__
    29    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
    30  File "/home/travis/build/bitcoin/bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 144, in __call__
    31    response = self._request('POST', self.__url.path, postdata.encode('utf-8'))
    32  File "/home/travis/build/bitcoin/bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 125, in _request
    33    self.__conn.request(method, path, postdata, headers)
    34  File "/usr/lib/python3.4/http/client.py", line 1065, in request
    35    self._send_request(method, url, body, headers)
    36  File "/usr/lib/python3.4/http/client.py", line 1103, in _send_request
    37    self.endheaders(body)
    38  File "/usr/lib/python3.4/http/client.py", line 1061, in endheaders
    39    self._send_output(message_body)
    40  File "/usr/lib/python3.4/http/client.py", line 906, in _send_output
    41    self.send(msg)
    42  File "/usr/lib/python3.4/http/client.py", line 841, in send
    43    self.connect()
    44  File "/usr/lib/python3.4/http/client.py", line 819, in connect
    45    self.timeout, self.source_address)
    46  File "/usr/lib/python3.4/socket.py", line 509, in create_connection
    47    raise err
    48  File "/usr/lib/python3.4/socket.py", line 500, in create_connection
    49    sock.connect(sa)
    50ConnectionRefusedError: [Errno 111] Connection refused
    

    It looks like this isn’t working, or that the http shutdown is taking too long and thus quitting without returning anything: https://github.com/bitcoin/bitcoin/blob/master/src/httpserver.cpp#L485

    Conclusion: not safe to enable P2P tests for windows yet in travis. They tend to work, but this shutdown issue would introduce too many false positives. (this conclusion was wrong, see below)

  4. MarcoFalke commented at 9:11 am on June 20, 2016: member
    Isn’t it also failing the assert(self.vb_pattern.match(alert_text))?
  5. laanwj commented at 9:12 am on June 20, 2016: member
    Ok that’s one confusing error, yes that one’s failing too. That seems specific to this test. Let’s see if it is repeatable.
  6. laanwj commented at 10:01 am on June 20, 2016: member

    Okay at least the error is consistent. I retriggered Travis and it happens again, same place, same error.

    And the 32-bit windows build fails due to the same reason.

    Edit: I can also reproduce it locally in a depends build.

  7. laanwj commented at 10:43 am on June 20, 2016: member
    I’ve pushed a commit that should get past this problem.
  8. in qa/rpc-tests/p2p-versionbits-warning.py: in 3d2d6f8f5d outdated
    73@@ -74,7 +74,7 @@ def setup_network(self):
    74         self.nodes.append(start_node(0, self.options.tmpdir, self.node_options))
    75 
    76         import re
    


    MarcoFalke commented at 10:51 am on June 20, 2016:
    Nit: I think it is good practice to put those in the header.

    laanwj commented at 10:52 am on June 20, 2016:
    Yeah, unless there is a specific reason for late binding (there doesn’t seem to be here)

    MarcoFalke commented at 3:09 pm on July 5, 2016:
    Feel free to fix the nit in this pull.
  9. MarcoFalke commented at 10:51 am on June 20, 2016: member

    Thanks.

    If this passes, make sure to remove any remaining -win hacks from the script.

  10. laanwj force-pushed on Jun 20, 2016
  11. laanwj renamed this:
    tests: Try re-enabling RPC tests for Windows
    tests: Re-enable RPC tests for Windows
    on Jun 20, 2016
  12. laanwj commented at 11:21 am on June 20, 2016: member
    It passed! Reorganized the commits and removed any mention of -win in rpc-tests.py. I may be looking past it, but I didn’t find any use of that option anywhere.
  13. MarcoFalke commented at 11:48 am on June 20, 2016: member
    utACK 39d28c6
  14. laanwj commented at 12:39 pm on June 20, 2016: member
    Looks like there are timeout issues, run times for the windows tests are on the limit of what travis allows
  15. MarcoFalke commented at 3:04 pm on June 20, 2016: member
    I’ve added a commit to https://github.com/bitcoin/bitcoin/pull/8216/commits/fa58f94ff7f097260ebee791008dab368c7ac318 which should improve that, but I think after enabling qt builds again, we are again at the limit…
  16. laanwj commented at 8:31 am on June 21, 2016: member
    Re-triggered this after merging #8216, let’s see if this is more reliable.
  17. tests: Accept quotes around alert message (windows compat)
    `p2p-versionbits-warning.py` uses an alertnotify that writes to a file
    using `echo`.
    Windows `echo` doesn't strip quotes.
    So accept the alert message to be surrounded by quotes in the regular
    expression.
    265adb3b96
  18. tests: Re-enable RPC tests for Windows
    Re-enable the RPC tests for Windows. The issues preventing running the
    RPC tests on windows have been resolved by upgrading to Trusty. Remove
    the `-win` option from `rpc-tests.py`.
    dc05f6d1a5
  19. laanwj force-pushed on Jun 21, 2016
  20. MarcoFalke commented at 11:09 am on June 21, 2016: member

    There was a timeout in

    0  File "qa/pull-tester/rpc-tests.py", line 254, in get_next
    1
    2    (stdout, stderr) = proc.communicate(timeout=3)
    

    but not due to the travis limit of 50 minutes.

  21. MarcoFalke commented at 11:13 am on June 21, 2016: member
    This should not happen: It can either mean there is a zombie bitcoind running which can not be stopped (a bug we should fix) or the windows tests are running generally really slow. Bumping the timeout to 5 secs or more should fix it then.
  22. laanwj commented at 11:26 am on June 21, 2016: member
    What is the three-second timeout waiting for?
  23. MarcoFalke commented at 11:31 am on June 21, 2016: member
    If it has to wait, there is most likely a bug elsewhere in the framework. Ideally there should be no timeout set, but it has to be set to anything to change the default: https://docs.python.org/3/library/subprocess.html#subprocess.Popen.communicate.
  24. MarcoFalke commented at 11:35 am on June 21, 2016: member

    Unfortunately running the tests in parallel will hide what actually happened until the stderr and stdout are retrieved.

    I could come up with a -legacy arg to run the test sequentially with real time stdout like was done previously, for debugging purposes.

  25. MarcoFalke commented at 3:02 pm on July 5, 2016: member

    @laanwj I ran this locally to see what is the cause of the intermittent fails, but I couldn’t figure it out. It has nothing to do with the timeout=3. (You could set it to less without any issues)

    I’d suggest you cherry-pick/pull fa9d398 and we just merge it. Someone can figure out later why parallel test don’t work fine with wine/win.

  26. [qa] Don't run win-tests in parallel to avoid fails 71fd4ebbb0
  27. laanwj commented at 11:08 am on July 11, 2016: member
    @MarcoFalke Thanks - cherry-picked your commit, let’s see what travis does now.
  28. laanwj commented at 12:50 pm on July 11, 2016: member
    Ugh win32 build https://travis-ci.org/bitcoin/bitcoin/jobs/143858179: The job exceeded the maximum time limit for jobs, and has been terminated.
  29. MarcoFalke commented at 9:12 am on August 8, 2016: member

    The job exceeded the maximum time limit for jobs, and has been terminated.

    Dropping the java block tester at the same time could improve the run time.

  30. laanwj commented at 1:54 pm on August 13, 2016: member
    Good point, that is due to be disabled now: #4545 (comment)
  31. MarcoFalke commented at 8:41 pm on August 17, 2016: member
    Hmm, 71fd4eb is still taking about 48 minutes with empty cache, when rebased on current master.
  32. theuni commented at 4:09 am on August 18, 2016: member
    FYI I’m working on a qt 5.7 bump that changes the build significantly. I’m hoping for a reasonable speedup there.
  33. laanwj commented at 11:39 am on August 26, 2016: member
    Closing this for now, can be reopened after the 5.7 bump.
  34. laanwj closed this on Aug 26, 2016

  35. laanwj commented at 4:41 pm on October 20, 2016: member
    @theuni how is the qt bump going?
  36. laanwj referenced this in commit b4d85490f0 on Feb 12, 2018
  37. PastaPastaPasta referenced this in commit 26cd80ecd7 on Jun 13, 2020
  38. PastaPastaPasta referenced this in commit a494429137 on Jun 13, 2020
  39. PastaPastaPasta referenced this in commit 0ca57b5c3f on Jun 14, 2020
  40. PastaPastaPasta referenced this in commit 018cd339c4 on Jun 17, 2020
  41. PastaPastaPasta referenced this in commit 91b7040f54 on Jun 17, 2020
  42. PastaPastaPasta referenced this in commit ab1bb64ba5 on Jun 17, 2020
  43. PastaPastaPasta referenced this in commit a8da932ff0 on Jun 17, 2020
  44. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

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: 2024-11-17 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me