summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test.c2
-rw-r--r--src/test/test_cell_formats.c2
-rw-r--r--src/test/test_channelpadding.c8
-rw-r--r--src/test/test_config.c4
-rw-r--r--src/test/test_connection.c2
-rw-r--r--src/test/test_dir.c2
-rw-r--r--src/test/test_entrynodes.c2
-rw-r--r--src/test/test_hs.c2
-rw-r--r--src/test/test_hs_descriptor.c2
-rw-r--r--src/test/test_hs_intropoint.c4
-rw-r--r--src/test/test_hs_service.c2
-rw-r--r--src/test/test_options.c10
-rw-r--r--src/test/test_shared_random.c4
-rw-r--r--src/test/test_util.c10
14 files changed, 28 insertions, 28 deletions
diff --git a/src/test/test.c b/src/test/test.c
index 2293822f82..810cbafb11 100644
--- a/src/test/test.c
+++ b/src/test/test.c
@@ -174,7 +174,7 @@ test_bad_onion_handshake(void *arg)
s_buf, s_keys, 40));
c_buf[64] ^= 33;
- /* (Let the server procede) */
+ /* (Let the server proceed) */
tt_int_op(0, OP_EQ,
onion_skin_TAP_server_handshake(c_buf, pk, NULL,
s_buf, s_keys, 40));
diff --git a/src/test/test_cell_formats.c b/src/test/test_cell_formats.c
index 007f7e3d3e..88cdef383f 100644
--- a/src/test/test_cell_formats.c
+++ b/src/test/test_cell_formats.c
@@ -477,7 +477,7 @@ test_cfmt_create_cells(void *arg)
cell.command = CELL_CREATED;
tt_int_op(-1, OP_EQ, create_cell_parse(&cc, &cell));
- /* You can't acutally make an unparseable CREATE or CREATE_FAST cell. */
+ /* You can't actually make an unparseable CREATE or CREATE_FAST cell. */
/* Try some CREATE2 cells. First with a bad type. */
cell.command = CELL_CREATE2;
diff --git a/src/test/test_channelpadding.c b/src/test/test_channelpadding.c
index 4cc33cbe70..9e570b81a7 100644
--- a/src/test/test_channelpadding.c
+++ b/src/test/test_channelpadding.c
@@ -457,7 +457,7 @@ test_channelpadding_killonehop(void *arg)
tt_assert(relay3_client->padding_enabled);
tt_assert(client_relay3->padding_enabled);
get_options_mutable()->Tor2webMode = 1;
- /* For the relay to recieve the negotiate: */
+ /* For the relay to receive the negotiate: */
get_options_mutable()->ORPort_set = 1;
decision = channelpadding_decide_to_pad_channel(client_relay3);
tt_int_op(decision, OP_EQ, CHANNELPADDING_WONTPAD);
@@ -530,7 +530,7 @@ test_channelpadding_killonehop(void *arg)
// Test client side (it should stop immediately)
get_options_mutable()->HiddenServiceSingleHopMode = 1;
get_options_mutable()->HiddenServiceNonAnonymousMode = 1;
- /* For the relay to recieve the negotiate: */
+ /* For the relay to receive the negotiate: */
get_options_mutable()->ORPort_set = 1;
decision = channelpadding_decide_to_pad_channel(client_relay3);
tt_int_op(decision, OP_EQ, CHANNELPADDING_WONTPAD);
@@ -835,7 +835,7 @@ test_channelpadding_negotiation(void *arg)
get_options_mutable()->ORPort_set = 0;
/* Test case #2: Torrc options */
- /* ConnectionPadding auto; Relay doesn't suport us */
+ /* ConnectionPadding auto; Relay doesn't support us */
((channel_tls_t*)relay3_client)->conn->link_proto = 4;
relay3_client->padding_enabled = 0;
tried_to_write_cell = 0;
@@ -846,7 +846,7 @@ test_channelpadding_negotiation(void *arg)
((channel_tls_t*)relay3_client)->conn->link_proto = 5;
relay3_client->padding_enabled = 1;
- /* ConnectionPadding 1; Relay doesn't suport us */
+ /* ConnectionPadding 1; Relay doesn't support us */
get_options_mutable()->ConnectionPadding = 1;
tried_to_write_cell = 0;
decision = channelpadding_decide_to_pad_channel(client_relay3);
diff --git a/src/test/test_config.c b/src/test/test_config.c
index 4290d0dc6d..d42335de38 100644
--- a/src/test/test_config.c
+++ b/src/test/test_config.c
@@ -323,7 +323,7 @@ test_config_write_to_data_subdir(void *arg)
tt_int_op(mkdir(options->DataDirectory, 0700), OP_EQ, 0);
#endif
- // Write attempt shoudl fail, if subdirectory doesn't exist.
+ // Write attempt should fail, if subdirectory doesn't exist.
tt_assert(write_to_data_subdir(subdir, fname, str, NULL));
tt_assert(! check_or_create_data_subdir(subdir));
@@ -1391,7 +1391,7 @@ test_config_resolve_my_address(void *arg)
* if running on.
* 3. Hostname from previous step cannot be converted to
* address by using tor_inet_aton() function.
- * 4. However, tor_lookup_hostname() succeds in resolving the
+ * 4. However, tor_lookup_hostname() succeeds in resolving the
* hostname from step 2.
* 5. Unfortunately, tor_addr_is_internal() deems this address
* to be internal.
diff --git a/src/test/test_connection.c b/src/test/test_connection.c
index 314b90cfda..33f453b8b2 100644
--- a/src/test/test_connection.c
+++ b/src/test/test_connection.c
@@ -779,7 +779,7 @@ test_conn_download_status(void *arg)
#define CONNECTION_TESTCASE(name, fork, setup) \
{ #name, test_conn_##name, fork, &setup, NULL }
-/* where arg is an expression (constant, varaible, compound expression) */
+/* where arg is an expression (constant, variable, compound expression) */
#define CONNECTION_TESTCASE_ARG(name, fork, setup, arg) \
{ #name "_" #arg, test_conn_##name, fork, &setup, (void *)arg }
diff --git a/src/test/test_dir.c b/src/test/test_dir.c
index f2223ee176..0c7c571b2f 100644
--- a/src/test/test_dir.c
+++ b/src/test/test_dir.c
@@ -1270,7 +1270,7 @@ test_dir_versions(void *arg)
tt_int_op(0,OP_EQ, tor_version_as_new_as(
"Tor 0.2.9.9 (git-00)",
"Tor 0.2.9.9 (git-01)"));
- /* In #21278, we comapre without integer overflows.
+ /* In #21278, we compare without integer overflows.
* But since #21450 limits version components to [0, INT32_MAX], it is no
* longer possible to cause an integer overflow in tor_version_compare() */
tt_int_op(0,OP_EQ, tor_version_as_new_as(
diff --git a/src/test/test_entrynodes.c b/src/test/test_entrynodes.c
index 1cff3828c4..92a860360d 100644
--- a/src/test/test_entrynodes.c
+++ b/src/test/test_entrynodes.c
@@ -2024,7 +2024,7 @@ test_entry_guard_select_for_circuit_highlevel_primary(void *arg)
tt_mem_op(g->identity, OP_NE, g_prev->identity, DIGEST_LEN);
tt_int_op(g->is_primary, OP_EQ, 1);
tt_i64_op(g->last_tried_to_connect, OP_EQ, start+60);
- tt_int_op(g->confirmed_idx, OP_EQ, -1); // not confirmd now.
+ tt_int_op(g->confirmed_idx, OP_EQ, -1); // not confirmed now.
/* Call this one up; watch it get confirmed. */
update_approx_time(start+90);
diff --git a/src/test/test_hs.c b/src/test/test_hs.c
index 55c6218dd1..9189bb65be 100644
--- a/src/test/test_hs.c
+++ b/src/test/test_hs.c
@@ -1010,7 +1010,7 @@ test_prune_services_on_reload(void *arg)
set_rend_service_list(old);
set_rend_rend_service_staging_list(new);
rend_service_prune_list_impl_();
- /* Check if they've all been transfered. */
+ /* Check if they've all been transferred. */
tt_int_op(smartlist_len(old), OP_EQ, 0);
tt_int_op(smartlist_len(new), OP_EQ, 2);
}
diff --git a/src/test/test_hs_descriptor.c b/src/test/test_hs_descriptor.c
index 9ec183db06..8e9d461c40 100644
--- a/src/test/test_hs_descriptor.c
+++ b/src/test/test_hs_descriptor.c
@@ -413,7 +413,7 @@ test_decode_invalid_intro_point(void *arg)
(void) arg;
- /* Seperate pieces of a valid encoded introduction point. */
+ /* Separate pieces of a valid encoded introduction point. */
const char *intro_point =
"introduction-point AQIUMDI5OUYyNjhGQ0E5RDU1Q0QxNTc=";
const char *auth_key =
diff --git a/src/test/test_hs_intropoint.c b/src/test/test_hs_intropoint.c
index 66832087a0..55dfafbeac 100644
--- a/src/test/test_hs_intropoint.c
+++ b/src/test/test_hs_intropoint.c
@@ -139,7 +139,7 @@ helper_create_introduce1_cell(void)
memcpy(auth_key_ptr, auth_key_kp.pubkey.pubkey, auth_key_len);
}
- /* Set the cell extentions to none. */
+ /* Set the cell extensions to none. */
{
trn_cell_extension_t *ext = trn_cell_extension_new();
trn_cell_extension_set_num(ext, 0);
@@ -552,7 +552,7 @@ test_circuitmap_free_all(void)
;
}
-/** Successfuly register a v2 intro point and a v3 intro point. Ensure that HS
+/** Successfully register a v2 intro point and a v3 intro point. Ensure that HS
* circuitmap is maintained properly. */
static void
test_intro_point_registration(void *arg)
diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c
index fad65e61f7..7fade6379d 100644
--- a/src/test/test_hs_service.c
+++ b/src/test/test_hs_service.c
@@ -661,7 +661,7 @@ test_intro_circuit_opened(void *arg)
UNMOCK(relay_send_command_from_edge_);
}
-/** Test the operations we do on a circuit after we learn that we successfuly
+/** Test the operations we do on a circuit after we learn that we successfully
* established an intro point on it */
static void
test_intro_established(void *arg)
diff --git a/src/test/test_options.c b/src/test/test_options.c
index 62732cabf7..b8898766e1 100644
--- a/src/test/test_options.c
+++ b/src/test/test_options.c
@@ -906,7 +906,7 @@ test_options_validate__authdir(void *ignored)
"Address 100.200.10.1\n"
"BridgeAuthoritativeDir 1\n"
"ContactInfo hello@hello.com\n"
- "V3BandwidthsFile non-existant-file\n");
+ "V3BandwidthsFile non-existent-file\n");
mock_clean_saved_logs();
options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
tt_str_op(msg, OP_EQ,
@@ -918,7 +918,7 @@ test_options_validate__authdir(void *ignored)
"Address 100.200.10.1\n"
"BridgeAuthoritativeDir 1\n"
"ContactInfo hello@hello.com\n"
- "V3BandwidthsFile non-existant-file\n");
+ "V3BandwidthsFile non-existent-file\n");
mock_clean_saved_logs();
options_validate(NULL, tdata->opt, tdata->def_opt, 0, &msg);
tt_str_op(msg, OP_EQ,
@@ -930,7 +930,7 @@ test_options_validate__authdir(void *ignored)
"Address 100.200.10.1\n"
"BridgeAuthoritativeDir 1\n"
"ContactInfo hello@hello.com\n"
- "GuardfractionFile non-existant-file\n");
+ "GuardfractionFile non-existent-file\n");
mock_clean_saved_logs();
options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
tt_str_op(msg, OP_EQ,
@@ -942,7 +942,7 @@ test_options_validate__authdir(void *ignored)
"Address 100.200.10.1\n"
"BridgeAuthoritativeDir 1\n"
"ContactInfo hello@hello.com\n"
- "GuardfractionFile non-existant-file\n");
+ "GuardfractionFile non-existent-file\n");
mock_clean_saved_logs();
options_validate(NULL, tdata->opt, tdata->def_opt, 0, &msg);
tt_str_op(msg, OP_EQ,
@@ -1112,7 +1112,7 @@ test_options_validate__transproxy(void *ignored)
// Test unknown trans proxy
free_options_test_data(tdata);
- tdata = get_options_test_data("TransProxyType non-existant\n");
+ tdata = get_options_test_data("TransProxyType non-existent\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, "Unrecognized value for TransProxyType");
diff --git a/src/test/test_shared_random.c b/src/test/test_shared_random.c
index 96494904e3..4fe9ee45f0 100644
--- a/src/test/test_shared_random.c
+++ b/src/test/test_shared_random.c
@@ -402,7 +402,7 @@ test_sr_commit(void *arg)
sizeof(our_commit->hashed_reveal)));
/* Do we have a valid encoded commit and reveal. Note the following only
* tests if the generated values are correct. Their could be a bug in
- * the decode function but we test them seperately. */
+ * the decode function but we test them separately. */
tt_int_op(0, OP_EQ, reveal_decode(our_commit->encoded_reveal,
&test_commit));
tt_int_op(0, OP_EQ, commit_decode(our_commit->encoded_commit,
@@ -612,7 +612,7 @@ test_vote(void *arg)
ret = smartlist_split_string(chunks, lines, "\n", SPLIT_IGNORE_BLANK, 0);
tt_int_op(ret, OP_EQ, 4);
tt_str_op(smartlist_get(chunks, 0), OP_EQ, "shared-rand-participate");
- /* Get our commitment line and will validate it agains our commit. The
+ /* Get our commitment line and will validate it against our commit. The
* format is as follow:
* "shared-rand-commitment" SP version SP algname SP identity
* SP COMMIT [SP REVEAL] NL
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 1fd41a348a..ba4ac3c064 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -703,7 +703,7 @@ test_util_time(void *arg)
* a "correct" retrospective gregorian negative year value,
* which I'm pretty sure is:
* -1*(2^63)/60/60/24*2000/730485 + 1970 = -292277022657
- * 730485 is the number of days in two millenia, including leap days */
+ * 730485 is the number of days in two millennia, including leap days */
a_time.tm_year = -292277022657-1900;
CAPTURE();
tt_int_op((time_t) -1,OP_EQ, tor_timegm(&a_time));
@@ -739,7 +739,7 @@ test_util_time(void *arg)
* a "correct" proleptic gregorian year value,
* which I'm pretty sure is:
* (2^63-1)/60/60/24*2000/730485 + 1970 = 292277026596
- * 730485 is the number of days in two millenia, including leap days */
+ * 730485 is the number of days in two millennia, including leap days */
a_time.tm_year = 292277026596-1900;
CAPTURE();
tt_int_op((time_t) -1,OP_EQ, tor_timegm(&a_time));
@@ -875,7 +875,7 @@ test_util_time(void *arg)
* a "correct" retrospective gregorian negative year value,
* which I'm pretty sure is:
* -1*(2^63)/60/60/24*2000/730485 + 1970 = -292277022657
- * 730485 is the number of days in two millenia, including leap days
+ * 730485 is the number of days in two millennia, including leap days
* (int64_t)b_time.tm_year == (-292277022657LL-1900LL) without clamping */
t_res = INT64_MIN;
CAPTURE();
@@ -921,7 +921,7 @@ test_util_time(void *arg)
* a "correct" proleptic gregorian year value,
* which I'm pretty sure is:
* (2^63-1)/60/60/24*2000/730485 + 1970 = 292277026596
- * 730485 is the number of days in two millenia, including leap days
+ * 730485 is the number of days in two millennia, including leap days
* (int64_t)b_time.tm_year == (292277026596L-1900L) without clamping */
t_res = INT64_MAX;
CAPTURE();
@@ -5465,7 +5465,7 @@ is_there_a_localhost(int family)
#endif /* 0 */
/* Test for socketpair and ersatz_socketpair(). We test them both, since
- * the latter is a tolerably good way to exersize tor_accept_socket(). */
+ * the latter is a tolerably good way to exercise tor_accept_socket(). */
static void
test_util_socketpair(void *arg)
{