summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-10-21 14:11:07 -0400
committerNick Mathewson <nickm@torproject.org>2019-10-21 14:16:59 -0400
commitb501cd907f76a5b137182efbe0efdc7453c65148 (patch)
tree5d8f467a1c364f2159675b67751324e50495f324
parentb6efe37661020df8895467679c80aad6c3b2eb96 (diff)
downloadtor-b501cd907f76a5b137182efbe0efdc7453c65148.tar.gz
tor-b501cd907f76a5b137182efbe0efdc7453c65148.zip
test_options.c: remove weird usage of MaxClientCircuitsPending
Several of our tests assumed that MaxClientCircuitsPending would be set to 0 by default, causing the default options not to be parseable. These tests had nothing to do with MaxClientCircuitsPending.
-rw-r--r--src/test/test_options.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/test/test_options.c b/src/test/test_options.c
index c80b8c279a..13893f38c6 100644
--- a/src/test/test_options.c
+++ b/src/test/test_options.c
@@ -391,7 +391,6 @@ fixed_get_uname(void)
}
#define TEST_OPTIONS_DEFAULT_VALUES \
- "MaxClientCircuitsPending 1\n" \
"ConnLimit 1\n"
typedef struct {
@@ -422,7 +421,6 @@ get_options_test_data(const char *conf)
*
* Later in this branch, I will remove these one by one. */
result->opt->ConnLimit = 0;
- result->opt->MaxClientCircuitsPending = 0;
rv = config_get_lines(conf, &cl, 1);
tt_int_op(rv, OP_EQ, 0);
@@ -1383,9 +1381,7 @@ test_options_validate__conn_limit(void *ignored)
tdata = get_options_test_data("ConnLimit 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, "MaxClientCircuitsPending must be between 1 and 1024, "
- "but was set to 0");
+ tt_int_op(ret, OP_EQ, 0);
tor_free(msg);
done:
@@ -1412,7 +1408,7 @@ test_options_validate__paths_needed(void *ignored)
"ConnLimit 1\n");
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
- tt_int_op(ret, OP_EQ, -1);
+ tt_int_op(ret, OP_EQ, 0);
tt_assert(tdata->opt->PathsNeededToBuildCircuits > 0.24 &&
tdata->opt->PathsNeededToBuildCircuits < 0.26);
expect_log_msg("PathsNeededToBuildCircuits is too low. "
@@ -1425,7 +1421,7 @@ test_options_validate__paths_needed(void *ignored)
"ConnLimit 1\n");
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
- tt_int_op(ret, OP_EQ, -1);
+ tt_int_op(ret, OP_EQ, 0);
tt_assert(tdata->opt->PathsNeededToBuildCircuits > 0.94 &&
tdata->opt->PathsNeededToBuildCircuits < 0.96);
expect_log_msg("PathsNeededToBuildCircuits is "
@@ -1438,7 +1434,7 @@ test_options_validate__paths_needed(void *ignored)
"ConnLimit 1\n");
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
- tt_int_op(ret, OP_EQ, -1);
+ tt_int_op(ret, OP_EQ, 0);
tt_assert(tdata->opt->PathsNeededToBuildCircuits > 0.90 &&
tdata->opt->PathsNeededToBuildCircuits < 0.92);
expect_no_log_entry();