]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
tests: set DataDirectory_option as well as DataDirectory.
authorNick Mathewson <nickm@torproject.org>
Fri, 25 Oct 2019 00:16:44 +0000 (20:16 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 25 Oct 2019 00:38:02 +0000 (20:38 -0400)
options_validate_cb() derives DataDirectory (which we use) from
DataDirectory_option (which the user sets).  I want to add a test
that will call options_validate_cb(), but it will fail unless it
derives the same value.

src/test/testing_common.c

index e14a169407bf01964351b2c792161ae32242918f..c5a4e81fbebf7d96138bc0788678bd39673da2bc 100644 (file)
@@ -326,6 +326,7 @@ main(int c, const char **v)
   initialize_mainloop_events();
   options_init(options);
   options->DataDirectory = tor_strdup(temp_dir);
+  options->DataDirectory_option = tor_strdup(temp_dir);
   tor_asprintf(&options->KeyDirectory, "%s"PATH_SEPARATOR"keys",
                options->DataDirectory);
   options->CacheDirectory = tor_strdup(temp_dir);