[tests] Test starting bitcoind with -h and -version #12843

pull jnewbery wants to merge 1 commits into bitcoin:master from jnewbery:test_help changing 2 files +43 −0
  1. jnewbery commented at 5:15 pm on March 30, 2018: member

    Test that starting bitcoind/bitcoin-qt with -h and -version works as expected.

    Prompted by #10762#commitcomment-28345993, which is a nullpointer dereference triggered by starting bitcoin-qt with -h.

    On master, this test passes when run over bitcoind, but fails when running over bitcoin-qt. I used xvfb as a virtual frame buffer to test:

     0BITCOIND=/home/ubuntu/bitcoin/src/qt/bitcoin-qt xvfb-run ./feature_help.py --nocleanup
     12018-03-30T17:09:37.767000Z TestFramework (INFO): Initializing test directory /tmp/user/1000/testdi4dre13
     22018-03-30T17:09:37.767000Z TestFramework (INFO): Start bitcoin with -h for help text
     32018-03-30T17:09:37.841000Z TestFramework (ERROR): Assertion failed
     4Traceback (most recent call last):
     5  File "/home/ubuntu/bitcoin/test/functional/test_framework/test_framework.py", line 126, in main
     6    self.run_test()
     7  File "./feature_help.py", line 25, in run_test
     8    assert_equal(ret_code, 0)
     9  File "/home/ubuntu/bitcoin/test/functional/test_framework/util.py", line 39, in assert_equal
    10    raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args))
    11AssertionError: not(-11 == 0)
    122018-03-30T17:09:37.842000Z TestFramework (INFO): Stopping nodes
    13Traceback (most recent call last):
    14  File "./feature_help.py", line 42, in <module>
    15    HelpTest().main()
    16  File "/home/ubuntu/bitcoin/test/functional/test_framework/test_framework.py", line 149, in main
    17    self.stop_nodes()
    18  File "/home/ubuntu/bitcoin/test/functional/test_framework/test_framework.py", line 273, in stop_nodes
    19    node.stop_node()
    20  File "/home/ubuntu/bitcoin/test/functional/test_framework/test_node.py", line 141, in stop_node
    21    self.stop()
    22  File "/home/ubuntu/bitcoin/test/functional/test_framework/test_node.py", line 87, in __getattr__
    23    assert self.rpc_connected and self.rpc is not None, "Error: no RPC connection"
    24AssertionError: Error: no RPC connection
    

    Passes for bitcoind and bitcoin-qt when run on #12836.

    Longer term, we should consider running functional tests over bitcoin-qt in one of the Travis jobs.

  2. MarcoFalke commented at 5:18 pm on March 30, 2018: member
    utACK 850d2da03ae842e3bd00651b058fc1283b3eb9c4
  3. jamesob commented at 7:08 pm on March 30, 2018: member

    utACK https://github.com/bitcoin/bitcoin/pull/12843/commits/850d2da03ae842e3bd00651b058fc1283b3eb9c4

    Longer term, we should consider running functional tests over bitcoin-qt in one of the Travis jobs.

    Curious about what you mean here, since make check already calls qt/test/test_bitcoin-qt for the QT-enabled travis build. One additional thing we could do (which I’m happy to write in a follow-up PR) is also incorporate your xvfb-run check into that same build, which would’ve caught the null dereference in master.

    Edit: oh I see, you’re saying we should run test/functional/test_runner.py with bitcoin-qt as its binary, d’oh. Sounds like a good idea.

  4. jnewbery commented at 8:10 pm on March 30, 2018: member

    we should run test/functional/test_runner.py with bitcoin-qt as its binary

    Yes, that would have caught the null dereference (and could catch other bugs in the qt specific startup code).

  5. MarcoFalke added the label Tests on Mar 30, 2018
  6. in test/functional/feature_help.py:2 in 850d2da03a outdated
    0@@ -0,0 +1,42 @@
    1+#!/usr/bin/env python3
    2+# Copyright (c) 2017 The Bitcoin Core developers
    


    Empact commented at 8:32 pm on March 30, 2018:
    2018 🎉

    jnewbery commented at 8:35 pm on March 30, 2018:
    fixed
  7. [tests] Test starting bitcoind with -h and -version 63048ec73d
  8. jnewbery force-pushed on Mar 30, 2018
  9. Empact commented at 8:40 pm on March 30, 2018: member
    utACK 63048ec
  10. promag commented at 6:33 pm on April 1, 2018: member
    utACK 63048ec.
  11. MarcoFalke merged this on Apr 1, 2018
  12. MarcoFalke closed this on Apr 1, 2018

  13. MarcoFalke referenced this in commit d454e39f2a on Apr 1, 2018
  14. jamesob referenced this in commit 3f19ed2355 on Apr 3, 2018
  15. jamesob referenced this in commit 15e4bb01d9 on Apr 4, 2018
  16. jamesob referenced this in commit 76d6c0c7c7 on Apr 4, 2018
  17. jamesob referenced this in commit 9be7c60208 on Apr 4, 2018
  18. jamesob referenced this in commit 971e34a23c on Apr 4, 2018
  19. jamesob referenced this in commit f9af9977c3 on Apr 4, 2018
  20. jamesob referenced this in commit 709bfaebe0 on Apr 4, 2018
  21. jamesob referenced this in commit 0256aab19c on Apr 5, 2018
  22. jamesob referenced this in commit 4d19340b20 on Apr 9, 2018
  23. jamesob referenced this in commit bd1d9c4bd0 on Apr 10, 2018
  24. jamesob referenced this in commit 9eed154caf on Apr 10, 2018
  25. jamesob referenced this in commit d4d3fe225f on Apr 17, 2018
  26. jamesob referenced this in commit 22f0cf592b on Apr 17, 2018
  27. jamesob referenced this in commit 2f9c7fb379 on Apr 17, 2018
  28. jamesob referenced this in commit 15a2f8f7d2 on Apr 17, 2018
  29. MarcoFalke referenced this in commit 2626375cde on Apr 20, 2018
  30. MarcoFalke referenced this in commit df38b130d9 on Apr 20, 2018
  31. jamesob referenced this in commit 2f83646a75 on Apr 25, 2018
  32. HashUnlimited referenced this in commit 05ff536bff on May 13, 2018
  33. jamesob referenced this in commit a80c2902fc on Jun 4, 2018
  34. jamesob referenced this in commit 384bb4f1ee on Jun 4, 2018
  35. jamesob referenced this in commit 5fd09dfa53 on Jun 4, 2018
  36. jamesob referenced this in commit 20323ee533 on Jun 4, 2018
  37. ccebrecos referenced this in commit 27d8c51603 on Sep 14, 2018
  38. markblundeberg referenced this in commit fa27c55b41 on Jun 7, 2019
  39. jtoomim referenced this in commit 45a75d303b on Jun 29, 2019
  40. jonspock referenced this in commit b127610f8c on Jul 4, 2019
  41. jonspock referenced this in commit 2c1056d027 on Jul 4, 2019
  42. proteanx referenced this in commit 4d52f0671d on Jul 5, 2019
  43. jonspock referenced this in commit 0b4a16fa7a on Jul 9, 2019
  44. PastaPastaPasta referenced this in commit 0ae2a12ba0 on Mar 14, 2020
  45. PastaPastaPasta referenced this in commit 4879de76ef on Mar 19, 2020
  46. PastaPastaPasta referenced this in commit 599df2b325 on Mar 21, 2020
  47. PastaPastaPasta referenced this in commit 5fc1686919 on Mar 24, 2020
  48. ckti referenced this in commit 6efccd83cb on Mar 28, 2021
  49. gades referenced this in commit 368a862171 on Jun 30, 2021
  50. 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 15:12 UTC

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