test_routerlist.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521
  1. /* Copyright (c) 2014-2016, The Tor Project, Inc. */
  2. /* See LICENSE for licensing information */
  3. #include "orconfig.h"
  4. #include <math.h>
  5. #include <time.h>
  6. #define DIRVOTE_PRIVATE
  7. #define NETWORKSTATUS_PRIVATE
  8. #define ROUTERLIST_PRIVATE
  9. #define TOR_UNIT_TESTING
  10. #include "or.h"
  11. #include "config.h"
  12. #include "connection.h"
  13. #include "container.h"
  14. #include "directory.h"
  15. #include "dirvote.h"
  16. #include "microdesc.h"
  17. #include "networkstatus.h"
  18. #include "nodelist.h"
  19. #include "policies.h"
  20. #include "router.h"
  21. #include "routerlist.h"
  22. #include "routerparse.h"
  23. #include "shared_random.h"
  24. #include "test.h"
  25. #include "test_dir_common.h"
  26. void construct_consensus(char **consensus_text_md);
  27. static authority_cert_t *mock_cert;
  28. static authority_cert_t *
  29. get_my_v3_authority_cert_m(void)
  30. {
  31. tor_assert(mock_cert);
  32. return mock_cert;
  33. }
  34. /* 4 digests + 3 sep + pre + post + NULL */
  35. static char output[4*BASE64_DIGEST256_LEN+3+2+2+1];
  36. static void
  37. mock_get_from_dirserver(uint8_t dir_purpose, uint8_t router_purpose,
  38. const char *resource, int pds_flags,
  39. download_want_authority_t want_authority)
  40. {
  41. (void)dir_purpose;
  42. (void)router_purpose;
  43. (void)pds_flags;
  44. (void)want_authority;
  45. tt_assert(resource);
  46. strlcpy(output, resource, sizeof(output));
  47. done:
  48. ;
  49. }
  50. static void
  51. test_routerlist_initiate_descriptor_downloads(void *arg)
  52. {
  53. const char *prose = "unhurried and wise, we perceive.";
  54. smartlist_t *digests = smartlist_new();
  55. (void)arg;
  56. for (int i = 0; i < 20; i++) {
  57. smartlist_add(digests, (char*)prose);
  58. }
  59. MOCK(directory_get_from_dirserver, mock_get_from_dirserver);
  60. initiate_descriptor_downloads(NULL, DIR_PURPOSE_FETCH_MICRODESC,
  61. digests, 3, 7, 0);
  62. UNMOCK(directory_get_from_dirserver);
  63. tt_str_op(output, OP_EQ, "d/"
  64. "dW5odXJyaWVkIGFuZCB3aXNlLCB3ZSBwZXJjZWl2ZS4-"
  65. "dW5odXJyaWVkIGFuZCB3aXNlLCB3ZSBwZXJjZWl2ZS4-"
  66. "dW5odXJyaWVkIGFuZCB3aXNlLCB3ZSBwZXJjZWl2ZS4-"
  67. "dW5odXJyaWVkIGFuZCB3aXNlLCB3ZSBwZXJjZWl2ZS4"
  68. ".z");
  69. done:
  70. smartlist_free(digests);
  71. }
  72. static int count = 0;
  73. static void
  74. mock_initiate_descriptor_downloads(const routerstatus_t *source,
  75. int purpose, smartlist_t *digests,
  76. int lo, int hi, int pds_flags)
  77. {
  78. (void)source;
  79. (void)purpose;
  80. (void)digests;
  81. (void)pds_flags;
  82. (void)hi;
  83. (void)lo;
  84. count += 1;
  85. }
  86. static void
  87. test_routerlist_launch_descriptor_downloads(void *arg)
  88. {
  89. smartlist_t *downloadable = smartlist_new();
  90. time_t now = time(NULL);
  91. char *cp;
  92. (void)arg;
  93. for (int i = 0; i < 100; i++) {
  94. cp = tor_malloc(DIGEST256_LEN);
  95. tt_assert(cp);
  96. crypto_rand(cp, DIGEST256_LEN);
  97. smartlist_add(downloadable, cp);
  98. }
  99. MOCK(initiate_descriptor_downloads, mock_initiate_descriptor_downloads);
  100. launch_descriptor_downloads(DIR_PURPOSE_FETCH_MICRODESC, downloadable,
  101. NULL, now);
  102. tt_int_op(3, ==, count);
  103. UNMOCK(initiate_descriptor_downloads);
  104. done:
  105. SMARTLIST_FOREACH(downloadable, char *, cp1, tor_free(cp1));
  106. smartlist_free(downloadable);
  107. }
  108. void
  109. construct_consensus(char **consensus_text_md)
  110. {
  111. networkstatus_t *vote = NULL;
  112. networkstatus_t *v1 = NULL, *v2 = NULL, *v3 = NULL;
  113. networkstatus_voter_info_t *voter = NULL;
  114. authority_cert_t *cert1=NULL, *cert2=NULL, *cert3=NULL;
  115. crypto_pk_t *sign_skey_1=NULL, *sign_skey_2=NULL, *sign_skey_3=NULL;
  116. crypto_pk_t *sign_skey_leg=NULL;
  117. time_t now = time(NULL);
  118. smartlist_t *votes = NULL;
  119. int n_vrs;
  120. tt_assert(!dir_common_authority_pk_init(&cert1, &cert2, &cert3,
  121. &sign_skey_1, &sign_skey_2,
  122. &sign_skey_3));
  123. sign_skey_leg = pk_generate(4);
  124. dir_common_construct_vote_1(&vote, cert1, sign_skey_1,
  125. &dir_common_gen_routerstatus_for_v3ns,
  126. &v1, &n_vrs, now, 1);
  127. networkstatus_vote_free(vote);
  128. tt_assert(v1);
  129. tt_int_op(n_vrs, ==, 4);
  130. tt_int_op(smartlist_len(v1->routerstatus_list), ==, 4);
  131. dir_common_construct_vote_2(&vote, cert2, sign_skey_2,
  132. &dir_common_gen_routerstatus_for_v3ns,
  133. &v2, &n_vrs, now, 1);
  134. networkstatus_vote_free(vote);
  135. tt_assert(v2);
  136. tt_int_op(n_vrs, ==, 4);
  137. tt_int_op(smartlist_len(v2->routerstatus_list), ==, 4);
  138. dir_common_construct_vote_3(&vote, cert3, sign_skey_3,
  139. &dir_common_gen_routerstatus_for_v3ns,
  140. &v3, &n_vrs, now, 1);
  141. tt_assert(v3);
  142. tt_int_op(n_vrs, ==, 4);
  143. tt_int_op(smartlist_len(v3->routerstatus_list), ==, 4);
  144. networkstatus_vote_free(vote);
  145. votes = smartlist_new();
  146. smartlist_add(votes, v1);
  147. smartlist_add(votes, v2);
  148. smartlist_add(votes, v3);
  149. *consensus_text_md = networkstatus_compute_consensus(votes, 3,
  150. cert1->identity_key,
  151. sign_skey_1,
  152. "AAAAAAAAAAAAAAAAAAAA",
  153. sign_skey_leg,
  154. FLAV_MICRODESC);
  155. tt_assert(*consensus_text_md);
  156. done:
  157. tor_free(voter);
  158. networkstatus_vote_free(v1);
  159. networkstatus_vote_free(v2);
  160. networkstatus_vote_free(v3);
  161. smartlist_free(votes);
  162. authority_cert_free(cert1);
  163. authority_cert_free(cert2);
  164. authority_cert_free(cert3);
  165. crypto_pk_free(sign_skey_1);
  166. crypto_pk_free(sign_skey_2);
  167. crypto_pk_free(sign_skey_3);
  168. crypto_pk_free(sign_skey_leg);
  169. }
  170. static int mock_usable_consensus_flavor_value = FLAV_NS;
  171. static int
  172. mock_usable_consensus_flavor(void)
  173. {
  174. return mock_usable_consensus_flavor_value;
  175. }
  176. static void
  177. test_router_pick_directory_server_impl(void *arg)
  178. {
  179. (void)arg;
  180. networkstatus_t *con_md = NULL;
  181. char *consensus_text_md = NULL;
  182. int flags = PDS_IGNORE_FASCISTFIREWALL|PDS_RETRY_IF_NO_SERVERS;
  183. or_options_t *options = get_options_mutable();
  184. const routerstatus_t *rs = NULL;
  185. options->UseMicrodescriptors = 1;
  186. char *router1_id = NULL, *router2_id = NULL, *router3_id = NULL;
  187. node_t *node_router1 = NULL, *node_router2 = NULL, *node_router3 = NULL;
  188. config_line_t *policy_line = NULL;
  189. time_t now = time(NULL);
  190. int tmp_dirport1, tmp_dirport3;
  191. (void)arg;
  192. MOCK(usable_consensus_flavor, mock_usable_consensus_flavor);
  193. /* With no consensus, we must be bootstrapping, regardless of time or flavor
  194. */
  195. mock_usable_consensus_flavor_value = FLAV_NS;
  196. tt_assert(networkstatus_consensus_is_bootstrapping(now));
  197. tt_assert(networkstatus_consensus_is_bootstrapping(now + 2000));
  198. tt_assert(networkstatus_consensus_is_bootstrapping(now + 2*24*60*60));
  199. tt_assert(networkstatus_consensus_is_bootstrapping(now - 2*24*60*60));
  200. mock_usable_consensus_flavor_value = FLAV_MICRODESC;
  201. tt_assert(networkstatus_consensus_is_bootstrapping(now));
  202. tt_assert(networkstatus_consensus_is_bootstrapping(now + 2000));
  203. tt_assert(networkstatus_consensus_is_bootstrapping(now + 2*24*60*60));
  204. tt_assert(networkstatus_consensus_is_bootstrapping(now - 2*24*60*60));
  205. /* Init SR subsystem. */
  206. MOCK(get_my_v3_authority_cert, get_my_v3_authority_cert_m);
  207. mock_cert = authority_cert_parse_from_string(AUTHORITY_CERT_1, NULL);
  208. sr_init(0);
  209. UNMOCK(get_my_v3_authority_cert);
  210. /* No consensus available, fail early */
  211. rs = router_pick_directory_server_impl(V3_DIRINFO, (const int) 0, NULL);
  212. tt_assert(rs == NULL);
  213. construct_consensus(&consensus_text_md);
  214. tt_assert(consensus_text_md);
  215. con_md = networkstatus_parse_vote_from_string(consensus_text_md, NULL,
  216. NS_TYPE_CONSENSUS);
  217. tt_assert(con_md);
  218. tt_int_op(con_md->flavor,==, FLAV_MICRODESC);
  219. tt_assert(con_md->routerstatus_list);
  220. tt_int_op(smartlist_len(con_md->routerstatus_list), ==, 3);
  221. tt_assert(!networkstatus_set_current_consensus_from_ns(con_md,
  222. "microdesc"));
  223. /* If the consensus time or flavor doesn't match, we are still
  224. * bootstrapping */
  225. mock_usable_consensus_flavor_value = FLAV_NS;
  226. tt_assert(networkstatus_consensus_is_bootstrapping(now));
  227. tt_assert(networkstatus_consensus_is_bootstrapping(now + 2000));
  228. tt_assert(networkstatus_consensus_is_bootstrapping(now + 2*24*60*60));
  229. tt_assert(networkstatus_consensus_is_bootstrapping(now - 2*24*60*60));
  230. /* With a valid consensus for the current time and flavor, we stop
  231. * bootstrapping, even if we have no certificates */
  232. mock_usable_consensus_flavor_value = FLAV_MICRODESC;
  233. tt_assert(!networkstatus_consensus_is_bootstrapping(now + 2000));
  234. tt_assert(!networkstatus_consensus_is_bootstrapping(con_md->valid_after));
  235. tt_assert(!networkstatus_consensus_is_bootstrapping(con_md->valid_until));
  236. tt_assert(!networkstatus_consensus_is_bootstrapping(con_md->valid_until
  237. + 24*60*60));
  238. /* These times are outside the test validity period */
  239. tt_assert(networkstatus_consensus_is_bootstrapping(now));
  240. tt_assert(networkstatus_consensus_is_bootstrapping(now + 2*24*60*60));
  241. tt_assert(networkstatus_consensus_is_bootstrapping(now - 2*24*60*60));
  242. nodelist_set_consensus(con_md);
  243. nodelist_assert_ok();
  244. rs = router_pick_directory_server_impl(V3_DIRINFO, flags, NULL);
  245. /* We should not fail now we have a consensus and routerstatus_list
  246. * and nodelist are populated. */
  247. tt_assert(rs != NULL);
  248. /* Manipulate the nodes so we get the dir server we expect */
  249. router1_id = tor_malloc(DIGEST_LEN);
  250. memset(router1_id, TEST_DIR_ROUTER_ID_1, DIGEST_LEN);
  251. router2_id = tor_malloc(DIGEST_LEN);
  252. memset(router2_id, TEST_DIR_ROUTER_ID_2, DIGEST_LEN);
  253. router3_id = tor_malloc(DIGEST_LEN);
  254. memset(router3_id, TEST_DIR_ROUTER_ID_3, DIGEST_LEN);
  255. node_router1 = node_get_mutable_by_id(router1_id);
  256. node_router2 = node_get_mutable_by_id(router2_id);
  257. node_router3 = node_get_mutable_by_id(router3_id);
  258. node_router1->is_possible_guard = 1;
  259. node_router1->is_running = 0;
  260. node_router3->is_running = 0;
  261. rs = router_pick_directory_server_impl(V3_DIRINFO, flags, NULL);
  262. tt_assert(rs != NULL);
  263. tt_assert(tor_memeq(rs->identity_digest, router2_id, DIGEST_LEN));
  264. rs = NULL;
  265. node_router1->is_running = 1;
  266. node_router3->is_running = 1;
  267. node_router1->rs->is_v2_dir = 0;
  268. node_router3->rs->is_v2_dir = 0;
  269. tmp_dirport1 = node_router1->rs->dir_port;
  270. tmp_dirport3 = node_router3->rs->dir_port;
  271. node_router1->rs->dir_port = 0;
  272. node_router3->rs->dir_port = 0;
  273. rs = router_pick_directory_server_impl(V3_DIRINFO, flags, NULL);
  274. tt_assert(rs != NULL);
  275. tt_assert(tor_memeq(rs->identity_digest, router2_id, DIGEST_LEN));
  276. rs = NULL;
  277. node_router1->rs->is_v2_dir = 1;
  278. node_router3->rs->is_v2_dir = 1;
  279. node_router1->rs->dir_port = tmp_dirport1;
  280. node_router3->rs->dir_port = tmp_dirport3;
  281. node_router1->is_valid = 0;
  282. node_router3->is_valid = 0;
  283. rs = router_pick_directory_server_impl(V3_DIRINFO, flags, NULL);
  284. tt_assert(rs != NULL);
  285. tt_assert(tor_memeq(rs->identity_digest, router2_id, DIGEST_LEN));
  286. rs = NULL;
  287. node_router1->is_valid = 1;
  288. node_router3->is_valid = 1;
  289. flags |= PDS_FOR_GUARD;
  290. node_router1->using_as_guard = 1;
  291. node_router2->using_as_guard = 1;
  292. node_router3->using_as_guard = 1;
  293. rs = router_pick_directory_server_impl(V3_DIRINFO, flags, NULL);
  294. tt_assert(rs == NULL);
  295. node_router1->using_as_guard = 0;
  296. rs = router_pick_directory_server_impl(V3_DIRINFO, flags, NULL);
  297. tt_assert(rs != NULL);
  298. tt_assert(tor_memeq(rs->identity_digest, router1_id, DIGEST_LEN));
  299. rs = NULL;
  300. node_router2->using_as_guard = 0;
  301. node_router3->using_as_guard = 0;
  302. /* One not valid, one guard. This should leave one remaining */
  303. node_router1->is_valid = 0;
  304. node_router2->using_as_guard = 1;
  305. rs = router_pick_directory_server_impl(V3_DIRINFO, flags, NULL);
  306. tt_assert(rs != NULL);
  307. tt_assert(tor_memeq(rs->identity_digest, router3_id, DIGEST_LEN));
  308. rs = NULL;
  309. node_router1->is_valid = 1;
  310. node_router2->using_as_guard = 0;
  311. /* Manipulate overloaded */
  312. node_router2->rs->last_dir_503_at = now;
  313. node_router3->rs->last_dir_503_at = now;
  314. rs = router_pick_directory_server_impl(V3_DIRINFO, flags, NULL);
  315. tt_assert(rs != NULL);
  316. tt_assert(tor_memeq(rs->identity_digest, router1_id, DIGEST_LEN));
  317. node_router2->rs->last_dir_503_at = 0;
  318. node_router3->rs->last_dir_503_at = 0;
  319. /* Set a Fascist firewall */
  320. flags &= ~ PDS_IGNORE_FASCISTFIREWALL;
  321. policy_line = tor_malloc_zero(sizeof(config_line_t));
  322. policy_line->key = tor_strdup("ReachableORAddresses");
  323. policy_line->value = tor_strdup("accept *:442, reject *:*");
  324. options->ReachableORAddresses = policy_line;
  325. policies_parse_from_options(options);
  326. node_router1->rs->or_port = 444;
  327. node_router2->rs->or_port = 443;
  328. node_router3->rs->or_port = 442;
  329. rs = router_pick_directory_server_impl(V3_DIRINFO, flags, NULL);
  330. tt_assert(rs != NULL);
  331. tt_assert(tor_memeq(rs->identity_digest, router3_id, DIGEST_LEN));
  332. node_router1->rs->or_port = 442;
  333. node_router2->rs->or_port = 443;
  334. node_router3->rs->or_port = 444;
  335. rs = router_pick_directory_server_impl(V3_DIRINFO, flags, NULL);
  336. tt_assert(rs != NULL);
  337. tt_assert(tor_memeq(rs->identity_digest, router1_id, DIGEST_LEN));
  338. /* Fascist firewall and overloaded */
  339. node_router1->rs->or_port = 442;
  340. node_router2->rs->or_port = 443;
  341. node_router3->rs->or_port = 442;
  342. node_router3->rs->last_dir_503_at = now;
  343. rs = router_pick_directory_server_impl(V3_DIRINFO, flags, NULL);
  344. tt_assert(rs != NULL);
  345. tt_assert(tor_memeq(rs->identity_digest, router1_id, DIGEST_LEN));
  346. node_router3->rs->last_dir_503_at = 0;
  347. /* Fascists against OR and Dir */
  348. policy_line = tor_malloc_zero(sizeof(config_line_t));
  349. policy_line->key = tor_strdup("ReachableAddresses");
  350. policy_line->value = tor_strdup("accept *:80, reject *:*");
  351. options->ReachableDirAddresses = policy_line;
  352. policies_parse_from_options(options);
  353. node_router1->rs->or_port = 442;
  354. node_router2->rs->or_port = 441;
  355. node_router3->rs->or_port = 443;
  356. node_router1->rs->dir_port = 80;
  357. node_router2->rs->dir_port = 80;
  358. node_router3->rs->dir_port = 81;
  359. node_router1->rs->last_dir_503_at = now;
  360. rs = router_pick_directory_server_impl(V3_DIRINFO, flags, NULL);
  361. tt_assert(rs != NULL);
  362. tt_assert(tor_memeq(rs->identity_digest, router1_id, DIGEST_LEN));
  363. node_router1->rs->last_dir_503_at = 0;
  364. done:
  365. UNMOCK(usable_consensus_flavor);
  366. if (router1_id)
  367. tor_free(router1_id);
  368. if (router2_id)
  369. tor_free(router2_id);
  370. if (router3_id)
  371. tor_free(router3_id);
  372. if (options->ReachableORAddresses ||
  373. options->ReachableDirAddresses)
  374. policies_free_all();
  375. tor_free(consensus_text_md);
  376. networkstatus_vote_free(con_md);
  377. }
  378. static connection_t *mocked_connection = NULL;
  379. /* Mock connection_get_by_type_addr_port_purpose by returning
  380. * mocked_connection. */
  381. static connection_t *
  382. mock_connection_get_by_type_addr_port_purpose(int type,
  383. const tor_addr_t *addr,
  384. uint16_t port, int purpose)
  385. {
  386. (void)type;
  387. (void)addr;
  388. (void)port;
  389. (void)purpose;
  390. return mocked_connection;
  391. }
  392. #define TEST_ADDR_STR "127.0.0.1"
  393. #define TEST_DIR_PORT 12345
  394. static void
  395. test_routerlist_router_is_already_dir_fetching(void *arg)
  396. {
  397. (void)arg;
  398. tor_addr_port_t test_ap, null_addr_ap, zero_port_ap;
  399. /* Setup */
  400. tor_addr_parse(&test_ap.addr, TEST_ADDR_STR);
  401. test_ap.port = TEST_DIR_PORT;
  402. tor_addr_make_null(&null_addr_ap.addr, AF_INET6);
  403. null_addr_ap.port = TEST_DIR_PORT;
  404. tor_addr_parse(&zero_port_ap.addr, TEST_ADDR_STR);
  405. zero_port_ap.port = 0;
  406. MOCK(connection_get_by_type_addr_port_purpose,
  407. mock_connection_get_by_type_addr_port_purpose);
  408. /* Test that we never get 1 from a NULL connection */
  409. mocked_connection = NULL;
  410. tt_assert(router_is_already_dir_fetching(&test_ap, 1, 1) == 0);
  411. tt_assert(router_is_already_dir_fetching(&test_ap, 1, 0) == 0);
  412. tt_assert(router_is_already_dir_fetching(&test_ap, 0, 1) == 0);
  413. /* We always expect 0 in these cases */
  414. tt_assert(router_is_already_dir_fetching(&test_ap, 0, 0) == 0);
  415. tt_assert(router_is_already_dir_fetching(NULL, 1, 1) == 0);
  416. tt_assert(router_is_already_dir_fetching(&null_addr_ap, 1, 1) == 0);
  417. tt_assert(router_is_already_dir_fetching(&zero_port_ap, 1, 1) == 0);
  418. /* Test that we get 1 with a connection in the appropriate circumstances */
  419. mocked_connection = connection_new(CONN_TYPE_DIR, AF_INET);
  420. tt_assert(router_is_already_dir_fetching(&test_ap, 1, 1) == 1);
  421. tt_assert(router_is_already_dir_fetching(&test_ap, 1, 0) == 1);
  422. tt_assert(router_is_already_dir_fetching(&test_ap, 0, 1) == 1);
  423. /* Test that we get 0 even with a connection in the appropriate
  424. * circumstances */
  425. tt_assert(router_is_already_dir_fetching(&test_ap, 0, 0) == 0);
  426. tt_assert(router_is_already_dir_fetching(NULL, 1, 1) == 0);
  427. tt_assert(router_is_already_dir_fetching(&null_addr_ap, 1, 1) == 0);
  428. tt_assert(router_is_already_dir_fetching(&zero_port_ap, 1, 1) == 0);
  429. done:
  430. /* If a connection is never set up, connection_free chokes on it. */
  431. if (mocked_connection) {
  432. buf_free(mocked_connection->inbuf);
  433. buf_free(mocked_connection->outbuf);
  434. }
  435. tor_free(mocked_connection);
  436. UNMOCK(connection_get_by_type_addr_port_purpose);
  437. }
  438. #undef TEST_ADDR_STR
  439. #undef TEST_DIR_PORT
  440. #define NODE(name, flags) \
  441. { #name, test_routerlist_##name, (flags), NULL, NULL }
  442. #define ROUTER(name,flags) \
  443. { #name, test_router_##name, (flags), NULL, NULL }
  444. struct testcase_t routerlist_tests[] = {
  445. NODE(initiate_descriptor_downloads, 0),
  446. NODE(launch_descriptor_downloads, 0),
  447. NODE(router_is_already_dir_fetching, TT_FORK),
  448. ROUTER(pick_directory_server_impl, TT_FORK),
  449. END_OF_TESTCASES
  450. };