[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 06475f30e95133e89d58bb42a33cef5627b5f29f
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
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);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits