Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Jun 20, 2019

This makes it easier to debug a frozen test or a test that failed. To debug a failed test, remove the line fs::remove_all(m_path_root);.

The pull is done in three commits:

  • Create a datadir for every unit test once (and only once). This requires the SetDataDir function to go away.
  • Use the common setup in the gui unit tests. Some of those tests are testing the init sequence, so we'd have to undo some of what the testing setup did.
  • Log to the debug.log in all tests

@maflcko maflcko removed the Wallet label Jun 20, 2019
@maflcko maflcko force-pushed the 1905-bufferLog branch 3 times, most recently from 19cc1ba to fa295e0 Compare June 20, 2019 15:37
@laanwj
Copy link
Member

laanwj commented Jun 20, 2019

Concept ACK. I think logging can be useful for tests.

To be clear: this creates a temporary data directory for debug.log right, it doesn't touch the default data directory?

@maflcko
Copy link
Member Author

maflcko commented Jun 20, 2019

Yes, that should absolutely never happen, with or without this pull request. See also:

DOCKER_EXEC echo \> \$HOME/.bitcoin # Make sure default datadir does not exist and is never read by creating a dummy file

@DrahtBot
Copy link
Contributor

DrahtBot commented Jun 23, 2019

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #16278 (tests: Reduce compilation time and unneccessary recompiles by removing unused includes in tests by practicalswift)
  • #16273 (refactor: Reduce total compilation time by 2% and avoid unnecessary recompiles by removing unused includes by practicalswift)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@laanwj
Copy link
Member

laanwj commented Jun 25, 2019

code review, tested that debug.logs are being created under ./test_common_Bitcoin Core/*/debug.log
ACK fabc57e

@laanwj laanwj merged commit fabc57e into bitcoin:master Jun 25, 2019
laanwj added a commit that referenced this pull request Jun 25, 2019
fabc57e test: Log to debug.log in all tests (MarcoFalke)
fa4a04a test: use common setup in gui tests (MarcoFalke)
fad3d2a test: Create data dir in BasicTestingSetup (MarcoFalke)

Pull request description:

  This makes it easier to debug a frozen test or a test that failed. To debug a failed test, remove the line `fs::remove_all(m_path_root);`.

  The pull is done in three commits:
  * Create a datadir for every unit test once (and only once). This requires the `SetDataDir` function to go away.
  * Use the common setup in the gui unit tests. Some of those tests are testing the init sequence, so we'd have to undo some of what the testing setup did.
  * Log to the debug.log in all tests

ACKs for top commit:
  laanwj:
    ACK fabc57e

Tree-SHA512: 73444210b88172669e2cd22c2703a1e30e105185d2d5f03decbdedcfd09c64ed208d3716c59c8bebb0e44214cee5c8095e3e995d049e1572ee98f1017e413665
@maflcko maflcko deleted the 1905-bufferLog branch June 25, 2019 14:02
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jun 30, 2019
fabc57e test: Log to debug.log in all tests (MarcoFalke)
fa4a04a test: use common setup in gui tests (MarcoFalke)
fad3d2a test: Create data dir in BasicTestingSetup (MarcoFalke)

Pull request description:

  This makes it easier to debug a frozen test or a test that failed. To debug a failed test, remove the line `fs::remove_all(m_path_root);`.

  The pull is done in three commits:
  * Create a datadir for every unit test once (and only once). This requires the `SetDataDir` function to go away.
  * Use the common setup in the gui unit tests. Some of those tests are testing the init sequence, so we'd have to undo some of what the testing setup did.
  * Log to the debug.log in all tests

ACKs for top commit:
  laanwj:
    ACK fabc57e

Tree-SHA512: 73444210b88172669e2cd22c2703a1e30e105185d2d5f03decbdedcfd09c64ed208d3716c59c8bebb0e44214cee5c8095e3e995d049e1572ee98f1017e413665
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Mar 26, 2020
Summary:
```
This makes it easier to debug a frozen test or a test that failed. To
debug a failed test, remove the line fs::remove_all(m_path_root);.

The pull is done in three commits:

 - Create a datadir for every unit test once (and only once). This
requires the SetDataDir function to go away.
 - Use the common setup in the gui unit tests. Some of those tests are
testing the init sequence, so we'd have to undo some of what the testing
setup did.
 - Log to the debug.log in all tests

```

Backport of core [[bitcoin/bitcoin#16252 | PR16252]] and [[bitcoin/bitcoin#16289 | PR16289]] (bugfix).

Depends on D5553.

This fixes the debug.log failure when running `test_bitcoin-qt.exe` on Windows.

Test Plan:
  ninja check
Check the `/tmp/test_common_Bitcoin\ ABC/` dir is created.

Run `test_bitcoin-qt.exe` on Windows, it should return no error.

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D5556
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Oct 30, 2021
fabc57e test: Log to debug.log in all tests (MarcoFalke)
fa4a04a test: use common setup in gui tests (MarcoFalke)
fad3d2a test: Create data dir in BasicTestingSetup (MarcoFalke)

Pull request description:

  This makes it easier to debug a frozen test or a test that failed. To debug a failed test, remove the line `fs::remove_all(m_path_root);`.

  The pull is done in three commits:
  * Create a datadir for every unit test once (and only once). This requires the `SetDataDir` function to go away.
  * Use the common setup in the gui unit tests. Some of those tests are testing the init sequence, so we'd have to undo some of what the testing setup did.
  * Log to the debug.log in all tests

ACKs for top commit:
  laanwj:
    ACK fabc57e

Tree-SHA512: 73444210b88172669e2cd22c2703a1e30e105185d2d5f03decbdedcfd09c64ed208d3716c59c8bebb0e44214cee5c8095e3e995d049e1572ee98f1017e413665
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Oct 30, 2021
fabc57e test: Log to debug.log in all tests (MarcoFalke)
fa4a04a test: use common setup in gui tests (MarcoFalke)
fad3d2a test: Create data dir in BasicTestingSetup (MarcoFalke)

Pull request description:

  This makes it easier to debug a frozen test or a test that failed. To debug a failed test, remove the line `fs::remove_all(m_path_root);`.

  The pull is done in three commits:
  * Create a datadir for every unit test once (and only once). This requires the `SetDataDir` function to go away.
  * Use the common setup in the gui unit tests. Some of those tests are testing the init sequence, so we'd have to undo some of what the testing setup did.
  * Log to the debug.log in all tests

ACKs for top commit:
  laanwj:
    ACK fabc57e

Tree-SHA512: 73444210b88172669e2cd22c2703a1e30e105185d2d5f03decbdedcfd09c64ed208d3716c59c8bebb0e44214cee5c8095e3e995d049e1572ee98f1017e413665
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Nov 2, 2021
fabc57e test: Log to debug.log in all tests (MarcoFalke)
fa4a04a test: use common setup in gui tests (MarcoFalke)
fad3d2a test: Create data dir in BasicTestingSetup (MarcoFalke)

Pull request description:

  This makes it easier to debug a frozen test or a test that failed. To debug a failed test, remove the line `fs::remove_all(m_path_root);`.

  The pull is done in three commits:
  * Create a datadir for every unit test once (and only once). This requires the `SetDataDir` function to go away.
  * Use the common setup in the gui unit tests. Some of those tests are testing the init sequence, so we'd have to undo some of what the testing setup did.
  * Log to the debug.log in all tests

ACKs for top commit:
  laanwj:
    ACK fabc57e

Tree-SHA512: 73444210b88172669e2cd22c2703a1e30e105185d2d5f03decbdedcfd09c64ed208d3716c59c8bebb0e44214cee5c8095e3e995d049e1572ee98f1017e413665
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Nov 2, 2021
fabc57e test: Log to debug.log in all tests (MarcoFalke)
fa4a04a test: use common setup in gui tests (MarcoFalke)
fad3d2a test: Create data dir in BasicTestingSetup (MarcoFalke)

Pull request description:

  This makes it easier to debug a frozen test or a test that failed. To debug a failed test, remove the line `fs::remove_all(m_path_root);`.

  The pull is done in three commits:
  * Create a datadir for every unit test once (and only once). This requires the `SetDataDir` function to go away.
  * Use the common setup in the gui unit tests. Some of those tests are testing the init sequence, so we'd have to undo some of what the testing setup did.
  * Log to the debug.log in all tests

ACKs for top commit:
  laanwj:
    ACK fabc57e

Tree-SHA512: 73444210b88172669e2cd22c2703a1e30e105185d2d5f03decbdedcfd09c64ed208d3716c59c8bebb0e44214cee5c8095e3e995d049e1572ee98f1017e413665
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Nov 4, 2021
fabc57e test: Log to debug.log in all tests (MarcoFalke)
fa4a04a test: use common setup in gui tests (MarcoFalke)
fad3d2a test: Create data dir in BasicTestingSetup (MarcoFalke)

Pull request description:

  This makes it easier to debug a frozen test or a test that failed. To debug a failed test, remove the line `fs::remove_all(m_path_root);`.

  The pull is done in three commits:
  * Create a datadir for every unit test once (and only once). This requires the `SetDataDir` function to go away.
  * Use the common setup in the gui unit tests. Some of those tests are testing the init sequence, so we'd have to undo some of what the testing setup did.
  * Log to the debug.log in all tests

ACKs for top commit:
  laanwj:
    ACK fabc57e

Tree-SHA512: 73444210b88172669e2cd22c2703a1e30e105185d2d5f03decbdedcfd09c64ed208d3716c59c8bebb0e44214cee5c8095e3e995d049e1572ee98f1017e413665
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Nov 16, 2021
fabc57e test: Log to debug.log in all tests (MarcoFalke)
fa4a04a test: use common setup in gui tests (MarcoFalke)
fad3d2a test: Create data dir in BasicTestingSetup (MarcoFalke)

Pull request description:

  This makes it easier to debug a frozen test or a test that failed. To debug a failed test, remove the line `fs::remove_all(m_path_root);`.

  The pull is done in three commits:
  * Create a datadir for every unit test once (and only once). This requires the `SetDataDir` function to go away.
  * Use the common setup in the gui unit tests. Some of those tests are testing the init sequence, so we'd have to undo some of what the testing setup did.
  * Log to the debug.log in all tests

ACKs for top commit:
  laanwj:
    ACK fabc57e

Tree-SHA512: 73444210b88172669e2cd22c2703a1e30e105185d2d5f03decbdedcfd09c64ed208d3716c59c8bebb0e44214cee5c8095e3e995d049e1572ee98f1017e413665
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Nov 18, 2021
fabc57e test: Log to debug.log in all tests (MarcoFalke)
fa4a04a test: use common setup in gui tests (MarcoFalke)
fad3d2a test: Create data dir in BasicTestingSetup (MarcoFalke)

Pull request description:

  This makes it easier to debug a frozen test or a test that failed. To debug a failed test, remove the line `fs::remove_all(m_path_root);`.

  The pull is done in three commits:
  * Create a datadir for every unit test once (and only once). This requires the `SetDataDir` function to go away.
  * Use the common setup in the gui unit tests. Some of those tests are testing the init sequence, so we'd have to undo some of what the testing setup did.
  * Log to the debug.log in all tests

ACKs for top commit:
  laanwj:
    ACK fabc57e

Tree-SHA512: 73444210b88172669e2cd22c2703a1e30e105185d2d5f03decbdedcfd09c64ed208d3716c59c8bebb0e44214cee5c8095e3e995d049e1572ee98f1017e413665
@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants