tests should never read or write and potentially corrupt the default datadir, so try to avoid it.
tests: Avoid read/write to default datadir #13663
pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:Mf1807-qaNoDefaultDatadir changing 2 files +15 −0-
MarcoFalke commented at 2:48 PM on July 14, 2018: member
-
test_bitcoin: Avoid read/write to default datadir ea80b81e2e
-
bench_bitcoin: Avoid read/write to default datadir fa43a4138b
- MarcoFalke added the label Tests on Jul 14, 2018
- MarcoFalke added this to the milestone 0.17.0 on Jul 14, 2018
-
practicalswift commented at 11:28 PM on July 15, 2018: contributor
Concept ACK
- MarcoFalke force-pushed on Jul 16, 2018
- MarcoFalke force-pushed on Jul 16, 2018
-
MarcoFalke commented at 7:59 PM on July 16, 2018: member
Added a commit to
.travis.ymlthat fails when applied to current master -
in .travis.yml:56 in fa2e42523e outdated
52 | @@ -53,6 +53,7 @@ install: 53 | - travis_retry DOCKER_EXEC apt-get update 54 | - travis_retry DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES $DOCKER_PACKAGES 55 | before_script: 56 | + - DOCKER_EXEC [ ! -d \$HOME/.bitcoin ] # Make sure default datadir does not exist
promag commented at 8:38 PM on July 16, 2018:WDYT about creating a dummy file? It would cause failure if used right?
MarcoFalke commented at 9:25 PM on July 16, 2018:Indeed. That would then give a nice bt in case of failure. Thanks
- DOCKER_EXEC echo \> \$HOME/.bitcoin # Make sure default datadir does not exist and is never read by creating a dummy fileMarcoFalke force-pushed on Jul 16, 2018MarcoFalke force-pushed on Jul 16, 2018MarcoFalke force-pushed on Jul 16, 2018MarcoFalke commented at 9:26 PM on July 16, 2018: memberReverted to my initial solution, since the functional tests are still broken. Can be fixed in a future pull...
promag commented at 10:09 PM on July 16, 2018: member@MarcoFalke makes sense to fix everything here no?
MarcoFalke commented at 1:13 AM on July 17, 2018: memberI have no idea how to fix the broken functional test cross platform without removing it.
MarcoFalke commented at 1:15 AM on July 17, 2018: memberNote the failing test: https://travis-ci.org/bitcoin/bitcoin/jobs/404617285#L3068
File "/home/travis/build/bitcoin/bitcoin/build/bitcoin-i686-pc-linux-gnu/test/functional/feature_config_args.py", line 39, in run_test self.nodes[0].assert_start_raises_init_error(['-conf=' + conf_file], 'Error reading configuration file: specified data directory "' + new_data_dir + '" does not exist.')sipa commented at 7:28 AM on July 17, 2018: memberConcept ACK
laanwj commented at 11:41 AM on July 17, 2018: memberStrange - I thought we already checked this in travis.
Anyhow thanks for fixing this again. utACK fa43a4138b4a652bd83d70536539ae2aded05f0c
MarcoFalke referenced this in commit cbc9b50734 on Jul 17, 2018MarcoFalke merged this on Jul 17, 2018MarcoFalke closed this on Jul 17, 2018MarcoFalke deleted the branch on Jul 17, 2018PastaPastaPasta referenced this in commit 35b58bf4a0 on Dec 16, 2020PastaPastaPasta referenced this in commit d60c3538d4 on Dec 18, 2020PastaPastaPasta referenced this in commit 16591be580 on Dec 18, 2020MarcoFalke 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: 2026-04-17 06:15 UTC
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: 2026-04-17 06:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me