diff options
author | Taylor Yu <catalyst@torproject.org> | 2018-12-17 09:31:16 -0600 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-12-21 14:15:35 -0500 |
commit | 85542ee5a0b37bf5b572b9beeda3cb8038ecd88e (patch) | |
tree | b89e4f059e60abbfe6cc71448e3a48c20f3cd7b7 /src/test/test_controller_events.c | |
parent | 936c93e562deaba62f0d32f7e7fda770c5604318 (diff) | |
download | tor-85542ee5a0b37bf5b572b9beeda3cb8038ecd88e.tar.gz tor-85542ee5a0b37bf5b572b9beeda3cb8038ecd88e.zip |
The big bootstrap phase redefinition
Redefine the set of bootstrap phases to allow display of finer-grained
progress in the early connection stages of connecting to a relay.
This includes adding intermediate phases for proxy and PT connections.
Also add a separate new phase to indicate obtaining enough directory
info to build circuits so we can report that independently of actually
initiating an ORCONN to build the first application circuit.
Previously, we would claim to be connecting to a relay when we had
merely finished obtaining directory info.
Part of ticket 27167.
Diffstat (limited to 'src/test/test_controller_events.c')
-rw-r--r-- | src/test/test_controller_events.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/test/test_controller_events.c b/src/test/test_controller_events.c index 63013390e4..dc2bb77e9b 100644 --- a/src/test/test_controller_events.c +++ b/src/test/test_controller_events.c @@ -351,10 +351,10 @@ test_cntev_dirboot_defer_desc(void *arg) /* This event should get deferred */ control_event_boot_dir(BOOTSTRAP_STATUS_REQUESTING_DESCRIPTORS, 0); assert_bootmsg("0 TAG=starting"); - control_event_bootstrap(BOOTSTRAP_STATUS_CONN_DIR, 0); - assert_bootmsg("5 TAG=conn_dir"); - control_event_bootstrap(BOOTSTRAP_STATUS_HANDSHAKE_DIR, 0); - assert_bootmsg("10 TAG=handshake_dir"); + control_event_bootstrap(BOOTSTRAP_STATUS_CONN, 0); + assert_bootmsg("5 TAG=conn"); + control_event_bootstrap(BOOTSTRAP_STATUS_HANDSHAKE, 0); + assert_bootmsg("14 TAG=handshake"); /* The deferred event should appear */ control_event_boot_first_orconn(); assert_bootmsg("45 TAG=requesting_descriptors"); @@ -374,15 +374,15 @@ test_cntev_dirboot_defer_orconn(void *arg) control_event_bootstrap(BOOTSTRAP_STATUS_STARTING, 0); assert_bootmsg("0 TAG=starting"); /* This event should get deferred */ - control_event_boot_dir(BOOTSTRAP_STATUS_CONN_OR, 0); + control_event_boot_dir(BOOTSTRAP_STATUS_ENOUGH_DIRINFO, 0); assert_bootmsg("0 TAG=starting"); - control_event_bootstrap(BOOTSTRAP_STATUS_CONN_DIR, 0); - assert_bootmsg("5 TAG=conn_dir"); - control_event_bootstrap(BOOTSTRAP_STATUS_HANDSHAKE_DIR, 0); - assert_bootmsg("10 TAG=handshake_dir"); + control_event_bootstrap(BOOTSTRAP_STATUS_CONN, 0); + assert_bootmsg("5 TAG=conn"); + control_event_bootstrap(BOOTSTRAP_STATUS_HANDSHAKE, 0); + assert_bootmsg("14 TAG=handshake"); /* The deferred event should appear */ control_event_boot_first_orconn(); - assert_bootmsg("80 TAG=conn_or"); + assert_bootmsg("75 TAG=enough_dirinfo"); done: tor_free(saved_event_str); UNMOCK(queue_control_event_string); |