[tor-commits] [tor/master] tests: set DataDirectory_option as well as DataDirectory.

nickm at torproject.org nickm at torproject.org
Fri Oct 25 12:15:41 UTC 2019


commit 06475f30e95133e89d58bb42a33cef5627b5f29f
Author: Nick Mathewson <nickm at torproject.org>
Date:   Thu Oct 24 20:16:44 2019 -0400

    tests: set DataDirectory_option as well as DataDirectory.
    
    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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/test/testing_common.c b/src/test/testing_common.c
index e14a16940..c5a4e81fb 100644
--- a/src/test/testing_common.c
+++ b/src/test/testing_common.c
@@ -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);





More information about the tor-commits mailing list