Page MenuHomePhabricator

Test datadir in conf file exists
ClosedPublic

Authored by Fabien on Jan 9 2019, 11:45.

Details

Summary

If a custom data directory is specified using -datadir argument, its
existence is checked before the conf file is loaded. But if the conf
file then specifies a different non-existent datadir, that isn't tested,
and results in esoteric errors

Backport of core PR11829

Test Plan

Run bitcoind -datadir=<dir> in the following conditions:

  1. <dir> exists, check it works
  2. <dir> does not exist, check it fails

Now create a config file with the line datadir=<conf_dir> and run
bitcoind -datadir=<dir> -conf=<path_to_config_file>:

  1. <dir> exists, but not <config_dir>, check it works
  2. <dir> does not exist, but <config_dir> exists, check it fails

All the failure should display an error in the console: "specified data
directory (...) does not exist"

Diff Detail

Repository
rABC Bitcoin ABC
Branch
PR11829
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4454
Build 6972: Bitcoin ABC Buildbot (legacy)
Build 6971: arc lint + arc unit