Commit graph

61 commits

Author SHA1 Message Date
Byron Hambly
1223ba95ca Merge f1ce67f09f into merged_master (Bitcoin PR bitcoin/bitcoin#19013) 2023-07-02 15:42:51 +00:00
Byron Hambly
31bb8332bc Merge 3bf40d06a2 into merged_master (Bitcoin PR bitcoin/bitcoin#23212) 2023-05-11 13:15:28 +00:00
James Dorfman
acd424bf3e Merge b65341555c into merged_master (Bitcoin PR bitcoin/bitcoin#22926) 2023-04-21 05:46:17 +00:00
James Dorfman
3cace2f326 Merge 78d39f8438 into merged_master (Bitcoin PR bitcoin/bitcoin#22861) 2023-04-20 20:38:04 +00:00
Glenn Willen
011feab4c4 Fix spelling lints.
For all spelling lints, either fix them in place, or add them to the
ignore list.

I don't understand how these have gotten in here without ever
triggering the linter until now. I'm not sure if it's something about
my test environment or what. But fixing them can't hurt.
2023-02-26 19:30:18 -08:00
Sjors Provoost
d8b705f1ca
test: previous releases: add v22.0 2021-12-16 12:41:45 +07:00
Sjors Provoost
8a57a06a50
test: previous releases: add v0.21.0 2021-12-16 12:41:44 +07:00
josibake
6ae9c2ef23
lint: install pyzmq (22.3.0) into linter environment
mypy stubs were introduced in 21.0.1
2021-10-16 09:14:36 +08:00
fanquake
b93e2299da
doc: remove pointlessly duplicated linter version / install info 2021-10-16 09:14:36 +08:00
Hennadii Stepanov
c427a5800b
doc: Set PYTHONUTF8=1 for functional tests on Windows 2021-09-09 00:19:46 +03:00
MarcoFalke
fa0937de35
test: Rename bitcoin-util-test.py to util/test_runner.py
To normalize the name of all three test runners (fuzz, functional, util).
2021-09-02 10:43:19 +02:00
MarcoFalke
fa050bbc0a
test: Update test README and lint script 2021-09-02 10:26:35 +02:00
Andrew Poelstra
ce53627c25 Merge 531c2b7c04 into merged_master (Bitcoin PR bitcoin/bitcoin#20354) 2021-08-01 17:26:59 +00:00
MarcoFalke
531c2b7c04
Merge bitcoin/bitcoin#20354: test: Add feature_taproot.py --previous_release
fa80e10d94 test: Add feature_taproot.py --previous_release (MarcoFalke)
85ccffa266 test: move releases download incantation to README (Sjors Provoost)
29d6b1da2a test: previous releases: add v0.20.1 (Sjors Provoost)

Pull request description:

  Disabling the new consensus code at runtime is fine, but potentially fragile and incomplete. Fix that by giving the option to run with a version that has been compiled without any taproot code.

ACKs for top commit:
  Sjors:
    tACK fa80e10
  NelsonGaldeman:
    tACK fa80e10d94

Tree-SHA512: 1a1feef823f08c05268759645a8974e1b2d39a024258f5e6acecbe25097aae3fa9302c27262978b40f1aa8e7b525b60c0047199010f2a5d6017dd6434b4066f0
2021-07-14 10:57:06 +02:00
Andrew Poelstra
c7b124ac91 Merge 1a60c547fd into merged_master (Bitcoin PR bitcoin/bitcoin#21749) 2021-07-08 05:07:57 +00:00
Andrew Poelstra
6ce592d7cd Merge 1b9a5236e9 into merged_master (Bitcoin PR bitcoin/bitcoin#21740) 2021-07-07 01:15:58 +00:00
Andrew Poelstra
f1c013c119 Merge f52f427b8e into merged_master (Bitcoin PR #20817) 2021-06-16 16:33:15 +00:00
W. J. van der Laan
1a60c547fd
Merge bitcoin/bitcoin#21749: test: Bump shellcheck version
08f3dbb1b0 test: Bump shellcheck version (Hennadii Stepanov)

Pull request description:

  The changelog for v0.7.2 is available [here](https://github.com/koalaman/shellcheck/blob/v0.7.2/CHANGELOG.md).

  Only [SC2268](https://github.com/koalaman/shellcheck/wiki/SC2268) requires to update our code.

ACKs for top commit:
  jarolrod:
    ACK  08f3dbb1b0

Tree-SHA512: 4585cd1f4d9def2fbaafe5a2a57761288d432781eb8c6c6d37064727d7ca8fc3f35c552e6a2ffdf0820d753d4bde2c8e43e5f3f57d242f5f57591a9b1b03558d
2021-05-10 13:49:50 +02:00
windsok
46b025e00d test: add new python linter to check file names and permissions
Replaces the existing tests in the test/lint/lint-filenames.sh and test/lint/lint-shebang.sh linter tests, as well as adding some new and increased testing.
Summary of tests:
- Checks every file in the repository against an allowed regexp to make sure only lowercase or uppercase alphanumerics (a-zA-Z0-9), underscores (_), hyphens (-), at (@) and dots (.) are used in repository filenames.
- Checks only source files (*.cpp, *.h, *.py, *.sh) against a stricter allowed regexp to make sure only lowercase alphanumerics (a-z0-9), underscores (_), hyphens (-) and dots (.) are used in source code filenames. Additionally there is an exception regexp for directories or files which are excepted from matching this regexp (This should replicate the existing test/lint/lint-filenames.sh test)
- Checks all files in the repository match an allowed executable or non-executable file permission octal. Additionally checks that for executable files, the file contains a shebang line.
- Checks that for executable .py and .sh files, the shebang line used matches an allowable list of shebangs (This should replicate the existing test/lint/lint-shebang.sh test)
- Checks every file that contains a shebang line to ensure it has an executable permission

Fixes #21729
2021-04-29 17:00:58 -07:00
Hennadii Stepanov
08f3dbb1b0
test: Bump shellcheck version 2021-04-22 12:14:05 +03:00
Sjors Provoost
85ccffa266 test: move releases download incantation to README 2021-02-25 08:50:34 +01:00
Sebastian Falbesoner
a0022f1cfb test: bump codespell linter version to 2.0.0 2021-01-02 12:21:03 +01:00
Andrew Poelstra
ec5e799c05 Merge 910f0468a1 into merged_master (Bitcoin PR #19348) 2020-11-26 01:09:13 +00:00
Andrew Poelstra
1044c64be3 Merge 17cfa52d38 into merged_master (Bitcoin PR #19172) 2020-11-26 01:08:59 +00:00
Andrew Poelstra
dccd3297b0 Merge 362f9c60a5 into merged_master (Bitcoin PR #18986) 2020-11-26 01:08:45 +00:00
Andrew Poelstra
f3b377f05b Merge cf4cb28efc into merged_master (Bitcoin PR #18305) 2020-11-26 01:07:52 +00:00
Andrew Poelstra
b4d7d9d503 Merge 1f59885d27 into merged_master (Bitcoin PR #17361) 2020-11-14 16:51:50 +00:00
Andrew Poelstra
23e022906c Merge 22a58811d4 into merged_master (Bitcoin PR #17353) 2020-11-09 23:10:07 +00:00
Andrew Poelstra
18bd84d6b6 Merge 88eff969c2 into merged_master (Bitcoin PR #17177) 2020-11-09 21:20:41 +00:00
Andrew Poelstra
8926bc044b Merge 9edb2b6550 into merged_master (Bitcoin PR #16953) 2020-11-09 21:20:29 +00:00
Andrew Poelstra
1e09e584fd Merge 0515406acb into merged_master (Bitcoin PR #16374) 2020-11-09 21:20:06 +00:00
Andrew Poelstra
6515bef81f Merge 413e438ea9 into merged_master (Bitcoin PR #16243) 2020-11-06 15:20:16 +00:00
Duncan Dean
39d526bde4
test: Bump linter versions
Updates Python linters, spellchecking, and ShellCheck versions. The PR links are updated for
the dependency versions in test/README.md. ShellCheck SC2230 removed to align with with new
behaviour in v0.7.1.

Fixes #19346.
2020-06-22 20:15:53 +02:00
Hennadii Stepanov
5d77549d8b
doc: Add mypy to test dependencies 2020-06-05 16:16:16 +03:00
codeShark149
38c3dd9c70 docs: Add notes on how to diasble rpc timeout in functional tests while attatching gdb. 2020-05-18 21:18:40 +05:30
MarcoFalke
ffff9dcdc3
test: Explain why test logging should be used 2020-03-10 08:24:49 -04:00
Hennadii Stepanov
14aded46df
script: Lint Gitian descriptors with ShellCheck 2019-11-06 15:10:11 +02:00
Hennadii Stepanov
2ad74b78c6
doc: Add ShellCheck to lint tests dependencies 2019-11-02 17:43:07 +02:00
Martin Erlandsson
9576614d2d doc: Describe log files + consistent paths in test READMEs 2019-10-17 17:53:45 +02:00
Fabian Jahr
43e7d576f5 doc: Improve test READMEs 2019-09-26 19:04:58 +02:00
Jon Atack
e142ee03e7
doc: describe how to pass wildcard names to test runner 2019-07-15 10:14:23 +02:00
MarcoFalke
e91f0a7af2 doc: Remove travis badge from readme 2019-06-19 11:39:27 -04:00
Steven Roose
f4889a5253
UPSTREAM MERGE BROKEN: Merge upstream commit '519b0bc5dc' into master 2019-05-17 16:17:09 +01:00
Steven Roose
7f894ae00b
UPSTREAM MERGE BROKEN: Merge commit 'f617e05c38' into master 2019-05-01 19:18:18 +01:00
MarcoFalke
5029e94f85
Merge #14519: tests: add utility to easily profile node performance with perf
13782b8ba8 docs: add perf section to developer docs (James O'Beirne)
58180b5fd4 tests: add utility to easily profile node performance with perf (James O'Beirne)

Pull request description:

  Adds a context manager to easily (and selectively) profile node performance during functional test execution using `perf`.

  While writing some tests, I encountered some odd bitcoind slowness. I wrote up a utility (`TestNode.profile_with_perf`) that generates performance diagnostics for a node by running `perf` during the execution of a particular region of test code.

  `perf` usage is detailed in the excellent (and sadly unmerged) https://github.com/bitcoin/bitcoin/pull/12649; all due props to @eklitzke.

  ### Example

  ```python
  with node.profile_with_perf("large-msgs"):
      for i in range(200):
          node.p2p.send_message(some_large_msg)
      node.p2p.sync_with_ping()
  ```

  This generates a perf data file in the test node's datadir (`/tmp/testtxmpod0y/node0/node-0-TestName-large-msgs.perf.data`).

  Running `perf report` generates nice output about where the node spent most of its time while running that part of the test:

  ```bash
  $ perf report -i /tmp/testtxmpod0y/node0/node-0-TestName-large-msgs.perf.data --stdio \
    | c++filt \
    | less

  # To display the perf.data header info, please use --header/--header-only options.
  #
  #
  # Total Lost Samples: 0
  #
  # Samples: 135  of event 'cycles:pp'
  # Event count (approx.): 1458205679493582
  #
  # Children      Self  Command          Shared Object        Symbol
  # ........  ........  ...............  ...................  ........................................................................................................................................................................................................................................................................
  #
      70.14%     0.00%  bitcoin-net      bitcoind             [.] CNode::ReceiveMsgBytes(char const*, unsigned int, bool&)
                  |
                  ---CNode::ReceiveMsgBytes(char const*, unsigned int, bool&)

      70.14%     0.00%  bitcoin-net      bitcoind             [.] CNetMessage::readData(char const*, unsigned int)
                  |
                  ---CNetMessage::readData(char const*, unsigned int)
                     CNode::ReceiveMsgBytes(char const*, unsigned int, bool&)

      35.52%     0.00%  bitcoin-net      bitcoind             [.] std::vector<char, zero_after_free_allocator<char> >::_M_fill_insert(__gnu_cxx::__normal_iterator<char*, std::vector<char, zero_after_free_allocator<char> > >, unsigned long, char const&)
                  |
                  ---std::vector<char, zero_after_free_allocator<char> >::_M_fill_insert(__gnu_cxx::__normal_iterator<char*, std::vector<char, zero_after_free_allocator<char> > >, unsigned long, char const&)
                     CNetMessage::readData(char const*, unsigned int)
                     CNode::ReceiveMsgBytes(char const*, unsigned int, bool&)

  ...
  ```

Tree-SHA512: 9ac4ceaa88818d5eca00994e8e3c8ad42ae019550d6583972a0a4f7b0c4f61032e3d0c476b4ae58756bc5eb8f8015a19a7fc26c095bd588f31d49a37ed0c6b3e
2019-02-05 17:40:16 -05:00
Gregory Sanders
f96dbd1bbe gdb attaching to process during tests has non-sudo solution 2019-01-31 12:25:04 +00:00
James O'Beirne
58180b5fd4 tests: add utility to easily profile node performance with perf
Introduces `TestNode.profile_with_perf()` context manager which
samples node execution to produce profiling data.

Also introduces a test framework flag, `--perf`, which will run
perf on all nodes for the duration of a given test.
2019-01-22 08:55:55 -05:00
benthecarman
ef5ebc6d8f
docs: Clarifying testing instructions 2019-01-09 11:10:12 -06:00
Mason Simon
8640631ebc
docs: Document lint tests 2018-10-20 13:09:05 +08:00
Jorge Timón
a1e0c56a55
QA: Use resgtest2 chain instead of regtest for rpc tests 2018-10-16 18:32:20 +02:00