diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-01-17 08:31:18 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-01-17 08:31:22 -0500 |
commit | 6d2b9c963100dab56f61786b65d8629faaada7ad (patch) | |
tree | 25d569f6e88421284d86dc6526f9718fc7d47288 /src/test/test_options.c | |
parent | 648e1afc330ca32ad8f0b29c584bf38afefa85ea (diff) | |
download | tor-6d2b9c963100dab56f61786b65d8629faaada7ad.tar.gz tor-6d2b9c963100dab56f61786b65d8629faaada7ad.zip |
Remove some dead checks
The only code that could set these options to be negative was in the
unit tests.
Diffstat (limited to 'src/test/test_options.c')
-rw-r--r-- | src/test/test_options.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/test/test_options.c b/src/test/test_options.c index bdcdba8028..119b2a54a4 100644 --- a/src/test/test_options.c +++ b/src/test/test_options.c @@ -991,19 +991,6 @@ test_options_validate__authdir(void *ignored) "but ClientOnly also set."); tor_free(msg); - free_options_test_data(tdata); - tdata = get_options_test_data(ENABLE_AUTHORITY_V3); - /* We have to set this value manually, because it won't parse */ - get_dirauth_options(tdata->opt)->MinUptimeHidServDirectoryV2 = -1; - mock_clean_saved_logs(); - ret = options_validate(NULL, tdata->opt, &msg); - tt_int_op(ret, OP_EQ, 0); - expect_log_msg("MinUptimeHidServDirectoryV2 " - "option must be at least 0 seconds. Changing to 0.\n"); - tt_int_op(get_dirauth_options(tdata->opt)->MinUptimeHidServDirectoryV2, - OP_EQ, 0); - tor_free(msg); - done: teardown_capture_of_logs(); // sandbox_free_getaddrinfo_cache(); @@ -3879,13 +3866,6 @@ test_options_validate__testing_options(void *ignored) tor_free(msg); \ STMT_END - TEST_TESTING_OPTION(TestingAuthDirTimeToLearnReachability, - get_dirauth_options, -1, 8000, - "must be non-negative.", ENABLE_AUTHORITY_V3); - TEST_TESTING_OPTION(TestingAuthDirTimeToLearnReachability, - get_dirauth_options, -1, 8000, - "must be non-negative.", ENABLE_AUTHORITY_BRIDGE); - TEST_TESTING_OPTION(TestingEstimatedDescriptorPropagationTime, , -1, 3601, "must be non-negative.", ""); TEST_TESTING_OPTION(TestingClientMaxIntervalWithoutRequest, , -1, 3601, |