diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_address.c | 2 | ||||
-rw-r--r-- | src/test/test_channel.c | 2 | ||||
-rw-r--r-- | src/test/test_circuitmux.c | 2 | ||||
-rw-r--r-- | src/test/test_circuitpadding.c | 6 | ||||
-rw-r--r-- | src/test/test_config.c | 12 | ||||
-rw-r--r-- | src/test/test_confparse.c | 2 | ||||
-rw-r--r-- | src/test/test_consdiffmgr.c | 2 | ||||
-rw-r--r-- | src/test/test_dir.c | 6 | ||||
-rw-r--r-- | src/test/test_dir_handle_get.c | 8 | ||||
-rw-r--r-- | src/test/test_dirvote.c | 2 | ||||
-rw-r--r-- | src/test/test_dispatch.c | 2 | ||||
-rw-r--r-- | src/test/test_geoip.c | 6 | ||||
-rw-r--r-- | src/test/test_hs_client.c | 2 | ||||
-rw-r--r-- | src/test/test_hs_common.c | 2 | ||||
-rw-r--r-- | src/test/test_hs_control.c | 4 | ||||
-rw-r--r-- | src/test/test_hs_service.c | 4 | ||||
-rw-r--r-- | src/test/test_metrics.c | 4 | ||||
-rw-r--r-- | src/test/test_periodic_event.c | 2 | ||||
-rw-r--r-- | src/test/test_prob_distr.c | 4 | ||||
-rw-r--r-- | src/test/test_process.c | 2 | ||||
-rw-r--r-- | src/test/test_relaycell.c | 4 | ||||
-rw-r--r-- | src/test/test_sendme.c | 2 | ||||
-rw-r--r-- | src/test/test_shared_random.c | 4 | ||||
-rw-r--r-- | src/test/test_util.c | 6 |
24 files changed, 46 insertions, 46 deletions
diff --git a/src/test/test_address.c b/src/test/test_address.c index 17479d69c2..e7007f22f3 100644 --- a/src/test/test_address.c +++ b/src/test/test_address.c @@ -713,7 +713,7 @@ test_address_udp_socket_trick_blackbox(void *arg) #else /* !(0) */ /* Both of the blackbox test cases fail horribly if: - * * The host has no external addreses. + * * The host has no external addresses. * * There are multiple interfaces with either AF_INET or AF_INET6. * * The last address isn't the one associated with the default route. * diff --git a/src/test/test_channel.c b/src/test/test_channel.c index c86327ceb4..d43f6e010a 100644 --- a/src/test/test_channel.c +++ b/src/test/test_channel.c @@ -729,7 +729,7 @@ test_channel_inbound_cell(void *arg) tt_int_op(chan->reason_for_closing, OP_EQ, CHANNEL_CLOSE_REQUESTED); tt_int_op(test_close_called, OP_EQ, old_count + 1); - /* This closes the channe so it calls in the scheduler, make sure of it. */ + /* This closes the channel so it calls in the scheduler, make sure of it. */ old_count = test_releases_count; chan_test_finish_close(chan); tt_int_op(test_releases_count, OP_EQ, old_count + 1); diff --git a/src/test/test_circuitmux.c b/src/test/test_circuitmux.c index 2c11d107d0..d6e3300a30 100644 --- a/src/test/test_circuitmux.c +++ b/src/test/test_circuitmux.c @@ -191,7 +191,7 @@ test_cmux_attach_circuit(void *arg) tt_int_op(circuitmux_is_circuit_attached(pchan->cmux, circ), OP_EQ, 1); tt_int_op(circuitmux_is_circuit_attached(nchan->cmux, circ), OP_EQ, 1); - /* Query the chanid<->circid map in the cmux subsytem with what we just + /* Query the chanid<->circid map in the cmux subsystem with what we just * created and validate the cell direction. */ cdir = circuitmux_attached_circuit_direction(pchan->cmux, circ); tt_int_op(cdir, OP_EQ, CELL_DIRECTION_IN); diff --git a/src/test/test_circuitpadding.c b/src/test/test_circuitpadding.c index c3346e2e03..86baf54f40 100644 --- a/src/test/test_circuitpadding.c +++ b/src/test/test_circuitpadding.c @@ -1374,7 +1374,7 @@ test_circuitpadding_wronghop(void *arg) ret = circpad_handle_padding_negotiated(relay_side, &cell, NULL); tt_int_op(ret, OP_EQ, -1); - /* 7. Test garbled negotated cell (bad command 255) */ + /* 7. Test garbled negotiated cell (bad command 255) */ memset(&cell, 0, sizeof(cell)); ret = circpad_handle_padding_negotiate(relay_side, &cell); tt_int_op(ret, OP_EQ, -1); @@ -2338,7 +2338,7 @@ helper_circpad_circ_distribution_machine_setup(int min, int max) } /** Simple test that the padding delays sampled from a uniform distribution - * actually faill within the uniform distribution range. */ + * actually fail within the uniform distribution range. */ static void test_circuitpadding_sample_distribution(void *arg) { @@ -3032,7 +3032,7 @@ test_circuitpadding_hs_machines(void *arg) /* Test logic: * - * 1) Register the HS machines, which aim to hide the presense of + * 1) Register the HS machines, which aim to hide the presence of * onion service traffic on the client-side * * 2) Call helper_test_hs_machines() to perform tests for the intro circuit diff --git a/src/test/test_config.c b/src/test/test_config.c index 48a7091ef6..a0278f9422 100644 --- a/src/test/test_config.c +++ b/src/test/test_config.c @@ -408,7 +408,7 @@ good_bridge_line_test(const char *string, const char *test_addrport, tor_free(tmp); } - /* If we were asked to validate a transport name, make sure tha it + /* If we were asked to validate a transport name, make sure that it matches with the transport name that was parsed. */ if (test_transport && !bridge_line->transport_name) tt_abort(); @@ -995,7 +995,7 @@ static const char *ret_addr_lookup_01010101[2] = { }; /** This mock function is meant to replace tor_addr_lookup(). - * It answers with 1.1.1.1 as IP adddress that resulted from lookup. + * It answers with 1.1.1.1 as IP address that resulted from lookup. * This function increments <b>n_hostname_01010101</b> counter by one * every time it is called. */ @@ -1022,7 +1022,7 @@ tor_addr_lookup_01010101(const char *name, uint16_t family, tor_addr_t *addr) static int n_hostname_localhost = 0; /** This mock function is meant to replace tor_addr_lookup(). - * It answers with 127.0.0.1 as IP adddress that resulted from lookup. + * It answers with 127.0.0.1 as IP address that resulted from lookup. * This function increments <b>n_hostname_localhost</b> counter by one * every time it is called. */ @@ -1408,7 +1408,7 @@ test_config_find_my_address_mixed(void *arg) * AF_INET6 but we have one interface to do so thus we run the same exact unit * tests for both without copying them. */ typedef struct find_my_address_params_t { - /* Index where the mock function results are located. For intance, + /* Index where the mock function results are located. For instance, * tor_addr_lookup_01010101() will have its returned value depending on the * family in ret_addr_lookup_01010101[]. * @@ -4912,7 +4912,7 @@ test_config_parse_port_config__ports__ports_given(void *data) port_cfg = (port_cfg_t *)smartlist_get(slout, 0); tt_int_op(port_cfg->entry_cfg.session_group, OP_EQ, 1111122); - // Test success with a zero unix domain socket, and doesnt add it to out + // Test success with a zero unix domain socket, and doesn't add it to out config_free_lines(config_port_valid); config_port_valid = NULL; SMARTLIST_FOREACH(slout,port_cfg_t *,pf,port_cfg_free(pf)); smartlist_clear(slout); @@ -4922,7 +4922,7 @@ test_config_parse_port_config__ports__ports_given(void *data) tt_int_op(ret, OP_EQ, 0); tt_int_op(smartlist_len(slout), OP_EQ, 0); - // Test success with a one unix domain socket, and doesnt add it to out + // Test success with a one unix domain socket, and doesn't add it to out config_free_lines(config_port_valid); config_port_valid = NULL; SMARTLIST_FOREACH(slout,port_cfg_t *,pf,port_cfg_free(pf)); smartlist_clear(slout); diff --git a/src/test/test_confparse.c b/src/test/test_confparse.c index 21301ce75e..abd53dea68 100644 --- a/src/test/test_confparse.c +++ b/src/test/test_confparse.c @@ -344,7 +344,7 @@ test_confparse_assign_deprecated(void *arg) config_mgr_free(mgr); } -/* Try to re-assign an option name that has been depreacted in favor of +/* Try to re-assign an option name that has been deprecated in favor of * another. */ static void test_confparse_assign_replaced(void *arg) diff --git a/src/test/test_consdiffmgr.c b/src/test/test_consdiffmgr.c index 4bec6baeb0..f4adf43549 100644 --- a/src/test/test_consdiffmgr.c +++ b/src/test/test_consdiffmgr.c @@ -689,7 +689,7 @@ static void test_consdiffmgr_cleanup_bad_valid_after(void *arg) { /* This will seem cleanable, but isn't, because its valid-after time is - * misformed. */ + * malformed. */ (void)arg; config_line_t *labels = NULL; diff --git a/src/test/test_dir.c b/src/test/test_dir.c index 4dec05ecfd..d62dd3fb9e 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -1388,7 +1388,7 @@ test_dir_load_routers(void *arg) smartlist_add_strdup(chunks, EX_RI_BAD_PORTS); smartlist_add_strdup(chunks, EX_RI_BAD_TOKENS); - /* not ADDing MINIMIAL */ + /* not ADDing MINIMAL */ ADD(EX_RI_MAXIMAL); ADD(EX_RI_BAD_FINGERPRINT); ADD(EX_RI_BAD_SIG1); @@ -1537,7 +1537,7 @@ test_dir_load_extrainfo(void *arg) smartlist_add_strdup(chunks, EX_EI_BAD_PUBLISHED); smartlist_add_strdup(chunks, EX_EI_BAD_TOKENS); - /* not ADDing MINIMIAL */ + /* not ADDing MINIMAL */ ADD(EX_EI_MAXIMAL); ADD(EX_EI_BAD_NICKNAME); /* Not ADDing BAD_PUBLISHED */ @@ -7044,7 +7044,7 @@ test_dir_dirserv_load_fingerprint_file(void *arg) expect_log_msg_containing("Invalid fingerprint"); teardown_capture_of_logs(); - // Test: Formt string exploit + // Test: Format string exploit setup_capture_of_logs(LOG_NOTICE); write_str_to_file(fname, router_lines_bad_fmt_str, 0); tt_int_op(dirserv_load_fingerprint_file(), OP_EQ, 0); diff --git a/src/test/test_dir_handle_get.c b/src/test/test_dir_handle_get.c index 53c81b8599..f717f83932 100644 --- a/src/test/test_dir_handle_get.c +++ b/src/test/test_dir_handle_get.c @@ -331,10 +331,10 @@ test_dir_handle_get_rendezvous2_on_encrypted_conn_not_well_formed(void *data) TO_CONN(conn)->linked = 1; tt_assert(connection_dir_is_encrypted(conn)); - //TODO: this cant be reached because rend_valid_descriptor_id() prevents this - //case to happen. This test is the same as - //test_dir_handle_get_rendezvous2_on_encrypted_conn_with_invalid_desc_id - //We should refactor to remove the case from the switch. + //TODO: this can't be reached because rend_valid_descriptor_id() prevents + //this case to happen. This test is the same as + //test_dir_handle_get_rendezvous2_on_encrypted_conn_with_invalid_desc_id We + //should refactor to remove the case from the switch. const char *req = RENDEZVOUS2_GET("1bababababababababababababababab"); tt_int_op(directory_handle_command_get(conn, req, NULL, 0), OP_EQ, 0); diff --git a/src/test/test_dirvote.c b/src/test/test_dirvote.c index bc2d1150d6..b5e57ad071 100644 --- a/src/test/test_dirvote.c +++ b/src/test/test_dirvote.c @@ -18,7 +18,7 @@ #include "test/test.h" /** - * This struct holds the various informations that are needed for router + * This struct holds the various information that are needed for router * comparison. Each router in the test function has one, and they are all * put in a global digestmap, router_properties */ diff --git a/src/test/test_dispatch.c b/src/test/test_dispatch.c index 77f33e4b15..f7f8ecdc03 100644 --- a/src/test/test_dispatch.c +++ b/src/test/test_dispatch.c @@ -135,7 +135,7 @@ test_dispatch_simple(void *arg) tor_free(recv2_received); } -/* Construct a dispatch_t with a message and no reciever; make sure that it +/* Construct a dispatch_t with a message and no receiver; make sure that it * gets dropped properly. */ static void test_dispatch_no_recipient(void *arg) diff --git a/src/test/test_geoip.c b/src/test/test_geoip.c index bf9932c169..95afe4d6c4 100644 --- a/src/test/test_geoip.c +++ b/src/test/test_geoip.c @@ -402,7 +402,7 @@ test_geoip_load_file(void *arg) char *contents = NULL; char *dhex = NULL; - /* A nonexistant filename should fail. */ + /* A nonexistent filename should fail. */ tt_int_op(-1, OP_EQ, geoip_load_file(AF_INET, "/you/did/not/put/a/file/here/I/hope", LOG_INFO)); @@ -412,7 +412,7 @@ test_geoip_load_file(void *arg) tt_str_op("??", OP_EQ, geoip_get_country_name(0)); /* Any lookup attempt should say "-1" because we have no info */ tt_int_op(-1, OP_EQ, geoip_get_country_by_ipv4(0x01020304)); - /* There should be no 'digest' for a nonexistant file */ + /* There should be no 'digest' for a nonexistent file */ tt_str_op("0000000000000000000000000000000000000000", OP_EQ, geoip_db_digest(AF_INET)); @@ -467,7 +467,7 @@ test_geoip6_load_file(void *arg) char *contents = NULL; char *dhex = NULL; - /* A nonexistant filename should fail. */ + /* A nonexistent filename should fail. */ tt_int_op(-1, OP_EQ, geoip_load_file(AF_INET6, "/you/did/not/put/a/file/here/I/hope", LOG_INFO)); diff --git a/src/test/test_hs_client.c b/src/test/test_hs_client.c index f965344ce0..dc3b2ff72c 100644 --- a/src/test/test_hs_client.c +++ b/src/test/test_hs_client.c @@ -1486,7 +1486,7 @@ test_purge_ephemeral_client_auth(void *arg) MOCK(get_options, mock_get_options); MOCK(write_str_to_file, mock_write_str_to_file); - /* Boggus directory so when we try to write the permanent client + /* Bogus directory so when we try to write the permanent client * authorization data to disk, we don't fail. See * store_permanent_client_auth_credentials() for more details. */ mocked_options.ClientOnionAuthDir = tor_strdup("auth_dir"); diff --git a/src/test/test_hs_common.c b/src/test/test_hs_common.c index 295d9cdb62..b0f408d662 100644 --- a/src/test/test_hs_common.c +++ b/src/test/test_hs_common.c @@ -482,7 +482,7 @@ test_desc_reupload_logic(void *arg) * 1) Upload descriptor to HSDirs * CHECK that previous_hsdirs list was populated. * 2) Then call router_dir_info_changed() without an HSDir set change. - * CHECK that no reuplod occurs. + * CHECK that no reupload occurs. * 3) Now change the HSDir set, and call dir_info_changed() again. * CHECK that reupload occurs. * 4) Finally call service_desc_schedule_upload(). diff --git a/src/test/test_hs_control.c b/src/test/test_hs_control.c index 80bbf547dc..6e41c4994f 100644 --- a/src/test/test_hs_control.c +++ b/src/test/test_hs_control.c @@ -619,7 +619,7 @@ test_hs_control_store_permanent_creds(void *arg) tt_assert(creds_file_str); tt_str_op(creds_file_str, OP_EQ, "2fvhjskjet3n5syd6yfg5lhvwcs62bojmthr35ko5bllr3iqdb4ctdyd:descriptor:" - /* This is the base32 represenation of the base64 iJ1t... key above */ + /* base32 representation of the base64 iJ1t... key above */ "x25519:rcow3dfavmyanyqvhwnvnmfdqw34ydtrgv7jnelmqs4wi4uuxrca"); tor_free(args); @@ -643,7 +643,7 @@ test_hs_control_store_permanent_creds(void *arg) tt_assert(creds_file_str); tt_str_op(creds_file_str, OP_EQ, "2fvhjskjet3n5syd6yfg5lhvwcs62bojmthr35ko5bllr3iqdb4ctdyd:descriptor:" - /* This is the base32 represenation of the base64 UDRv... key above */ + /* base32 representation of the base64 UDRv... key above */ "x25519:ka2g6zf33qti2ecexpbx4stan3nsu3sijbiqm4t2rwctigxajnpq"); /* Now for our next act!!! Actually get the HS client subsystem to parse the diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c index ad38547495..e61d33ecb3 100644 --- a/src/test/test_hs_service.c +++ b/src/test/test_hs_service.c @@ -159,7 +159,7 @@ mock_router_have_minimum_dir_info_false(void) } /* Helper: from a set of options in conf, configure a service which will add - * it to the staging list of the HS subsytem. */ + * it to the staging list of the HS subsystem. */ static int helper_config_service(const char *conf) { @@ -778,7 +778,7 @@ mock_node_get_by_id(const char *digest) { (void) digest; memset(mock_node.identity, 'A', DIGEST_LEN); - /* Only return the matchin identity of As */ + /* Only return the matching identity of As */ if (!tor_memcmp(mock_node.identity, digest, DIGEST_LEN)) { return &mock_node; } diff --git a/src/test/test_metrics.c b/src/test/test_metrics.c index 1c645813a4..96eadc6b43 100644 --- a/src/test/test_metrics.c +++ b/src/test/test_metrics.c @@ -3,7 +3,7 @@ /** * \file test_metrics.c - * \brief Test lib/metrics and feature/metrics functionnalities + * \brief Test lib/metrics and feature/metrics functionalities */ #define CONFIG_PRIVATE @@ -233,7 +233,7 @@ test_store(void *arg) tt_assert(entry); metrics_store_entry_add_label(entry, TEST_METRICS_ENTRY_LABEL_2); - /* Make sure _both_ entires are there. */ + /* Make sure _both_ entries are there. */ const smartlist_t *entries = metrics_store_get_all(store, TEST_METRICS_ENTRY_NAME); tt_assert(entries); diff --git a/src/test/test_periodic_event.c b/src/test/test_periodic_event.c index 1dd3f7a68d..d3bc89673b 100644 --- a/src/test/test_periodic_event.c +++ b/src/test/test_periodic_event.c @@ -101,7 +101,7 @@ test_pe_launch(void *arg) periodic_events_on_new_options(options); #if 0 - /* Lets make sure that before intialization, we can't scan the periodic + /* Lets make sure that before initialization, we can't scan the periodic * events list and launch them. Lets try by being a Client. */ /* XXXX We make sure these events are initialized now way earlier than we * did before. */ diff --git a/src/test/test_prob_distr.c b/src/test/test_prob_distr.c index 541a81df3a..da65a0f26d 100644 --- a/src/test/test_prob_distr.c +++ b/src/test/test_prob_distr.c @@ -442,7 +442,7 @@ test_log_logistic(void *arg) /* x is a point in the support of the LogLogistic distribution */ double x; /* 'p' is the probability that a random variable X for a given LogLogistic - * probability ditribution will take value less-or-equal to x */ + * probability distribution will take value less-or-equal to x */ double p; /* 'np' is the probability that a random variable X for a given LogLogistic * probability distribution will take value greater-or-equal to x. */ @@ -591,7 +591,7 @@ test_weibull(void *arg) /* x is a point in the support of the Weibull distribution */ double x; /* 'p' is the probability that a random variable X for a given Weibull - * probability ditribution will take value less-or-equal to x */ + * probability distribution will take value less-or-equal to x */ double p; /* 'np' is the probability that a random variable X for a given Weibull * probability distribution will take value greater-or-equal to x. */ diff --git a/src/test/test_process.c b/src/test/test_process.c index c1da6db278..b5185242d3 100644 --- a/src/test/test_process.c +++ b/src/test/test_process.c @@ -156,7 +156,7 @@ test_default_values(void *arg) /* Our command was given to the process_t's constructor in process_new(). */ tt_str_op("/path/to/nothing", OP_EQ, process_get_command(process)); - /* Make sure we are listed in the list of proccesses. */ + /* Make sure we are listed in the list of processes. */ tt_assert(smartlist_contains(process_get_all_processes(), process)); diff --git a/src/test/test_relaycell.c b/src/test/test_relaycell.c index 3a317be5fe..6f5bc7e770 100644 --- a/src/test/test_relaycell.c +++ b/src/test/test_relaycell.c @@ -491,7 +491,7 @@ subtest_halfstream_insertremove(int num) entryconn = fake_entry_conn(circ, 23); edgeconn = ENTRY_TO_EDGE_CONN(entryconn); - /* Explicity test all operations on an absent stream list */ + /* Explicitly test all operations on an absent stream list */ tt_int_op(connection_half_edge_is_valid_data(circ->half_streams, 23), OP_EQ, 0); tt_int_op(connection_half_edge_is_valid_connected(circ->half_streams, @@ -570,7 +570,7 @@ subtest_halfstream_insertremove(int num) } tt_int_op(smartlist_len(circ->half_streams), OP_EQ, 0); - /* Explicity test all operations on an empty stream list */ + /* Explicitly test all operations on an empty stream list */ tt_int_op(connection_half_edge_is_valid_data(circ->half_streams, 23), OP_EQ, 0); tt_int_op(connection_half_edge_is_valid_connected(circ->half_streams, diff --git a/src/test/test_sendme.c b/src/test/test_sendme.c index 2ff4809124..b34c7ae143 100644 --- a/src/test/test_sendme.c +++ b/src/test/test_sendme.c @@ -56,7 +56,7 @@ test_v1_record_digest(void *arg) circ = TO_CIRCUIT(or_circ); /* The package window has to be a multiple of CIRCWINDOW_INCREMENT minus 1 - * in order to catched the CIRCWINDOW_INCREMENT-nth cell. Try something that + * in order to catch the CIRCWINDOW_INCREMENT-nth cell. Try something that * shouldn't be noted. */ circ->package_window = CIRCWINDOW_INCREMENT; sendme_record_cell_digest_on_circ(circ, NULL); diff --git a/src/test/test_shared_random.c b/src/test/test_shared_random.c index 148eb5cf90..950cdd3d33 100644 --- a/src/test/test_shared_random.c +++ b/src/test/test_shared_random.c @@ -1400,7 +1400,7 @@ test_state_transition(void *arg) sr_state_delete_commits(); tt_int_op(digestmap_size(state->commits), OP_EQ, 0); /* Add it back so we can continue the rest of the test because after - * deletiong our commit will be freed so generate a new one. */ + * deleting our commit will be freed so generate a new one. */ commit = sr_generate_our_commit(now, mock_cert); tt_assert(commit); sr_state_add_commit(commit); @@ -1541,7 +1541,7 @@ test_keep_commit(void *arg) * in the state and commitment and reveal values match. */ tt_int_op(should_keep_commit(commit, commit->rsa_identity, SR_PHASE_REVEAL), OP_EQ, 1); - /* The commit shouldn't be kept if it's not verified that is no matchin + /* The commit shouldn't be kept if it's not verified that is no matching * hashed reveal. */ { /* Let's save the hash reveal so we can restore it. */ diff --git a/src/test/test_util.c b/src/test/test_util.c index 1c555e4d06..b3a1e2caca 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -4514,7 +4514,7 @@ test_util_glob(void *ptr) smartlist_free(results); \ } while (0); - // wilcards at beginning + // wildcards at beginning const char *results_test1[] = {"dir2", "file2"}; TEST("*2"); EXPECT(results_test1); @@ -4761,7 +4761,7 @@ test_util_get_glob_opened_files(void *ptr) TEST("*"PATH_SEPARATOR); EXPECT(results_test2); - // wilcards in multiple path components + // wildcards in multiple path components #ifndef _WIN32 const char *results_test3[] = {"", "dir1", "dir2", "empty", "file1", "file2", "forbidden"}; @@ -6193,7 +6193,7 @@ test_util_hostname_validation(void *arg) // XXX: do we allow single-label DNS names? // We shouldn't for SOCKS (spec says "contains a fully-qualified domain name" - // but only test pathologically malformed traling '.' cases for now. + // but only test pathologically malformed trailing '.' cases for now. tt_assert(!string_is_valid_nonrfc_hostname(".")); tt_assert(!string_is_valid_nonrfc_hostname("..")); |