[tor-bugs] #16506 [Tor]: Review current test coverage and implement test for modules when necessary

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Jul 16 16:02:30 UTC 2015


#16506: Review current test coverage and implement test for modules when necessary
-------------------------+-----------------------------------------
     Reporter:  isabela  |      Owner:
         Type:  defect   |     Status:  new
     Priority:  normal   |  Milestone:  Tor: 0.2.7.x-final
    Component:  Tor      |    Version:  Tor: 0.2.7
   Resolution:           |   Keywords:  sponsorS, TorCoreTeam201507
Actual Points:           |  Parent ID:
       Points:           |
-------------------------+-----------------------------------------

Comment (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
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/16506#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list