dogecoin/test/lint
Wladimir J. van der Laan 3e1ca1348c
Merge #15278: Improve PID file error handling
3782075a5f Move all PID file stuff to init.cpp (Hennadii Stepanov)
561e375c73 Make PID file creating errors fatal (Hennadii Stepanov)
745a2ace18 Improve PID file removing errors logging (Hennadii Stepanov)

Pull request description:

  Digging into #15240 the lack of the proper logging has been discovered.
  Fixed by this PR.

  UPDATE (inspired by @laanwj's [comment](https://github.com/bitcoin/bitcoin/pull/15278#discussion_r252641810)):
  Not being able to create the PID file is fatal now.

  Output of `bitcoind`:

  ```
  $ src/bitcoind -pid=/run/bitcoind/bitcoind.pid
  2019-02-01T23:20:10Z Bitcoin Core version v0.17.99.0-561e375c7 (release build)
  2019-02-01T23:20:10Z Assuming ancestors of block 0000000000000037a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75 have valid signatures.
  2019-02-01T23:20:10Z Setting nMinimumChainWork=00000000000000000000000000000000000000000000007dbe94253893cbd463
  2019-02-01T23:20:10Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
  2019-02-01T23:20:10Z Using RdRand as an additional entropy source
  2019-02-01T23:20:11Z Error: Unable to create the PID file '/run/bitcoind/bitcoind.pid': No such file or directory
  Error: Unable to create the PID file '/run/bitcoind/bitcoind.pid': No such file or directory
  2019-02-01T23:20:11Z Shutdown: In progress...
  2019-02-01T23:20:11Z Shutdown: Unable to remove PID file: File does not exist
  2019-02-01T23:20:11Z Shutdown: done
  ```

  Output of `bitcoin-qt`:
  ![screenshot from 2019-02-02 01-19-05](https://user-images.githubusercontent.com/32963518/52154886-9349b600-2688-11e9-8128-470f16790305.png)

  **Notes for reviewers**
  1. `CreatePidFile()` has been moved from `util/system.cpp` to `init.cpp` for the following reasons:
  - to get the ability to use `InitError()`
  - now `init.cpp` contains code of both creating PID file and removing it

  2. Regarding 0.18 release process: this PR modifies 1 string and introduces 2 new ones.

Tree-SHA512: ac07d0f800e61ec759e427d0afc0ca43d67f232e977662253963afdd0a220d34b871050f58149fc9fabd427bfc8e0d3f6a6032f2a38f30ad366fc0d074b0f2b3
2019-02-21 09:23:10 +01:00
..
check-doc.py Update all subprocess.check_output functions in CI scripts to be Python 3.4 compatible 2019-01-18 09:36:39 -06:00
check-rpc-mappings.py Merge #13707: tests: Add usage note to check-rpc-mappings.py 2018-08-25 22:41:33 +02:00
commit-script-check.sh scripted-diff: Run scripted-diff in subshell 2018-12-04 07:57:02 -08:00
git-subtree-check.sh Add "export LC_ALL=C" to all shell scripts 2018-06-14 15:27:52 +02:00
lint-all.sh Obsolete #!/bin/bash shebang 2018-06-20 11:12:41 +03:00
lint-assertions.sh Add regression test: Don't assert(...) with side effects 2018-08-28 14:28:14 +02:00
lint-circular-dependencies.sh Merge #14350: Add WalletLocation class 2018-11-05 13:17:03 +01:00
lint-filenames.sh Merge #13496: Test: Harden lint-filenames.sh 2018-06-24 18:39:27 +02:00
lint-format-strings.py lint/format-strings: Correctly exclude escaped percent symbols 2018-12-14 15:43:52 +00:00
lint-format-strings.sh Fix warnings introduced in shellcheck v0.6.0 2019-01-16 15:47:56 +01:00
lint-include-guards.sh Obsolete #!/bin/bash shebang 2018-06-20 11:12:41 +03:00
lint-includes.sh scripted-diff: Replace boost::bind with std::bind 2018-10-20 02:29:59 +08:00
lint-locale-dependence.sh Make PID file creating errors fatal 2019-02-02 01:07:23 +02:00
lint-logs.sh Obsolete #!/bin/bash shebang 2018-06-20 11:12:41 +03:00
lint-python-dead-code.sh tests: add utility to easily profile node performance with perf 2019-01-22 08:55:55 -05:00
lint-python-utf8-encoding.sh lint: Make sure we read the command line inputs using utf-8 decoding in python 2018-09-02 21:40:51 +08:00
lint-python.sh lint: Enable python linters via an array 2019-01-20 17:13:22 -08:00
lint-qt.sh test: Add lint to prevent SIGNAL/SLOT connect style 2018-08-21 09:43:55 +01:00
lint-rpc-help.sh rpc: Documentation fixups 2018-11-15 12:19:11 -05:00
lint-shebang.sh Scripts and tools & Docs: Used #!/usr/bin/env bash instead of obsolete #!/bin/bash, added linting for .sh files shebang and updated the Developer Notes. 2018-12-02 16:14:21 +02:00
lint-shell-locale.sh macOS fix: Work around empty (sub)expression error when using BSD grep 2018-08-31 00:52:48 +02:00
lint-shell.sh Remove no longer needed shellcheck suppressions 2019-01-16 15:47:56 +01:00
lint-spelling.ignore-words.txt Add ignored word: mut 2018-10-16 13:34:10 +02:00
lint-spelling.sh Revert "qa: Fix codespell error and have lint-spelling error instead of warn" 2018-10-16 13:33:05 +02:00
lint-tests.sh Obsolete #!/bin/bash shebang 2018-06-20 11:12:41 +03:00
lint-whitespace.sh Replace script name with special parameter 2019-02-12 23:25:54 +02:00
README.md test: Move linters to test/lint, add readme 2018-05-24 12:02:15 -04:00

This folder contains lint scripts.

check-doc.py

Check for missing documentation of command line options.

commit-script-check.sh

Verification of scripted diffs.

git-subtree-check.sh

Run this script from the root of the repository to verify that a subtree matches the contents of the commit it claims to have been updated to.

To use, make sure that you have fetched the upstream repository branch in which the subtree is maintained:

Usage: git-subtree-check.sh DIR (COMMIT)

COMMIT may be omitted, in which case HEAD is used.

lint-all.sh

Calls other scripts with the lint- prefix.