mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Stop overriding MaxClientCircuitsPending in tests.
Now that MaxClientCircuitsPending is set to the default value in the testing helper functions, the individual tests don't all need to make sure it is set to something valid.
This commit is contained in:
parent
b501cd907f
commit
78bf011663
@ -1497,7 +1497,6 @@ test_options_validate__ports(void *ignored)
|
|||||||
char *msg;
|
char *msg;
|
||||||
options_test_data_t *tdata = get_options_test_data(
|
options_test_data_t *tdata = get_options_test_data(
|
||||||
"FirewallPorts 65537\n"
|
"FirewallPorts 65537\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1508,7 +1507,6 @@ test_options_validate__ports(void *ignored)
|
|||||||
free_options_test_data(tdata);
|
free_options_test_data(tdata);
|
||||||
tdata = get_options_test_data("FirewallPorts 1\n"
|
tdata = get_options_test_data("FirewallPorts 1\n"
|
||||||
"LongLivedPorts 124444\n"
|
"LongLivedPorts 124444\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1520,7 +1518,6 @@ test_options_validate__ports(void *ignored)
|
|||||||
tdata = get_options_test_data("FirewallPorts 1\n"
|
tdata = get_options_test_data("FirewallPorts 1\n"
|
||||||
"LongLivedPorts 2\n"
|
"LongLivedPorts 2\n"
|
||||||
"RejectPlaintextPorts 112233\n"
|
"RejectPlaintextPorts 112233\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1533,7 +1530,6 @@ test_options_validate__ports(void *ignored)
|
|||||||
"LongLivedPorts 2\n"
|
"LongLivedPorts 2\n"
|
||||||
"RejectPlaintextPorts 3\n"
|
"RejectPlaintextPorts 3\n"
|
||||||
"WarnPlaintextPorts 65536\n"
|
"WarnPlaintextPorts 65536\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1546,7 +1542,6 @@ test_options_validate__ports(void *ignored)
|
|||||||
"LongLivedPorts 2\n"
|
"LongLivedPorts 2\n"
|
||||||
"RejectPlaintextPorts 3\n"
|
"RejectPlaintextPorts 3\n"
|
||||||
"WarnPlaintextPorts 4\n"
|
"WarnPlaintextPorts 4\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1567,7 +1562,6 @@ test_options_validate__reachable_addresses(void *ignored)
|
|||||||
setup_capture_of_logs(LOG_NOTICE);
|
setup_capture_of_logs(LOG_NOTICE);
|
||||||
options_test_data_t *tdata = get_options_test_data(
|
options_test_data_t *tdata = get_options_test_data(
|
||||||
"FascistFirewall 1\n"
|
"FascistFirewall 1\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1585,7 +1579,6 @@ test_options_validate__reachable_addresses(void *ignored)
|
|||||||
tdata = get_options_test_data("FascistFirewall 1\n"
|
tdata = get_options_test_data("FascistFirewall 1\n"
|
||||||
"ReachableDirAddresses *:81\n"
|
"ReachableDirAddresses *:81\n"
|
||||||
"ReachableORAddresses *:444\n"
|
"ReachableORAddresses *:444\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
tdata->opt->FirewallPorts = smartlist_new();
|
tdata->opt->FirewallPorts = smartlist_new();
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1603,7 +1596,6 @@ test_options_validate__reachable_addresses(void *ignored)
|
|||||||
mock_clean_saved_logs();
|
mock_clean_saved_logs();
|
||||||
tdata = get_options_test_data("FascistFirewall 1\n"
|
tdata = get_options_test_data("FascistFirewall 1\n"
|
||||||
"FirewallPort 123\n"
|
"FirewallPort 123\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1620,7 +1612,6 @@ test_options_validate__reachable_addresses(void *ignored)
|
|||||||
"ReachableAddresses *:82\n"
|
"ReachableAddresses *:82\n"
|
||||||
"ReachableAddresses *:83\n"
|
"ReachableAddresses *:83\n"
|
||||||
"ReachableAddresses reject *:*\n"
|
"ReachableAddresses reject *:*\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1637,7 +1628,6 @@ test_options_validate__reachable_addresses(void *ignored)
|
|||||||
mock_clean_saved_logs();
|
mock_clean_saved_logs();
|
||||||
tdata = get_options_test_data("FascistFirewall 1\n"
|
tdata = get_options_test_data("FascistFirewall 1\n"
|
||||||
"ReachableAddresses *:82\n"
|
"ReachableAddresses *:82\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1652,7 +1642,6 @@ test_options_validate__reachable_addresses(void *ignored)
|
|||||||
free_options_test_data(tdata);
|
free_options_test_data(tdata);
|
||||||
tdata = get_options_test_data("ReachableAddresses *:82\n"
|
tdata = get_options_test_data("ReachableAddresses *:82\n"
|
||||||
"ORPort 127.0.0.1:5555\n"
|
"ORPort 127.0.0.1:5555\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1663,7 +1652,6 @@ test_options_validate__reachable_addresses(void *ignored)
|
|||||||
free_options_test_data(tdata);
|
free_options_test_data(tdata);
|
||||||
tdata = get_options_test_data("ReachableORAddresses *:82\n"
|
tdata = get_options_test_data("ReachableORAddresses *:82\n"
|
||||||
"ORPort 127.0.0.1:5555\n"
|
"ORPort 127.0.0.1:5555\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1674,7 +1662,6 @@ test_options_validate__reachable_addresses(void *ignored)
|
|||||||
free_options_test_data(tdata);
|
free_options_test_data(tdata);
|
||||||
tdata = get_options_test_data("ReachableDirAddresses *:82\n"
|
tdata = get_options_test_data("ReachableDirAddresses *:82\n"
|
||||||
"ORPort 127.0.0.1:5555\n"
|
"ORPort 127.0.0.1:5555\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1685,7 +1672,6 @@ test_options_validate__reachable_addresses(void *ignored)
|
|||||||
free_options_test_data(tdata);
|
free_options_test_data(tdata);
|
||||||
tdata = get_options_test_data("ClientUseIPv4 0\n"
|
tdata = get_options_test_data("ClientUseIPv4 0\n"
|
||||||
"ORPort 127.0.0.1:5555\n"
|
"ORPort 127.0.0.1:5555\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1783,7 +1769,6 @@ test_options_validate__use_bridges(void *ignored)
|
|||||||
"UseBridges 1\n"
|
"UseBridges 1\n"
|
||||||
"ClientUseIPv4 1\n"
|
"ClientUseIPv4 1\n"
|
||||||
"ORPort 127.0.0.1:5555\n"
|
"ORPort 127.0.0.1:5555\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1794,7 +1779,6 @@ test_options_validate__use_bridges(void *ignored)
|
|||||||
|
|
||||||
free_options_test_data(tdata);
|
free_options_test_data(tdata);
|
||||||
tdata = get_options_test_data("UseBridges 1\n"
|
tdata = get_options_test_data("UseBridges 1\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1807,7 +1791,6 @@ test_options_validate__use_bridges(void *ignored)
|
|||||||
free_options_test_data(tdata);
|
free_options_test_data(tdata);
|
||||||
tdata = get_options_test_data("UseBridges 1\n"
|
tdata = get_options_test_data("UseBridges 1\n"
|
||||||
"EntryNodes {cn}\n"
|
"EntryNodes {cn}\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1867,7 +1850,6 @@ test_options_validate__entry_nodes(void *ignored)
|
|||||||
options_test_data_t *tdata = get_options_test_data(
|
options_test_data_t *tdata = get_options_test_data(
|
||||||
"EntryNodes {cn}\n"
|
"EntryNodes {cn}\n"
|
||||||
"UseEntryGuards 0\n"
|
"UseEntryGuards 0\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1879,7 +1861,6 @@ test_options_validate__entry_nodes(void *ignored)
|
|||||||
free_options_test_data(tdata);
|
free_options_test_data(tdata);
|
||||||
tdata = get_options_test_data("EntryNodes {cn}\n"
|
tdata = get_options_test_data("EntryNodes {cn}\n"
|
||||||
"UseEntryGuards 1\n"
|
"UseEntryGuards 1\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1900,7 +1881,6 @@ test_options_validate__safe_logging(void *ignored)
|
|||||||
char *msg;
|
char *msg;
|
||||||
options_test_data_t *tdata = get_options_test_data(
|
options_test_data_t *tdata = get_options_test_data(
|
||||||
"SafeLogging 0\n"
|
"SafeLogging 0\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1910,7 +1890,6 @@ test_options_validate__safe_logging(void *ignored)
|
|||||||
|
|
||||||
free_options_test_data(tdata);
|
free_options_test_data(tdata);
|
||||||
tdata = get_options_test_data("SafeLogging 0\n"
|
tdata = get_options_test_data("SafeLogging 0\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1920,7 +1899,6 @@ test_options_validate__safe_logging(void *ignored)
|
|||||||
|
|
||||||
free_options_test_data(tdata);
|
free_options_test_data(tdata);
|
||||||
tdata = get_options_test_data("SafeLogging Relay\n"
|
tdata = get_options_test_data("SafeLogging Relay\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1930,7 +1908,6 @@ test_options_validate__safe_logging(void *ignored)
|
|||||||
|
|
||||||
free_options_test_data(tdata);
|
free_options_test_data(tdata);
|
||||||
tdata = get_options_test_data("SafeLogging 1\n"
|
tdata = get_options_test_data("SafeLogging 1\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
@ -1940,7 +1917,6 @@ test_options_validate__safe_logging(void *ignored)
|
|||||||
|
|
||||||
free_options_test_data(tdata);
|
free_options_test_data(tdata);
|
||||||
tdata = get_options_test_data("SafeLogging stuffy\n"
|
tdata = get_options_test_data("SafeLogging stuffy\n"
|
||||||
"MaxClientCircuitsPending 1\n"
|
|
||||||
"ConnLimit 1\n");
|
"ConnLimit 1\n");
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
|
Loading…
Reference in New Issue
Block a user