Opened 4 years ago

Closed 4 years ago

#16506 closed task (implemented)

Open subtickets tor improving test coverage in specific areas

Reported by: isabela Owned by: nickm
Priority: Medium Milestone: Tor: 0.2.7.x-final
Component: Core Tor/Tor Version: Tor: 0.2.7
Severity: Keywords: sponsorS, TorCoreTeam201509, 028-triaged
Cc: nickm, rl1987@… Actual Points:
Parent ID: Points:
Reviewer: Sponsor: SponsorS

Description

This ticket is to track the work related on making sure we have test coverage to the most important pieces of core tor.

The task is to review the output of NickM's coverage script [0,1] and identify the modules that we should write tests for. For each one we identify we will create a sub-ticket to track the actual work of writing the tests for that module.

[0]https://lists.torproject.org/pipermail/tor-dev/2015-July/009011.html
[1]https://people.torproject.org/~nickm/volatile/coverage-65a1e27.tar.bz2

Child Tickets

Change History (14)

comment:1 Changed 4 years ago by nickm

I've added an improvd version of the script to scripts/test/cov-display. Now it can handle functions too.

Hare are the top functions from my "what should we test" email, sorted by how covered they are by the unit tests:

cov2/log.c.gcov:820 add_stream_log_impl 0 8 100.00
cov2/connection.c.gcov:4755 assert_connection_ok 61 21 25.61
cov2/circuituse.c.gcov:370 circuit_expire_building 102 0 0.00
cov2/circuitbuild.c.gcov:1071 circuit_extend 51 0 0.00
cov2/circuitbuild.c.gcov:847 circuit_send_next_onion_skin 105 0 0.00
cov2/confparse.c.gcov:799 config_assign 7 14 66.67
cov2/circuituse.c.gcov:2314 connection_ap_handshake_attach_circuit 76 0 0.00
cov2/connection_edge.c.gcov:1809 connection_ap_handshake_process_socks 28 0 0.00
cov2/connection_edge.c.gcov:1123 connection_ap_handshake_rewrite_and_attach 188 1 0.53
cov2/connection.c.gcov:729 connection_close_immediate 16 1 5.88
cov2/connection.c.gcov:1618 connection_connect_sockaddr 40 0 0.00
cov2/directory.c.gcov:1593 connection_dir_client_reached_eof 286 0 0.00
cov2/directory.c.gcov:2254 connection_dir_process_inbuf 15 0 0.00
cov2/connection_edge.c.gcov:235 connection_edge_destroy 17 0 0.00
cov2/connection_edge.c.gcov:172 connection_edge_process_inbuf 24 0 0.00
cov2/relay.c.gcov:1416 connection_edge_process_relay_cell 186 0 0.00
cov2/connection_edge.c.gcov:2693 connection_exit_begin_conn 109 1 0.91
cov2/connection.c.gcov:1420 connection_handle_listener_read 80 0 0.00
cov2/connection.c.gcov:4093 connection_handle_write 6 0 0.00
cov2/connection.c.gcov:3843 connection_handle_write_impl 117 0 0.00
cov2/router.c.gcov:1192 consider_testing_reachability 19 0 0.00
cov2/directory.c.gcov:3349 directory_handle_command 17 0 0.00
cov2/directory.c.gcov:2618 directory_handle_command_get 300 0 0.00
cov2/main.c.gcov:1016 directory_info_has_arrived 18 0 0.00
cov2/dns.c.gcov:1239 dns_found_answer 20 0 0.00
cov2/dns.c.gcov:722 dns_resolve 30 0 0.00
cov2/main.c.gcov:1992 do_main_loop 49 0 0.00
cov2/buffers.c.gcov:1442 fetch_from_buf_socks 2 13 86.67
cov2/router.c.gcov:775 init_keys 90 57 38.78
cov2/tor_main.c.gcov:28 main 0 1 100.00
cov2/dirvote.c.gcov:1120 networkstatus_compute_consensus 91 359 79.78
cov2/routerparse.c.gcov:2832 networkstatus_parse_vote_from_string 127 234 64.82
cov2/circuitbuild.c.gcov:2219 onion_extend_cpath 26 0 0.00
cov2/config.c.gcov:1362 options_act 236 27 10.27
cov2/config.c.gcov:2658 options_validate 370 230 38.33
cov2/config.c.gcov:5840 parse_port_config 163 91 35.83
cov2/routerlist.c.gcov:3275 router_add_to_routerlist 43 31 41.89
cov2/router.c.gcov:2359 router_dump_router_to_string 50 116 69.88
cov2/router.c.gcov:2062 router_rebuild_descriptor 16 5 23.81
cov2/main.c.gcov:1263 run_scheduled_events 220 1 0.45
cov2/main.c.gcov:2698 tor_free_all 0 52 100.00

comment:2 Changed 4 years ago by rl1987

Cc: rl1987@… added

comment:3 Changed 4 years ago by nickm

Keywords: TorCoreTeam201508 added; TorCoreTeam201507 removed
Summary: Review current test coverage and implement test for modules when necessaryOpen subtickets tor improving test coverage in specific areas

comment:4 Changed 4 years ago by nickm

Opened #16791 for coverage on src/common in general. Making child tickets for it now.
Opened #16506 for improving testing tools. #16710 too.

comment:5 Changed 4 years ago by nickm

Opened #16802 and #16803 for the sandbox code.

comment:6 Changed 4 years ago by nickm

Added #16804 for integrating more chutney tests into our "make test-network" suite.

comment:7 Changed 4 years ago by nickm

Added #16805 for some low-hanging but very old fruit in src/or. Added #16806 for some other code not hit by chutney.

comment:8 Changed 4 years ago by nickm

Added #16807 for misbehaved network participants. Added #16808 and #16809 and #16810 for more src/or testing.

I think all that remains is for us to make a couple of master tickets for the tickets mentioned above that don't yet have parents; try to pick milestones for stuff; and make a plan to look for more things to be tested once chutney is more capable and the blob is more under control.

comment:9 Changed 4 years ago by nickm

Owner: set to nickm
Status: newassigned

comment:10 Changed 4 years ago by nickm

Added #16826 to make callgraph generator better.

comment:11 Changed 4 years ago by nickm

Keywords: TorCoreTeam201509 added; TorCoreTeam201508 removed
Milestone: Tor: 0.2.7.x-finalTor: 0.2.8.x-final

comment:12 Changed 4 years ago by nickm

Keywords: 028-triaged added

comment:13 Changed 4 years ago by nickm

Sponsor: SponsorS

Bulk-replace SponsorS keyword with SponsorS sponsor field in Tor component.

comment:14 Changed 4 years ago by nickm

Milestone: Tor: 0.2.8.x-finalTor: 0.2.7.x-final
Resolution: implemented
Status: assignedclosed
Type: defecttask
Note: See TracTickets for help on using tickets.