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

[tor-commits] [tor/master] test_options.c: Remove TEST_OPTIONS_DEFAULT_VALUES



commit 171a741901d7368a4fbb6573ff7a6f3bbfd8341c
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon Oct 21 14:41:27 2019 -0400

    test_options.c: Remove TEST_OPTIONS_DEFAULT_VALUES
    
    This finally became the empty string, since we no longer have to do
    anything in individual test_options.c tests to make "" be a valid
    set of options.  Now we can remove it at last.
---
 src/test/test_options.c | 539 +++++++++++++++---------------------------------
 1 file changed, 166 insertions(+), 373 deletions(-)

diff --git a/src/test/test_options.c b/src/test/test_options.c
index e515967af..11a7ecfd3 100644
--- a/src/test/test_options.c
+++ b/src/test/test_options.c
@@ -390,9 +390,6 @@ fixed_get_uname(void)
   return fixed_get_uname_result;
 }
 
-#define TEST_OPTIONS_DEFAULT_VALUES                                     \
-  ""
-
 typedef struct {
   or_options_t *old_opt;
   or_options_t *opt;
@@ -1646,8 +1643,7 @@ test_options_validate__reachable_addresses(void *ignored)
   /* Test IPv4-only clients setting IPv6 preferences */
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ClientUseIPv4 1\n"
+  tdata = get_options_test_data("ClientUseIPv4 1\n"
                                 "ClientUseIPv6 0\n"
                                 "UseBridges 0\n"
                                 "ClientPreferIPv6ORPort 1\n");
@@ -1657,8 +1653,7 @@ test_options_validate__reachable_addresses(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ClientUseIPv4 1\n"
+  tdata = get_options_test_data("ClientUseIPv4 1\n"
                                 "ClientUseIPv6 0\n"
                                 "UseBridges 0\n"
                                 "ClientPreferIPv6DirPort 1\n");
@@ -1670,8 +1665,7 @@ test_options_validate__reachable_addresses(void *ignored)
   /* Now test an IPv4/IPv6 client setting IPv6 preferences */
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ClientUseIPv4 1\n"
+  tdata = get_options_test_data("ClientUseIPv4 1\n"
                                 "ClientUseIPv6 1\n"
                                 "ClientPreferIPv6ORPort 1\n"
                                 "ClientPreferIPv6DirPort 1\n");
@@ -1683,8 +1677,7 @@ test_options_validate__reachable_addresses(void *ignored)
   /* Now test an IPv6 client setting IPv6 preferences */
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ClientUseIPv6 1\n"
+  tdata = get_options_test_data("ClientUseIPv6 1\n"
                                 "ClientPreferIPv6ORPort 1\n"
                                 "ClientPreferIPv6DirPort 1\n");
 
@@ -1695,8 +1688,7 @@ test_options_validate__reachable_addresses(void *ignored)
   /* And an implicit (IPv4 disabled) IPv6 client setting IPv6 preferences */
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ClientUseIPv4 0\n"
+  tdata = get_options_test_data("ClientUseIPv4 0\n"
                                 "ClientPreferIPv6ORPort 1\n"
                                 "ClientPreferIPv6DirPort 1\n");
 
@@ -1707,8 +1699,7 @@ test_options_validate__reachable_addresses(void *ignored)
   /* And an implicit (bridge) client setting IPv6 preferences */
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "UseBridges 1\n"
+  tdata = get_options_test_data("UseBridges 1\n"
                                 "Bridge 127.0.0.1:12345\n"
                                 "ClientPreferIPv6ORPort 1\n"
                                 "ClientPreferIPv6DirPort 1\n");
@@ -1760,8 +1751,7 @@ test_options_validate__use_bridges(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "UseBridges 1\n");
+  tdata = get_options_test_data("UseBridges 1\n");
 
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
@@ -1770,8 +1760,7 @@ test_options_validate__use_bridges(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "UseBridges 1\n"
+  tdata = get_options_test_data("UseBridges 1\n"
                                 "Bridge 10.0.0.1\n"
                                 "UseEntryGuards 0\n"
                                 );
@@ -1783,8 +1772,7 @@ test_options_validate__use_bridges(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "UseBridges 1\n"
+  tdata = get_options_test_data("UseBridges 1\n"
                                 "Bridge 10.0.0.1\n"
                                 "Bridge !!!\n"
                                 );
@@ -1891,16 +1879,14 @@ test_options_validate__publish_server_descriptor(void *ignored)
   char *msg;
   setup_capture_of_logs(LOG_WARN);
   options_test_data_t *tdata = get_options_test_data(
-             "PublishServerDescriptor bridge\n" TEST_OPTIONS_DEFAULT_VALUES
-                                                     );
+             "PublishServerDescriptor bridge\n");
 
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
   tt_assert(!msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data("PublishServerDescriptor humma\n"
-                                TEST_OPTIONS_DEFAULT_VALUES);
+  tdata = get_options_test_data("PublishServerDescriptor humma\n");
 
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
@@ -1908,8 +1894,7 @@ test_options_validate__publish_server_descriptor(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data("PublishServerDescriptor bridge, v3\n"
-                                TEST_OPTIONS_DEFAULT_VALUES);
+  tdata = get_options_test_data("PublishServerDescriptor bridge, v3\n");
 
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
@@ -1920,8 +1905,7 @@ test_options_validate__publish_server_descriptor(void *ignored)
 
   free_options_test_data(tdata);
   tdata = get_options_test_data("BridgeRelay 1\n"
-                                "PublishServerDescriptor v3\n"
-                                TEST_OPTIONS_DEFAULT_VALUES);
+                                "PublishServerDescriptor v3\n");
 
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
@@ -1931,7 +1915,7 @@ test_options_validate__publish_server_descriptor(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data("BridgeRelay 1\n" TEST_OPTIONS_DEFAULT_VALUES);
+  tdata = get_options_test_data("BridgeRelay 1\n");
 
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
@@ -1942,7 +1926,7 @@ test_options_validate__publish_server_descriptor(void *ignored)
 
   free_options_test_data(tdata);
   tdata = get_options_test_data("BridgeRelay 1\n"
-                                "DirPort 999\n" TEST_OPTIONS_DEFAULT_VALUES);
+                                "DirPort 999\n");
 
   mock_clean_saved_logs();
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -1970,8 +1954,7 @@ test_options_validate__testing(void *ignored)
 #define ENSURE_DEFAULT(varname, varval)                     \
   STMT_BEGIN                                                \
     free_options_test_data(tdata);                          \
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES \
-                                #varname " " #varval "\n"); \
+  tdata = get_options_test_data(#varname " " #varval "\n"); \
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);\
   tt_str_op(msg, OP_EQ, \
             #varname " may only be changed in testing Tor networks!");  \
@@ -1979,8 +1962,7 @@ test_options_validate__testing(void *ignored)
   tor_free(msg);                                                        \
                                                 \
   free_options_test_data(tdata); \
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES \
-                                #varname " " #varval "\n"               \
+  tdata = get_options_test_data(#varname " " #varval "\n"               \
                                 VALID_DIR_AUTH                          \
                                 "TestingTorNetwork 1\n");               \
                                                                         \
@@ -1992,8 +1974,7 @@ test_options_validate__testing(void *ignored)
   } \
                                                                         \
   free_options_test_data(tdata);          \
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES \
-                                #varname " " #varval "\n"           \
+  tdata = get_options_test_data(#varname " " #varval "\n"           \
                                 "___UsingTestNetworkDefaults 1\n"); \
                                                                         \
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);\
@@ -2039,8 +2020,8 @@ test_options_validate__hidserv(void *ignored)
   char *msg;
   setup_capture_of_logs(LOG_WARN);
 
-  options_test_data_t *tdata = get_options_test_data(
-                                                TEST_OPTIONS_DEFAULT_VALUES);
+  options_test_data_t *tdata = get_options_test_data("");
+
   tdata->opt->MinUptimeHidServDirectoryV2 = -1;
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
@@ -2050,8 +2031,7 @@ test_options_validate__hidserv(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "RendPostPeriod 1\n" );
+  tdata = get_options_test_data("RendPostPeriod 1\n" );
   mock_clean_saved_logs();
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
@@ -2061,8 +2041,7 @@ test_options_validate__hidserv(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "RendPostPeriod 302401\n" );
+  tdata = get_options_test_data("RendPostPeriod 302401\n" );
   mock_clean_saved_logs();
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
@@ -2086,7 +2065,6 @@ test_options_validate__path_bias(void *ignored)
   char *msg;
 
   options_test_data_t *tdata = get_options_test_data(
-                                            TEST_OPTIONS_DEFAULT_VALUES
                                             "PathBiasNoticeRate 1.1\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
@@ -2095,8 +2073,7 @@ test_options_validate__path_bias(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "PathBiasWarnRate 1.1\n");
+  tdata = get_options_test_data("PathBiasWarnRate 1.1\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ,
@@ -2104,8 +2081,7 @@ test_options_validate__path_bias(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "PathBiasExtremeRate 1.1\n");
+  tdata = get_options_test_data("PathBiasExtremeRate 1.1\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ,
@@ -2113,8 +2089,7 @@ test_options_validate__path_bias(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "PathBiasNoticeUseRate 1.1\n");
+  tdata = get_options_test_data("PathBiasNoticeUseRate 1.1\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ,
@@ -2122,8 +2097,7 @@ test_options_validate__path_bias(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "PathBiasExtremeUseRate 1.1\n");
+  tdata = get_options_test_data("PathBiasExtremeUseRate 1.1\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ,
@@ -2146,7 +2120,7 @@ test_options_validate__bandwidth(void *ignored)
 #define ENSURE_BANDWIDTH_PARAM(p) \
   STMT_BEGIN                                                \
   free_options_test_data(tdata); \
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES #p " 3Gb\n"); \
+  tdata = get_options_test_data(#p " 3Gb\n"); \
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);\
   tt_int_op(ret, OP_EQ, -1); \
   tt_mem_op(msg, OP_EQ, #p " (3221225471) must be at most 2147483647", 40); \
@@ -2164,24 +2138,21 @@ test_options_validate__bandwidth(void *ignored)
   ENSURE_BANDWIDTH_PARAM(AuthDirGuardBWGuarantee);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "RelayBandwidthRate 1000\n");
+  tdata = get_options_test_data("RelayBandwidthRate 1000\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
   tt_u64_op(tdata->opt->RelayBandwidthBurst, OP_EQ, 1000);
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "RelayBandwidthBurst 1001\n");
+  tdata = get_options_test_data("RelayBandwidthBurst 1001\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
   tt_u64_op(tdata->opt->RelayBandwidthRate, OP_EQ, 1001);
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "RelayBandwidthRate 1001\n"
+  tdata = get_options_test_data("RelayBandwidthRate 1001\n"
                                 "RelayBandwidthBurst 1000\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
@@ -2190,8 +2161,7 @@ test_options_validate__bandwidth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "BandwidthRate 1001\n"
+  tdata = get_options_test_data("BandwidthRate 1001\n"
                                 "BandwidthBurst 1000\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
@@ -2200,8 +2170,7 @@ test_options_validate__bandwidth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "RelayBandwidthRate 1001\n"
+  tdata = get_options_test_data("RelayBandwidthRate 1001\n"
                                 "BandwidthRate 1000\n"
                                 "BandwidthBurst 1000\n"
                                 );
@@ -2211,8 +2180,7 @@ test_options_validate__bandwidth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "RelayBandwidthRate 1001\n"
+  tdata = get_options_test_data("RelayBandwidthRate 1001\n"
                                 "BandwidthRate 1000\n"
                                 "RelayBandwidthBurst 1001\n"
                                 "BandwidthBurst 1000\n"
@@ -2223,8 +2191,7 @@ test_options_validate__bandwidth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ORPort 127.0.0.1:5555\n"
+  tdata = get_options_test_data("ORPort 127.0.0.1:5555\n"
                                 "BandwidthRate 1\n"
                                 );
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -2234,8 +2201,7 @@ test_options_validate__bandwidth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ORPort 127.0.0.1:5555\n"
+  tdata = get_options_test_data("ORPort 127.0.0.1:5555\n"
                                 "BandwidthRate 76800\n"
                                 "MaxAdvertisedBandwidth 30000\n"
                                 );
@@ -2246,8 +2212,7 @@ test_options_validate__bandwidth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ORPort 127.0.0.1:5555\n"
+  tdata = get_options_test_data("ORPort 127.0.0.1:5555\n"
                                 "BandwidthRate 76800\n"
                                 "RelayBandwidthRate 1\n"
                                 "MaxAdvertisedBandwidth 38400\n"
@@ -2259,8 +2224,7 @@ test_options_validate__bandwidth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ORPort 127.0.0.1:5555\n"
+  tdata = get_options_test_data("ORPort 127.0.0.1:5555\n"
                                 "BandwidthRate 76800\n"
                                 "BandwidthBurst 76800\n"
                                 "RelayBandwidthRate 76800\n"
@@ -2285,8 +2249,7 @@ test_options_validate__circuits(void *ignored)
   setup_capture_of_logs(LOG_WARN);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "MaxCircuitDirtiness 2592001\n");
+  tdata = get_options_test_data("MaxCircuitDirtiness 2592001\n");
   options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   expect_log_msg("MaxCircuitDirtiness option is too "
             "high; setting to 30 days.\n");
@@ -2295,8 +2258,7 @@ test_options_validate__circuits(void *ignored)
 
   free_options_test_data(tdata);
   mock_clean_saved_logs();
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "CircuitStreamTimeout 1\n");
+  tdata = get_options_test_data("CircuitStreamTimeout 1\n");
   options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   expect_log_msg("CircuitStreamTimeout option is too"
             " short; raising to 10 seconds.\n");
@@ -2305,8 +2267,7 @@ test_options_validate__circuits(void *ignored)
 
   free_options_test_data(tdata);
   mock_clean_saved_logs();
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "CircuitStreamTimeout 111\n");
+  tdata = get_options_test_data("CircuitStreamTimeout 111\n");
   options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   expect_no_log_msg("CircuitStreamTimeout option is too"
             " short; raising to 10 seconds.\n");
@@ -2315,8 +2276,7 @@ test_options_validate__circuits(void *ignored)
 
   free_options_test_data(tdata);
   mock_clean_saved_logs();
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "HeartbeatPeriod 1\n");
+  tdata = get_options_test_data("HeartbeatPeriod 1\n");
   options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   expect_log_msg("HeartbeatPeriod option is too short;"
             " raising to 1800 seconds.\n");
@@ -2325,8 +2285,7 @@ test_options_validate__circuits(void *ignored)
 
   free_options_test_data(tdata);
   mock_clean_saved_logs();
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "HeartbeatPeriod 1982\n");
+  tdata = get_options_test_data("HeartbeatPeriod 1982\n");
   options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   expect_no_log_msg("HeartbeatPeriod option is too short;"
             " raising to 1800 seconds.\n");
@@ -2335,8 +2294,7 @@ test_options_validate__circuits(void *ignored)
 
   free_options_test_data(tdata);
   mock_clean_saved_logs();
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "LearnCircuitBuildTimeout 0\n"
+  tdata = get_options_test_data("LearnCircuitBuildTimeout 0\n"
                                 "CircuitBuildTimeout 1\n"
                                 );
   options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -2348,8 +2306,7 @@ test_options_validate__circuits(void *ignored)
 
   free_options_test_data(tdata);
   mock_clean_saved_logs();
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "CircuitBuildTimeout 11\n"
+  tdata = get_options_test_data("CircuitBuildTimeout 11\n"
                                 );
   options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   expect_no_log_msg("CircuitBuildTimeout is shorter (1 "
@@ -2375,7 +2332,7 @@ test_options_validate__rend(void *ignored)
   setup_capture_of_logs(LOG_WARN);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
+  tdata = get_options_test_data(
                  "UseEntryGuards 0\n"
                  "HiddenServiceDir /Library/Tor/var/lib/tor/hidden_service/\n"
                  "HiddenServicePort 80 127.0.0.1:8080\n"
@@ -2391,7 +2348,6 @@ test_options_validate__rend(void *ignored)
 
   free_options_test_data(tdata);
   tdata = get_options_test_data(
-            TEST_OPTIONS_DEFAULT_VALUES
             "UseEntryGuards 1\n"
             "HiddenServiceDir /Library/Tor/var/lib/tor/hidden_service/\n"
             "HiddenServicePort 80 127.0.0.1:8080\n"
@@ -2406,9 +2362,7 @@ test_options_validate__rend(void *ignored)
             "attack06 for details.\n");
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "HiddenServicePort 80 127.0.0.1:8080\n"
-                                );
+  tdata = get_options_test_data("HiddenServicePort 80 127.0.0.1:8080\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ,
@@ -2416,9 +2370,7 @@ test_options_validate__rend(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "HidServAuth failed\n"
-                                );
+  tdata = get_options_test_data("HidServAuth failed\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ, "Failed to configure client authorization for hidden "
@@ -2443,8 +2395,7 @@ test_options_validate__single_onion(void *ignored)
 
   /* Test that HiddenServiceSingleHopMode must come with
    * HiddenServiceNonAnonymousMode */
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "SOCKSPort 0\n"
+  tdata = get_options_test_data("SOCKSPort 0\n"
                                 "HiddenServiceSingleHopMode 1\n"
                                 );
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -2455,8 +2406,7 @@ test_options_validate__single_onion(void *ignored)
   tor_free(msg);
   free_options_test_data(tdata);
 
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "SOCKSPort 0\n"
+  tdata = get_options_test_data("SOCKSPort 0\n"
                                 "HiddenServiceSingleHopMode 1\n"
                                 "HiddenServiceNonAnonymousMode 0\n"
                                 );
@@ -2468,8 +2418,7 @@ test_options_validate__single_onion(void *ignored)
   tor_free(msg);
   free_options_test_data(tdata);
 
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "SOCKSPort 0\n"
+  tdata = get_options_test_data("SOCKSPort 0\n"
                                 "HiddenServiceSingleHopMode 1\n"
                                 "HiddenServiceNonAnonymousMode 1\n"
                                 );
@@ -2479,8 +2428,7 @@ test_options_validate__single_onion(void *ignored)
   free_options_test_data(tdata);
 
   /* Test that SOCKSPort if HiddenServiceSingleHopMode is 1 */
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "SOCKSPort 5000\n"
+  tdata = get_options_test_data("SOCKSPort 5000\n"
                                 "HiddenServiceSingleHopMode 1\n"
                                 "HiddenServiceNonAnonymousMode 1\n"
                                 );
@@ -2493,8 +2441,7 @@ test_options_validate__single_onion(void *ignored)
   tor_free(msg);
   free_options_test_data(tdata);
 
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "SOCKSPort 0\n"
+  tdata = get_options_test_data("SOCKSPort 0\n"
                                 "HiddenServiceSingleHopMode 1\n"
                                 "HiddenServiceNonAnonymousMode 1\n"
                                 );
@@ -2503,8 +2450,7 @@ test_options_validate__single_onion(void *ignored)
   tt_ptr_op(msg, OP_EQ, NULL);
   free_options_test_data(tdata);
 
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "SOCKSPort 5000\n"
+  tdata = get_options_test_data("SOCKSPort 5000\n"
                                 "HiddenServiceSingleHopMode 0\n"
                                 );
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -2513,7 +2459,7 @@ test_options_validate__single_onion(void *ignored)
   free_options_test_data(tdata);
 
   /* Test that a hidden service can't be run in non anonymous mode. */
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
+  tdata = get_options_test_data(
                   "HiddenServiceNonAnonymousMode 1\n"
                   "HiddenServiceDir /Library/Tor/var/lib/tor/hidden_service/\n"
                   "HiddenServicePort 80 127.0.0.1:8080\n"
@@ -2526,7 +2472,7 @@ test_options_validate__single_onion(void *ignored)
   tor_free(msg);
   free_options_test_data(tdata);
 
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
+  tdata = get_options_test_data(
                   "HiddenServiceNonAnonymousMode 1\n"
                                 );
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -2537,7 +2483,7 @@ test_options_validate__single_onion(void *ignored)
   tor_free(msg);
   free_options_test_data(tdata);
 
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
+  tdata = get_options_test_data(
                   "HiddenServiceDir /Library/Tor/var/lib/tor/hidden_service/\n"
                   "HiddenServicePort 80 127.0.0.1:8080\n"
                                 );
@@ -2546,7 +2492,7 @@ test_options_validate__single_onion(void *ignored)
   tt_ptr_op(msg, OP_EQ, NULL);
   free_options_test_data(tdata);
 
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
+  tdata = get_options_test_data(
                   "HiddenServiceNonAnonymousMode 1\n"
                   "HiddenServiceDir /Library/Tor/var/lib/tor/hidden_service/\n"
                   "HiddenServicePort 80 127.0.0.1:8080\n"
@@ -2574,36 +2520,28 @@ test_options_validate__accounting(void *ignored)
   setup_capture_of_logs(LOG_WARN);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "AccountingRule something_bad\n"
-                                );
+  tdata = get_options_test_data("AccountingRule something_bad\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ, "AccountingRule must be 'sum', 'max', 'in', or 'out'");
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "AccountingRule sum\n"
-                                );
+  tdata = get_options_test_data("AccountingRule sum\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
   tt_int_op(tdata->opt->AccountingRule, OP_EQ, ACCT_SUM);
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "AccountingRule max\n"
-                                );
+  tdata = get_options_test_data("AccountingRule max\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
   tt_int_op(tdata->opt->AccountingRule, OP_EQ, ACCT_MAX);
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "AccountingStart fail\n"
-                                );
+  tdata = get_options_test_data("AccountingStart fail\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ,
@@ -2611,16 +2549,13 @@ test_options_validate__accounting(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "AccountingMax 10\n"
-                                );
+  tdata = get_options_test_data("AccountingMax 10\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
   tor_free(msg);
 
   free_options_test_data(tdata);
   tdata = get_options_test_data(
-           TEST_OPTIONS_DEFAULT_VALUES
            "ORPort 127.0.0.1:5555\n"
            "BandwidthRate 76800\n"
            "BandwidthBurst 76800\n"
@@ -2641,7 +2576,6 @@ test_options_validate__accounting(void *ignored)
 
   free_options_test_data(tdata);
   tdata = get_options_test_data(
-                TEST_OPTIONS_DEFAULT_VALUES
                 "HiddenServiceDir /Library/Tor/var/lib/tor/hidden_service/\n"
                 "HiddenServicePort 80 127.0.0.1:8080\n"
                 "AccountingMax 10\n"
@@ -2658,7 +2592,6 @@ test_options_validate__accounting(void *ignored)
 
   free_options_test_data(tdata);
   tdata = get_options_test_data(
-             TEST_OPTIONS_DEFAULT_VALUES
              "HiddenServiceDir /Library/Tor/var/lib/tor/hidden_service/\n"
              "HiddenServicePort 80 127.0.0.1:8080\n"
              "HiddenServiceDir /Library/Tor/var/lib/tor/hidden_service2/\n"
@@ -2693,18 +2626,14 @@ test_options_validate__proxy(void *ignored)
   MOCK(tor_addr_lookup, mock_tor_addr_lookup__fail_on_bad_addrs);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "HttpProxy 127.0.42.1\n"
-                                );
+  tdata = get_options_test_data("HttpProxy 127.0.42.1\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
   tt_int_op(tdata->opt->HTTPProxyPort, OP_EQ, 80);
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "HttpProxy 127.0.42.1:444\n"
-                                );
+  tdata = get_options_test_data("HttpProxy 127.0.42.1:444\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
   tt_int_op(tdata->opt->HTTPProxyPort, OP_EQ, 444);
@@ -2712,17 +2641,14 @@ test_options_validate__proxy(void *ignored)
 
   free_options_test_data(tdata);
 
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "HttpProxy not_so_valid!\n"
-                                );
+  tdata = get_options_test_data("HttpProxy not_so_valid!\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ, "HTTPProxy failed to parse or resolve. Please fix.");
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "HttpProxyAuthenticator "
+  tdata = get_options_test_data("HttpProxyAuthenticator "
                                 "onetwothreonetwothreonetwothreonetwothreonetw"
                                 "othreonetwothreonetwothreonetwothreonetwothre"
                                 "onetwothreonetwothreonetwothreonetwothreonetw"
@@ -2735,7 +2661,6 @@ test_options_validate__proxy(void *ignored)
                                 "othreonetwothreonetwothreonetwothreonetwothre"
                                 "onetwothreonetwothreonetwothreonetwothreonetw"
                                 "othreonetwothreeonetwothreeonetwothree"
-
                                 );
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
@@ -2743,44 +2668,34 @@ test_options_validate__proxy(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "HttpProxyAuthenticator validauth\n"
-
-                                );
+  tdata = get_options_test_data("HttpProxyAuthenticator validauth\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "HttpsProxy 127.0.42.1\n"
-                                );
+  tdata = get_options_test_data("HttpsProxy 127.0.42.1\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
   tt_int_op(tdata->opt->HTTPSProxyPort, OP_EQ, 443);
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "HttpsProxy 127.0.42.1:444\n"
-                                );
+  tdata = get_options_test_data("HttpsProxy 127.0.42.1:444\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
   tt_int_op(tdata->opt->HTTPSProxyPort, OP_EQ, 444);
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "HttpsProxy not_so_valid!\n"
-                                );
+  tdata = get_options_test_data("HttpsProxy not_so_valid!\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ, "HTTPSProxy failed to parse or resolve. Please fix.");
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "HttpsProxyAuthenticator "
+  tdata = get_options_test_data("HttpsProxyAuthenticator "
                                 "onetwothreonetwothreonetwothreonetwothreonetw"
                                 "othreonetwothreonetwothreonetwothreonetwothre"
                                 "onetwothreonetwothreonetwothreonetwothreonetw"
@@ -2801,70 +2716,55 @@ test_options_validate__proxy(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "HttpsProxyAuthenticator validauth\n"
-                                );
+  tdata = get_options_test_data("HttpsProxyAuthenticator validauth\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "Socks4Proxy 127.0.42.1\n"
-                                );
+  tdata = get_options_test_data("Socks4Proxy 127.0.42.1\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
   tt_int_op(tdata->opt->Socks4ProxyPort, OP_EQ, 1080);
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "Socks4Proxy 127.0.42.1:444\n"
-                                );
+  tdata = get_options_test_data("Socks4Proxy 127.0.42.1:444\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
   tt_int_op(tdata->opt->Socks4ProxyPort, OP_EQ, 444);
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "Socks4Proxy not_so_valid!\n"
-                                );
+  tdata = get_options_test_data("Socks4Proxy not_so_valid!\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ, "Socks4Proxy failed to parse or resolve. Please fix.");
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "Socks5Proxy 127.0.42.1\n"
-                                );
+  tdata = get_options_test_data("Socks5Proxy 127.0.42.1\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
   tt_int_op(tdata->opt->Socks5ProxyPort, OP_EQ, 1080);
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "Socks5Proxy 127.0.42.1:444\n"
-                                );
+  tdata = get_options_test_data("Socks5Proxy 127.0.42.1:444\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
   tt_int_op(tdata->opt->Socks5ProxyPort, OP_EQ, 444);
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "Socks5Proxy not_so_valid!\n"
-                                );
+  tdata = get_options_test_data("Socks5Proxy not_so_valid!\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ, "Socks5Proxy failed to parse or resolve. Please fix.");
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "Socks4Proxy 215.1.1.1\n"
+  tdata = get_options_test_data("Socks4Proxy 215.1.1.1\n"
                                 "Socks5Proxy 215.1.1.2\n"
                                 );
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -2874,9 +2774,7 @@ test_options_validate__proxy(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "HttpProxy 215.1.1.1\n"
-                                );
+  tdata = get_options_test_data("HttpProxy 215.1.1.1\n");
   mock_clean_saved_logs();
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
@@ -2886,8 +2784,7 @@ test_options_validate__proxy(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "HttpProxy 215.1.1.1\n"
+  tdata = get_options_test_data("HttpProxy 215.1.1.1\n"
                                 "Socks4Proxy 215.1.1.1\n"
                                 );
   mock_clean_saved_logs();
@@ -2899,8 +2796,7 @@ test_options_validate__proxy(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "HttpProxy 215.1.1.1\n"
+  tdata = get_options_test_data("HttpProxy 215.1.1.1\n"
                                 "Socks5Proxy 215.1.1.1\n"
                                 );
   mock_clean_saved_logs();
@@ -2912,8 +2808,7 @@ test_options_validate__proxy(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "HttpProxy 215.1.1.1\n"
+  tdata = get_options_test_data("HttpProxy 215.1.1.1\n"
                                 "HttpsProxy 215.1.1.1\n"
                                 );
   mock_clean_saved_logs();
@@ -2926,8 +2821,7 @@ test_options_validate__proxy(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                );
+  tdata = get_options_test_data("");
   tdata->opt->Socks5ProxyUsername = tor_strdup("");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
@@ -2936,8 +2830,7 @@ test_options_validate__proxy(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                );
+  tdata = get_options_test_data("");
   tdata->opt->Socks5ProxyUsername =
     tor_strdup("ABCDEABCDE0123456789ABCDEABCDE0123456789ABCDEABCDE0123456789AB"
                "CDEABCDE0123456789ABCDEABCDE0123456789ABCDEABCDE0123456789ABCD"
@@ -2951,9 +2844,7 @@ test_options_validate__proxy(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "Socks5ProxyUsername hello_world\n"
-                                );
+  tdata = get_options_test_data("Socks5ProxyUsername hello_world\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ, "Socks5ProxyPassword must be included with "
@@ -2961,9 +2852,7 @@ test_options_validate__proxy(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "Socks5ProxyUsername hello_world\n"
-                                );
+  tdata = get_options_test_data("Socks5ProxyUsername hello_world\n");
   tdata->opt->Socks5ProxyPassword = tor_strdup("");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
@@ -2972,9 +2861,7 @@ test_options_validate__proxy(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "Socks5ProxyUsername hello_world\n"
-                                );
+  tdata = get_options_test_data("Socks5ProxyUsername hello_world\n");
   tdata->opt->Socks5ProxyPassword =
     tor_strdup("ABCDEABCDE0123456789ABCDEABCDE0123456789ABCDEABCDE0123456789AB"
                "CDEABCDE0123456789ABCDEABCDE0123456789ABCDEABCDE0123456789ABCD"
@@ -2988,18 +2875,14 @@ test_options_validate__proxy(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "Socks5ProxyUsername hello_world\n"
-                                "Socks5ProxyPassword world_hello\n"
-                                );
+  tdata = get_options_test_data("Socks5ProxyUsername hello_world\n"
+                                "Socks5ProxyPassword world_hello\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "Socks5ProxyPassword hello_world\n"
-                                );
+  tdata = get_options_test_data("Socks5ProxyPassword hello_world\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ, "Socks5ProxyPassword must be included with "
@@ -3025,9 +2908,8 @@ test_options_validate__control(void *ignored)
   setup_capture_of_logs(LOG_WARN);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "HashedControlPassword something_incorrect\n"
-                                );
+  tdata = get_options_test_data(
+                         "HashedControlPassword something_incorrect\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ,
@@ -3035,8 +2917,7 @@ test_options_validate__control(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "HashedControlPassword 16:872860B76453A77D60CA"
+  tdata = get_options_test_data("HashedControlPassword 16:872860B76453A77D60CA"
                                 "2BB8C1A7042072093276A3D701AD684053EC4C\n"
                                 );
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -3045,7 +2926,6 @@ test_options_validate__control(void *ignored)
 
   free_options_test_data(tdata);
   tdata = get_options_test_data(
-                   TEST_OPTIONS_DEFAULT_VALUES
                    "__HashedControlSessionPassword something_incorrect\n"
                                 );
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -3055,8 +2935,7 @@ test_options_validate__control(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "__HashedControlSessionPassword 16:872860B7645"
+  tdata = get_options_test_data("__HashedControlSessionPassword 16:872860B7645"
                                 "3A77D60CA2BB8C1A7042072093276A3D701AD684053EC"
                                 "4C\n"
                                 );
@@ -3066,7 +2945,6 @@ test_options_validate__control(void *ignored)
 
   free_options_test_data(tdata);
   tdata = get_options_test_data(
-                           TEST_OPTIONS_DEFAULT_VALUES
                            "__OwningControllerProcess something_incorrect\n"
                                 );
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -3075,16 +2953,14 @@ test_options_validate__control(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "__OwningControllerProcess 123\n"
+  tdata = get_options_test_data("__OwningControllerProcess 123\n"
                                 );
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ControlPort 127.0.0.1:1234\n"
+  tdata = get_options_test_data("ControlPort 127.0.0.1:1234\n"
                                 );
   mock_clean_saved_logs();
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -3097,8 +2973,7 @@ test_options_validate__control(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ControlPort 127.0.0.1:1234\n"
+  tdata = get_options_test_data("ControlPort 127.0.0.1:1234\n"
                                 "HashedControlPassword 16:872860B76453A77D60CA"
                                 "2BB8C1A7042072093276A3D701AD684053EC4C\n"
                                 );
@@ -3113,8 +2988,7 @@ test_options_validate__control(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ControlPort 127.0.0.1:1234\n"
+  tdata = get_options_test_data("ControlPort 127.0.0.1:1234\n"
                                 "__HashedControlSessionPassword 16:872860B7645"
                                 "3A77D60CA2BB8C1A7042072093276A3D701AD684053EC"
                                 "4C\n"
@@ -3130,8 +3004,7 @@ test_options_validate__control(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ControlPort 127.0.0.1:1234\n"
+  tdata = get_options_test_data("ControlPort 127.0.0.1:1234\n"
                                 "CookieAuthentication 1\n"
                                 );
   mock_clean_saved_logs();
@@ -3146,9 +3019,7 @@ test_options_validate__control(void *ignored)
 
 #ifdef HAVE_SYS_UN_H
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ControlSocket unix:/tmp WorldWritable\n"
-                                );
+  tdata = get_options_test_data("ControlSocket unix:/tmp WorldWritable\n");
   mock_clean_saved_logs();
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
@@ -3160,8 +3031,7 @@ test_options_validate__control(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ControlSocket unix:/tmp WorldWritable\n"
+  tdata = get_options_test_data("ControlSocket unix:/tmp WorldWritable\n"
                                 "HashedControlPassword 16:872860B76453A77D60CA"
                                 "2BB8C1A7042072093276A3D701AD684053EC4C\n"
                                 );
@@ -3176,8 +3046,7 @@ test_options_validate__control(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ControlSocket unix:/tmp WorldWritable\n"
+  tdata = get_options_test_data("ControlSocket unix:/tmp WorldWritable\n"
                                 "__HashedControlSessionPassword 16:872860B7645"
                                 "3A77D60CA2BB8C1A7042072093276A3D701AD684053EC"
                                 "4C\n"
@@ -3193,8 +3062,7 @@ test_options_validate__control(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ControlSocket unix:/tmp WorldWritable\n"
+  tdata = get_options_test_data("ControlSocket unix:/tmp WorldWritable\n"
                                 "CookieAuthentication 1\n"
                                 );
   mock_clean_saved_logs();
@@ -3209,8 +3077,7 @@ test_options_validate__control(void *ignored)
 #endif /* defined(HAVE_SYS_UN_H) */
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "CookieAuthFileGroupReadable 1\n"
+  tdata = get_options_test_data("CookieAuthFileGroupReadable 1\n"
                                 );
   mock_clean_saved_logs();
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -3222,8 +3089,7 @@ test_options_validate__control(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "CookieAuthFileGroupReadable 1\n"
+  tdata = get_options_test_data("CookieAuthFileGroupReadable 1\n"
                                 "CookieAuthFile /tmp/somewhere\n"
                                 );
   mock_clean_saved_logs();
@@ -3252,8 +3118,7 @@ test_options_validate__families(void *ignored)
   setup_capture_of_logs(LOG_WARN);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "MyFamily home\n"
+  tdata = get_options_test_data("MyFamily home\n"
                                 "BridgeRelay 1\n"
                                 "ORPort 127.0.0.1:5555\n"
                                 "BandwidthRate 51300\n"
@@ -3272,9 +3137,7 @@ test_options_validate__families(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "MyFamily home\n"
-                                );
+  tdata = get_options_test_data("MyFamily home\n");
   mock_clean_saved_logs();
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
@@ -3286,9 +3149,7 @@ test_options_validate__families(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "MyFamily !\n"
-                                );
+  tdata = get_options_test_data("MyFamily !\n");
   mock_clean_saved_logs();
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
@@ -3296,10 +3157,8 @@ test_options_validate__families(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "NodeFamily foo\n"
-                                "NodeFamily !\n"
-                                );
+  tdata = get_options_test_data("NodeFamily foo\n"
+                                "NodeFamily !\n");
   mock_clean_saved_logs();
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
@@ -3322,8 +3181,7 @@ test_options_validate__addr_policies(void *ignored)
   options_test_data_t *tdata = NULL;
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ExitPolicy !!!\n"
+  tdata = get_options_test_data("ExitPolicy !!!\n"
                                 "ExitRelay 1\n"
                                 );
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -3347,8 +3205,7 @@ test_options_validate__dir_auth(void *ignored)
   setup_capture_of_logs(LOG_WARN);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                VALID_DIR_AUTH
+  tdata = get_options_test_data(VALID_DIR_AUTH
                                 VALID_ALT_DIR_AUTH
                                 );
   mock_clean_saved_logs();
@@ -3362,9 +3219,7 @@ test_options_validate__dir_auth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "TestingTorNetwork 1\n"
-                                );
+  tdata = get_options_test_data("TestingTorNetwork 1\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ,
@@ -3374,8 +3229,7 @@ test_options_validate__dir_auth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                VALID_DIR_AUTH
+  tdata = get_options_test_data(VALID_DIR_AUTH
                                 "TestingTorNetwork 1\n"
                                 );
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -3383,8 +3237,7 @@ test_options_validate__dir_auth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "TestingTorNetwork 1\n"
+  tdata = get_options_test_data("TestingTorNetwork 1\n"
                                 VALID_ALT_DIR_AUTH
                                 );
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -3396,8 +3249,7 @@ test_options_validate__dir_auth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "TestingTorNetwork 1\n"
+  tdata = get_options_test_data("TestingTorNetwork 1\n"
                                 VALID_ALT_BRIDGE_AUTH
                                 );
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -3408,8 +3260,7 @@ test_options_validate__dir_auth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                VALID_ALT_DIR_AUTH
+  tdata = get_options_test_data(VALID_ALT_DIR_AUTH
                                 VALID_ALT_BRIDGE_AUTH
                                 "TestingTorNetwork 1\n"
                                 );
@@ -3434,8 +3285,7 @@ test_options_validate__transport(void *ignored)
   setup_capture_of_logs(LOG_NOTICE);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ClientTransportPlugin !!\n"
+  tdata = get_options_test_data("ClientTransportPlugin !!\n"
                                 );
   mock_clean_saved_logs();
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -3447,8 +3297,7 @@ test_options_validate__transport(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ClientTransportPlugin foo exec bar\n"
+  tdata = get_options_test_data("ClientTransportPlugin foo exec bar\n"
                                 );
   mock_clean_saved_logs();
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -3456,9 +3305,7 @@ test_options_validate__transport(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ServerTransportPlugin !!\n"
-                                );
+  tdata = get_options_test_data("ServerTransportPlugin !!\n");
   mock_clean_saved_logs();
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
@@ -3469,9 +3316,7 @@ test_options_validate__transport(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ServerTransportPlugin foo exec bar\n"
-                                );
+  tdata = get_options_test_data("ServerTransportPlugin foo exec bar\n");
   mock_clean_saved_logs();
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
@@ -3482,8 +3327,7 @@ test_options_validate__transport(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ServerTransportPlugin foo exec bar\n"
+  tdata = get_options_test_data("ServerTransportPlugin foo exec bar\n"
                                 "ORPort 127.0.0.1:5555\n"
                                 "BandwidthRate 76900\n"
                                 "BandwidthBurst 76900\n"
@@ -3499,10 +3343,8 @@ test_options_validate__transport(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ServerTransportListenAddr foo 127.0.0.42:55\n"
-                                "ServerTransportListenAddr !\n"
-                                );
+  tdata = get_options_test_data("ServerTransportListenAddr foo 127.0.0.42:55\n"
+                                "ServerTransportListenAddr !\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ,
@@ -3510,8 +3352,7 @@ test_options_validate__transport(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ServerTransportListenAddr foo 127.0.0.42:55\n"
+  tdata = get_options_test_data("ServerTransportListenAddr foo 127.0.0.42:55\n"
                                 );
   mock_clean_saved_logs();
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -3523,8 +3364,7 @@ test_options_validate__transport(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ServerTransportListenAddr foo 127.0.0.42:55\n"
+  tdata = get_options_test_data("ServerTransportListenAddr foo 127.0.0.42:55\n"
                                 "ServerTransportPlugin foo exec bar\n"
                                 "ORPort 127.0.0.1:5555\n"
                                 "BandwidthRate 76900\n"
@@ -3557,8 +3397,7 @@ test_options_validate__constrained_sockets(void *ignored)
   setup_capture_of_logs(LOG_WARN);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ConstrainedSockets 1\n"
+  tdata = get_options_test_data("ConstrainedSockets 1\n"
                                 "ConstrainedSockSize 0\n"
                                 );
   mock_clean_saved_logs();
@@ -3569,8 +3408,7 @@ test_options_validate__constrained_sockets(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ConstrainedSockets 1\n"
+  tdata = get_options_test_data("ConstrainedSockets 1\n"
                                 "ConstrainedSockSize 263168\n"
                                 );
   mock_clean_saved_logs();
@@ -3581,8 +3419,7 @@ test_options_validate__constrained_sockets(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ConstrainedSockets 1\n"
+  tdata = get_options_test_data("ConstrainedSockets 1\n"
                                 "ConstrainedSockSize 2047\n"
                                 );
   mock_clean_saved_logs();
@@ -3593,8 +3430,7 @@ test_options_validate__constrained_sockets(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ConstrainedSockets 1\n"
+  tdata = get_options_test_data("ConstrainedSockets 1\n"
                                 "ConstrainedSockSize 2048\n"
                                 "DirPort 999\n"
                                 "DirCache 1\n"
@@ -3609,8 +3445,7 @@ test_options_validate__constrained_sockets(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "ConstrainedSockets 1\n"
+  tdata = get_options_test_data("ConstrainedSockets 1\n"
                                 "ConstrainedSockSize 2048\n"
                                 );
   mock_clean_saved_logs();
@@ -3640,8 +3475,7 @@ test_options_validate__v3_auth(void *ignored)
   setup_capture_of_logs(LOG_WARN);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "V3AuthVoteDelay 1000\n"
+  tdata = get_options_test_data("V3AuthVoteDelay 1000\n"
                                 "V3AuthDistDelay 1000\n"
                                 "V3AuthVotingInterval 1000\n"
                                 );
@@ -3653,19 +3487,15 @@ test_options_validate__v3_auth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "V3AuthVoteDelay 1\n"
-                                );
+  tdata = get_options_test_data("V3AuthVoteDelay 1\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ, "V3AuthVoteDelay is way too low.");
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "V3AuthVoteDelay 1\n"
-                                "TestingTorNetwork 1\n"
-                                );
+  tdata = get_options_test_data("V3AuthVoteDelay 1\n"
+                                "TestingTorNetwork 1\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ, "V3AuthVoteDelay is way too low.");
@@ -3676,17 +3506,14 @@ test_options_validate__v3_auth(void *ignored)
   // since they are the same
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "V3AuthDistDelay 1\n"
-                                );
+  tdata = get_options_test_data("V3AuthDistDelay 1\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ, "V3AuthDistDelay is way too low.");
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "V3AuthDistDelay 1\n"
+  tdata = get_options_test_data("V3AuthDistDelay 1\n"
                                 "TestingTorNetwork 1\n"
                                 );
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -3699,8 +3526,7 @@ test_options_validate__v3_auth(void *ignored)
   // since they are the same
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "V3AuthNIntervalsValid 1\n"
+  tdata = get_options_test_data("V3AuthNIntervalsValid 1\n"
                                 );
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
@@ -3708,8 +3534,7 @@ test_options_validate__v3_auth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "V3AuthVoteDelay 49\n"
+  tdata = get_options_test_data("V3AuthVoteDelay 49\n"
                                 "V3AuthDistDelay 49\n"
                                 "V3AuthVotingInterval 200\n"
                                 );
@@ -3719,8 +3544,7 @@ test_options_validate__v3_auth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "V3AuthVoteDelay 49\n"
+  tdata = get_options_test_data("V3AuthVoteDelay 49\n"
                                 "V3AuthDistDelay 49\n"
                                 "V3AuthVotingInterval 200000\n"
                                 );
@@ -3730,8 +3554,7 @@ test_options_validate__v3_auth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "V3AuthVoteDelay 49\n"
+  tdata = get_options_test_data("V3AuthVoteDelay 49\n"
                                 "V3AuthDistDelay 49\n"
                                 "V3AuthVotingInterval 1441\n"
                                 );
@@ -3743,8 +3566,7 @@ test_options_validate__v3_auth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "V3AuthVoteDelay 49\n"
+  tdata = get_options_test_data("V3AuthVoteDelay 49\n"
                                 "V3AuthDistDelay 49\n"
                                 "V3AuthVotingInterval 1440\n"
                                 );
@@ -3756,8 +3578,7 @@ test_options_validate__v3_auth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "V3AuthVoteDelay 49\n"
+  tdata = get_options_test_data("V3AuthVoteDelay 49\n"
                                 "V3AuthDistDelay 49\n"
                                 "V3AuthVotingInterval 299\n"
                                 VALID_DIR_AUTH
@@ -3786,8 +3607,7 @@ test_options_validate__v3_auth(void *ignored)
   /* tt_str_op(msg, OP_EQ, "V3AuthVotingInterval is insanely low."); */
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "TestingV3AuthInitialVoteDelay 1\n"
+  tdata = get_options_test_data("TestingV3AuthInitialVoteDelay 1\n"
                                 VALID_DIR_AUTH
                                 "TestingTorNetwork 1\n"
                                 );
@@ -3797,8 +3617,7 @@ test_options_validate__v3_auth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "TestingV3AuthInitialDistDelay 1\n"
+  tdata = get_options_test_data("TestingV3AuthInitialDistDelay 1\n"
                                 VALID_DIR_AUTH
                                 "TestingTorNetwork 1\n"
                                 );
@@ -3808,8 +3627,7 @@ test_options_validate__v3_auth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                VALID_DIR_AUTH
+  tdata = get_options_test_data(VALID_DIR_AUTH
                                 "TestingTorNetwork 1\n"
                                 );
   tdata->opt->TestingV3AuthVotingStartOffset = 100000;
@@ -3820,8 +3638,7 @@ test_options_validate__v3_auth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                VALID_DIR_AUTH
+  tdata = get_options_test_data(VALID_DIR_AUTH
                                 "TestingTorNetwork 1\n"
                                 );
   tdata->opt->TestingV3AuthVotingStartOffset = -1;
@@ -3832,8 +3649,7 @@ test_options_validate__v3_auth(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                VALID_DIR_AUTH
+  tdata = get_options_test_data(VALID_DIR_AUTH
                                 "TestingTorNetwork 1\n"
                                 "TestingV3AuthInitialVotingInterval 4\n"
                                 );
@@ -3858,17 +3674,14 @@ test_options_validate__virtual_addr(void *ignored)
   options_test_data_t *tdata = NULL;
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "VirtualAddrNetworkIPv4 !!"
-                                );
+  tdata = get_options_test_data("VirtualAddrNetworkIPv4 !!");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ, "Error parsing VirtualAddressNetwork !!");
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "VirtualAddrNetworkIPv6 !!"
+  tdata = get_options_test_data("VirtualAddrNetworkIPv6 !!"
                                 );
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
@@ -3894,8 +3707,7 @@ test_options_validate__testing_options(void *ignored)
 #define TEST_TESTING_OPTION(name, low_val, high_val, err_low)           \
   STMT_BEGIN                                                            \
     free_options_test_data(tdata);                                      \
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES             \
-                                VALID_DIR_AUTH                          \
+  tdata = get_options_test_data(VALID_DIR_AUTH                          \
                                 "TestingTorNetwork 1\n"                 \
                                 );                                      \
   tdata->opt-> name = low_val;                                       \
@@ -3905,8 +3717,7 @@ test_options_validate__testing_options(void *ignored)
   tor_free(msg); \
                                                                         \
   free_options_test_data(tdata);                                        \
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES             \
-                                VALID_DIR_AUTH                          \
+  tdata = get_options_test_data(VALID_DIR_AUTH                          \
                                 "TestingTorNetwork 1\n"                 \
                                 );                                      \
   tdata->opt->  name = high_val;                                      \
@@ -3927,9 +3738,7 @@ test_options_validate__testing_options(void *ignored)
                       "is way too low.");
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "TestingEnableConnBwEvent 1\n"
-                                );
+  tdata = get_options_test_data("TestingEnableConnBwEvent 1\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ, "TestingEnableConnBwEvent may only be changed in "
@@ -3937,8 +3746,7 @@ test_options_validate__testing_options(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "TestingEnableConnBwEvent 1\n"
+  tdata = get_options_test_data("TestingEnableConnBwEvent 1\n"
                                 VALID_DIR_AUTH
                                 "TestingTorNetwork 1\n"
                                 "___UsingTestNetworkDefaults 0\n"
@@ -3950,8 +3758,7 @@ test_options_validate__testing_options(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "TestingEnableConnBwEvent 1\n"
+  tdata = get_options_test_data("TestingEnableConnBwEvent 1\n"
                                 VALID_DIR_AUTH
                                 "TestingTorNetwork 0\n"
                                 "___UsingTestNetworkDefaults 1\n"
@@ -3963,9 +3770,7 @@ test_options_validate__testing_options(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "TestingEnableCellStatsEvent 1\n"
-                                );
+  tdata = get_options_test_data("TestingEnableCellStatsEvent 1\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ, "TestingEnableCellStatsEvent may only be changed in "
@@ -3973,8 +3778,7 @@ test_options_validate__testing_options(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "TestingEnableCellStatsEvent 1\n"
+  tdata = get_options_test_data("TestingEnableCellStatsEvent 1\n"
                                 VALID_DIR_AUTH
                                 "TestingTorNetwork 1\n"
                                 "___UsingTestNetworkDefaults 0\n"
@@ -3986,8 +3790,7 @@ test_options_validate__testing_options(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "TestingEnableCellStatsEvent 1\n"
+  tdata = get_options_test_data("TestingEnableCellStatsEvent 1\n"
                                 VALID_DIR_AUTH
                                 "TestingTorNetwork 0\n"
                                 "___UsingTestNetworkDefaults 1\n"
@@ -3999,8 +3802,7 @@ test_options_validate__testing_options(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "TestingEnableTbEmptyEvent 1\n"
+  tdata = get_options_test_data("TestingEnableTbEmptyEvent 1\n"
                                 VALID_DIR_AUTH
                                 "TestingTorNetwork 1\n"
                                 "___UsingTestNetworkDefaults 0\n"
@@ -4012,8 +3814,7 @@ test_options_validate__testing_options(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "TestingEnableTbEmptyEvent 1\n"
+  tdata = get_options_test_data("TestingEnableTbEmptyEvent 1\n"
                                 VALID_DIR_AUTH
                                 "TestingTorNetwork 0\n"
                                 "___UsingTestNetworkDefaults 1\n"
@@ -4040,18 +3841,14 @@ test_options_validate__accel(void *ignored)
   options_test_data_t *tdata = NULL;
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "AccelName foo\n"
-                                );
+  tdata = get_options_test_data("AccelName foo\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
   tt_int_op(tdata->opt->HardwareAccel, OP_EQ, 1);
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "AccelName foo\n"
-                                );
+  tdata = get_options_test_data("AccelName foo\n");
   tdata->opt->HardwareAccel = 2;
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
@@ -4059,9 +3856,7 @@ test_options_validate__accel(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "AccelDir 1\n"
-                                );
+  tdata = get_options_test_data("AccelDir 1\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, -1);
   tt_str_op(msg, OP_EQ,
@@ -4069,10 +3864,8 @@ test_options_validate__accel(void *ignored)
   tor_free(msg);
 
   free_options_test_data(tdata);
-  tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
-                                "AccelDir 1\n"
-                                "AccelName something\n"
-                                );
+  tdata = get_options_test_data("AccelDir 1\n"
+                                "AccelName something\n");
   ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
   tt_int_op(ret, OP_EQ, 0);
   tor_free(msg);



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