test_circuitlist.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. /* Copyright (c) 2013-2018, The Tor Project, Inc. */
  2. /* See LICENSE for licensing information */
  3. #define TOR_CHANNEL_INTERNAL_
  4. #define CIRCUITBUILD_PRIVATE
  5. #define CIRCUITLIST_PRIVATE
  6. #define HS_CIRCUITMAP_PRIVATE
  7. #include "or/or.h"
  8. #include "or/channel.h"
  9. #include "or/circuitbuild.h"
  10. #include "or/circuitlist.h"
  11. #include "or/circuitmux_ewma.h"
  12. #include "or/hs_circuitmap.h"
  13. #include "test/test.h"
  14. #include "test/log_test_helpers.h"
  15. #include "or/or_circuit_st.h"
  16. #include "or/origin_circuit_st.h"
  17. static channel_t *
  18. new_fake_channel(void)
  19. {
  20. channel_t *chan = tor_malloc_zero(sizeof(channel_t));
  21. channel_init(chan);
  22. return chan;
  23. }
  24. static struct {
  25. int ncalls;
  26. void *cmux;
  27. void *circ;
  28. cell_direction_t dir;
  29. } cam;
  30. static void
  31. circuitmux_attach_mock(circuitmux_t *cmux, circuit_t *circ,
  32. cell_direction_t dir)
  33. {
  34. ++cam.ncalls;
  35. cam.cmux = cmux;
  36. cam.circ = circ;
  37. cam.dir = dir;
  38. }
  39. static struct {
  40. int ncalls;
  41. void *cmux;
  42. void *circ;
  43. } cdm;
  44. static void
  45. circuitmux_detach_mock(circuitmux_t *cmux, circuit_t *circ)
  46. {
  47. ++cdm.ncalls;
  48. cdm.cmux = cmux;
  49. cdm.circ = circ;
  50. }
  51. #define GOT_CMUX_ATTACH(mux_, circ_, dir_) do { \
  52. tt_int_op(cam.ncalls, OP_EQ, 1); \
  53. tt_ptr_op(cam.cmux, OP_EQ, (mux_)); \
  54. tt_ptr_op(cam.circ, OP_EQ, (circ_)); \
  55. tt_int_op(cam.dir, OP_EQ, (dir_)); \
  56. memset(&cam, 0, sizeof(cam)); \
  57. } while (0)
  58. #define GOT_CMUX_DETACH(mux_, circ_) do { \
  59. tt_int_op(cdm.ncalls, OP_EQ, 1); \
  60. tt_ptr_op(cdm.cmux, OP_EQ, (mux_)); \
  61. tt_ptr_op(cdm.circ, OP_EQ, (circ_)); \
  62. memset(&cdm, 0, sizeof(cdm)); \
  63. } while (0)
  64. static void
  65. test_clist_maps(void *arg)
  66. {
  67. channel_t *ch1 = new_fake_channel();
  68. channel_t *ch2 = new_fake_channel();
  69. channel_t *ch3 = new_fake_channel();
  70. or_circuit_t *or_c1=NULL, *or_c2=NULL;
  71. (void) arg;
  72. MOCK(circuitmux_attach_circuit, circuitmux_attach_mock);
  73. MOCK(circuitmux_detach_circuit, circuitmux_detach_mock);
  74. memset(&cam, 0, sizeof(cam));
  75. memset(&cdm, 0, sizeof(cdm));
  76. tt_assert(ch1);
  77. tt_assert(ch2);
  78. tt_assert(ch3);
  79. ch1->cmux = tor_malloc(1);
  80. ch2->cmux = tor_malloc(1);
  81. ch3->cmux = tor_malloc(1);
  82. or_c1 = or_circuit_new(100, ch2);
  83. tt_assert(or_c1);
  84. GOT_CMUX_ATTACH(ch2->cmux, or_c1, CELL_DIRECTION_IN);
  85. tt_int_op(or_c1->p_circ_id, OP_EQ, 100);
  86. tt_ptr_op(or_c1->p_chan, OP_EQ, ch2);
  87. or_c2 = or_circuit_new(100, ch1);
  88. tt_assert(or_c2);
  89. GOT_CMUX_ATTACH(ch1->cmux, or_c2, CELL_DIRECTION_IN);
  90. tt_int_op(or_c2->p_circ_id, OP_EQ, 100);
  91. tt_ptr_op(or_c2->p_chan, OP_EQ, ch1);
  92. circuit_set_n_circid_chan(TO_CIRCUIT(or_c1), 200, ch1);
  93. GOT_CMUX_ATTACH(ch1->cmux, or_c1, CELL_DIRECTION_OUT);
  94. circuit_set_n_circid_chan(TO_CIRCUIT(or_c2), 200, ch2);
  95. GOT_CMUX_ATTACH(ch2->cmux, or_c2, CELL_DIRECTION_OUT);
  96. tt_ptr_op(circuit_get_by_circid_channel(200, ch1), OP_EQ, TO_CIRCUIT(or_c1));
  97. tt_ptr_op(circuit_get_by_circid_channel(200, ch2), OP_EQ, TO_CIRCUIT(or_c2));
  98. tt_ptr_op(circuit_get_by_circid_channel(100, ch2), OP_EQ, TO_CIRCUIT(or_c1));
  99. /* Try the same thing again, to test the "fast" path. */
  100. tt_ptr_op(circuit_get_by_circid_channel(100, ch2), OP_EQ, TO_CIRCUIT(or_c1));
  101. tt_assert(circuit_id_in_use_on_channel(100, ch2));
  102. tt_assert(! circuit_id_in_use_on_channel(101, ch2));
  103. /* Try changing the circuitid and channel of that circuit. */
  104. circuit_set_p_circid_chan(or_c1, 500, ch3);
  105. GOT_CMUX_DETACH(ch2->cmux, TO_CIRCUIT(or_c1));
  106. GOT_CMUX_ATTACH(ch3->cmux, TO_CIRCUIT(or_c1), CELL_DIRECTION_IN);
  107. tt_ptr_op(circuit_get_by_circid_channel(100, ch2), OP_EQ, NULL);
  108. tt_assert(! circuit_id_in_use_on_channel(100, ch2));
  109. tt_ptr_op(circuit_get_by_circid_channel(500, ch3), OP_EQ, TO_CIRCUIT(or_c1));
  110. /* Now let's see about destroy handling. */
  111. tt_assert(! circuit_id_in_use_on_channel(205, ch2));
  112. tt_assert(circuit_id_in_use_on_channel(200, ch2));
  113. channel_note_destroy_pending(ch2, 200);
  114. channel_note_destroy_pending(ch2, 205);
  115. channel_note_destroy_pending(ch1, 100);
  116. tt_assert(circuit_id_in_use_on_channel(205, ch2))
  117. tt_assert(circuit_id_in_use_on_channel(200, ch2));
  118. tt_assert(circuit_id_in_use_on_channel(100, ch1));
  119. tt_assert(TO_CIRCUIT(or_c2)->n_delete_pending != 0);
  120. tt_ptr_op(circuit_get_by_circid_channel(200, ch2), OP_EQ, TO_CIRCUIT(or_c2));
  121. tt_ptr_op(circuit_get_by_circid_channel(100, ch1), OP_EQ, TO_CIRCUIT(or_c2));
  122. /* Okay, now free ch2 and make sure that the circuit ID is STILL not
  123. * usable, because we haven't declared the destroy to be nonpending */
  124. tt_int_op(cdm.ncalls, OP_EQ, 0);
  125. circuit_free_(TO_CIRCUIT(or_c2));
  126. or_c2 = NULL; /* prevent free */
  127. tt_int_op(cdm.ncalls, OP_EQ, 2);
  128. memset(&cdm, 0, sizeof(cdm));
  129. tt_assert(circuit_id_in_use_on_channel(200, ch2));
  130. tt_assert(circuit_id_in_use_on_channel(100, ch1));
  131. tt_ptr_op(circuit_get_by_circid_channel(200, ch2), OP_EQ, NULL);
  132. tt_ptr_op(circuit_get_by_circid_channel(100, ch1), OP_EQ, NULL);
  133. /* Now say that the destroy is nonpending */
  134. channel_note_destroy_not_pending(ch2, 200);
  135. tt_ptr_op(circuit_get_by_circid_channel(200, ch2), OP_EQ, NULL);
  136. channel_note_destroy_not_pending(ch1, 100);
  137. tt_ptr_op(circuit_get_by_circid_channel(100, ch1), OP_EQ, NULL);
  138. tt_assert(! circuit_id_in_use_on_channel(200, ch2));
  139. tt_assert(! circuit_id_in_use_on_channel(100, ch1));
  140. done:
  141. if (or_c1)
  142. circuit_free_(TO_CIRCUIT(or_c1));
  143. if (or_c2)
  144. circuit_free_(TO_CIRCUIT(or_c2));
  145. if (ch1)
  146. tor_free(ch1->cmux);
  147. if (ch2)
  148. tor_free(ch2->cmux);
  149. if (ch3)
  150. tor_free(ch3->cmux);
  151. tor_free(ch1);
  152. tor_free(ch2);
  153. tor_free(ch3);
  154. UNMOCK(circuitmux_attach_circuit);
  155. UNMOCK(circuitmux_detach_circuit);
  156. }
  157. static void
  158. test_rend_token_maps(void *arg)
  159. {
  160. or_circuit_t *c1, *c2, *c3, *c4;
  161. origin_circuit_t *c5;
  162. const uint8_t tok1[REND_TOKEN_LEN] = "The cat can't tell y";
  163. const uint8_t tok2[REND_TOKEN_LEN] = "ou its name, and it ";
  164. const uint8_t tok3[REND_TOKEN_LEN] = "doesn't really care.";
  165. /* -- Adapted from a quote by Fredrik Lundh. */
  166. (void)arg;
  167. (void)tok1; //xxxx
  168. hs_circuitmap_init();
  169. c1 = or_circuit_new(0, NULL);
  170. c2 = or_circuit_new(0, NULL);
  171. c3 = or_circuit_new(0, NULL);
  172. c4 = or_circuit_new(0, NULL);
  173. c5 = origin_circuit_new();
  174. /* Make sure we really filled up the tok* variables */
  175. tt_int_op(tok1[REND_TOKEN_LEN-1], OP_EQ, 'y');
  176. tt_int_op(tok2[REND_TOKEN_LEN-1], OP_EQ, ' ');
  177. tt_int_op(tok3[REND_TOKEN_LEN-1], OP_EQ, '.');
  178. /* No maps; nothing there. */
  179. tt_ptr_op(NULL, OP_EQ, hs_circuitmap_get_rend_circ_relay_side(tok1));
  180. tt_ptr_op(NULL, OP_EQ, hs_circuitmap_get_intro_circ_v2_relay_side(tok1));
  181. hs_circuitmap_register_rend_circ_relay_side(c1, tok1);
  182. hs_circuitmap_register_intro_circ_v2_relay_side(c2, tok2);
  183. tt_ptr_op(NULL, OP_EQ, hs_circuitmap_get_rend_circ_relay_side(tok3));
  184. tt_ptr_op(NULL, OP_EQ, hs_circuitmap_get_intro_circ_v2_relay_side(tok3));
  185. tt_ptr_op(NULL, OP_EQ, hs_circuitmap_get_rend_circ_relay_side(tok2));
  186. tt_ptr_op(NULL, OP_EQ, hs_circuitmap_get_intro_circ_v2_relay_side(tok1));
  187. /* Without purpose set, we don't get the circuits */
  188. tt_ptr_op(NULL, OP_EQ, hs_circuitmap_get_rend_circ_relay_side(tok1));
  189. tt_ptr_op(NULL, OP_EQ, hs_circuitmap_get_intro_circ_v2_relay_side(tok2));
  190. c1->base_.purpose = CIRCUIT_PURPOSE_REND_POINT_WAITING;
  191. c2->base_.purpose = CIRCUIT_PURPOSE_INTRO_POINT;
  192. /* Okay, make sure they show up now. */
  193. tt_ptr_op(c1, OP_EQ, hs_circuitmap_get_rend_circ_relay_side(tok1));
  194. tt_ptr_op(c2, OP_EQ, hs_circuitmap_get_intro_circ_v2_relay_side(tok2));
  195. /* Two items at the same place with the same token. */
  196. c3->base_.purpose = CIRCUIT_PURPOSE_REND_POINT_WAITING;
  197. hs_circuitmap_register_rend_circ_relay_side(c3, tok2);
  198. tt_ptr_op(c2, OP_EQ, hs_circuitmap_get_intro_circ_v2_relay_side(tok2));
  199. tt_ptr_op(c3, OP_EQ, hs_circuitmap_get_rend_circ_relay_side(tok2));
  200. /* Marking a circuit makes it not get returned any more */
  201. circuit_mark_for_close(TO_CIRCUIT(c1), END_CIRC_REASON_FINISHED);
  202. tt_ptr_op(NULL, OP_EQ, hs_circuitmap_get_rend_circ_relay_side(tok1));
  203. circuit_free_(TO_CIRCUIT(c1));
  204. c1 = NULL;
  205. /* Freeing a circuit makes it not get returned any more. */
  206. circuit_free_(TO_CIRCUIT(c2));
  207. c2 = NULL;
  208. tt_ptr_op(NULL, OP_EQ, hs_circuitmap_get_intro_circ_v2_relay_side(tok2));
  209. /* c3 -- are you still there? */
  210. tt_ptr_op(c3, OP_EQ, hs_circuitmap_get_rend_circ_relay_side(tok2));
  211. /* Change its cookie. This never happens in Tor per se, but hey. */
  212. c3->base_.purpose = CIRCUIT_PURPOSE_INTRO_POINT;
  213. hs_circuitmap_register_intro_circ_v2_relay_side(c3, tok3);
  214. tt_ptr_op(NULL, OP_EQ, hs_circuitmap_get_rend_circ_relay_side(tok2));
  215. tt_ptr_op(c3, OP_EQ, hs_circuitmap_get_intro_circ_v2_relay_side(tok3));
  216. /* Now replace c3 with c4. */
  217. c4->base_.purpose = CIRCUIT_PURPOSE_INTRO_POINT;
  218. hs_circuitmap_register_intro_circ_v2_relay_side(c4, tok3);
  219. tt_ptr_op(c4, OP_EQ, hs_circuitmap_get_intro_circ_v2_relay_side(tok3));
  220. tt_ptr_op(TO_CIRCUIT(c3)->hs_token, OP_EQ, NULL);
  221. tt_ptr_op(TO_CIRCUIT(c4)->hs_token, OP_NE, NULL);
  222. tt_mem_op(TO_CIRCUIT(c4)->hs_token->token, OP_EQ, tok3, REND_TOKEN_LEN);
  223. /* Now clear c4's cookie. */
  224. hs_circuitmap_remove_circuit(TO_CIRCUIT(c4));
  225. tt_ptr_op(TO_CIRCUIT(c4)->hs_token, OP_EQ, NULL);
  226. tt_ptr_op(NULL, OP_EQ, hs_circuitmap_get_intro_circ_v2_relay_side(tok3));
  227. /* Now let's do a check for the client-side rend circuitmap */
  228. c5->base_.purpose = CIRCUIT_PURPOSE_C_ESTABLISH_REND;
  229. hs_circuitmap_register_rend_circ_client_side(c5, tok1);
  230. tt_ptr_op(c5, OP_EQ, hs_circuitmap_get_rend_circ_client_side(tok1));
  231. tt_ptr_op(NULL, OP_EQ, hs_circuitmap_get_rend_circ_client_side(tok2));
  232. done:
  233. if (c1)
  234. circuit_free_(TO_CIRCUIT(c1));
  235. if (c2)
  236. circuit_free_(TO_CIRCUIT(c2));
  237. if (c3)
  238. circuit_free_(TO_CIRCUIT(c3));
  239. if (c4)
  240. circuit_free_(TO_CIRCUIT(c4));
  241. if (c5)
  242. circuit_free_(TO_CIRCUIT(c5));
  243. }
  244. static void
  245. mock_channel_dump_statistics(channel_t *chan, int severity)
  246. {
  247. (void)chan;
  248. (void)severity;
  249. }
  250. static void
  251. test_pick_circid(void *arg)
  252. {
  253. bitarray_t *ba = NULL;
  254. channel_t *chan1, *chan2;
  255. circid_t circid;
  256. int i;
  257. (void) arg;
  258. MOCK(channel_dump_statistics, mock_channel_dump_statistics);
  259. chan1 = tor_malloc_zero(sizeof(channel_t));
  260. chan2 = tor_malloc_zero(sizeof(channel_t));
  261. chan2->wide_circ_ids = 1;
  262. chan1->cmux = circuitmux_alloc();
  263. chan2->cmux = circuitmux_alloc();
  264. /* CIRC_ID_TYPE_NEITHER is supposed to create a warning. */
  265. chan1->circ_id_type = CIRC_ID_TYPE_NEITHER;
  266. setup_full_capture_of_logs(LOG_WARN);
  267. tt_int_op(0, OP_EQ, get_unique_circ_id_by_chan(chan1));
  268. expect_single_log_msg_containing("Trying to pick a circuit ID for a "
  269. "connection from a client with no identity.");
  270. teardown_capture_of_logs();
  271. /* Basic tests, with no collisions */
  272. chan1->circ_id_type = CIRC_ID_TYPE_LOWER;
  273. for (i = 0; i < 50; ++i) {
  274. circid = get_unique_circ_id_by_chan(chan1);
  275. tt_uint_op(0, OP_LT, circid);
  276. tt_uint_op(circid, OP_LT, (1<<15));
  277. }
  278. chan1->circ_id_type = CIRC_ID_TYPE_HIGHER;
  279. for (i = 0; i < 50; ++i) {
  280. circid = get_unique_circ_id_by_chan(chan1);
  281. tt_uint_op((1<<15), OP_LT, circid);
  282. tt_uint_op(circid, OP_LT, (1<<16));
  283. }
  284. chan2->circ_id_type = CIRC_ID_TYPE_LOWER;
  285. for (i = 0; i < 50; ++i) {
  286. circid = get_unique_circ_id_by_chan(chan2);
  287. tt_uint_op(0, OP_LT, circid);
  288. tt_uint_op(circid, OP_LT, (1u<<31));
  289. }
  290. chan2->circ_id_type = CIRC_ID_TYPE_HIGHER;
  291. for (i = 0; i < 50; ++i) {
  292. circid = get_unique_circ_id_by_chan(chan2);
  293. tt_uint_op((1u<<31), OP_LT, circid);
  294. }
  295. /* Now make sure that we can behave well when we are full up on circuits */
  296. chan1->circ_id_type = CIRC_ID_TYPE_LOWER;
  297. chan2->circ_id_type = CIRC_ID_TYPE_LOWER;
  298. chan1->wide_circ_ids = chan2->wide_circ_ids = 0;
  299. ba = bitarray_init_zero((1<<15));
  300. for (i = 0; i < (1<<15); ++i) {
  301. circid = get_unique_circ_id_by_chan(chan1);
  302. if (circid == 0) {
  303. tt_int_op(i, OP_GT, (1<<14));
  304. break;
  305. }
  306. tt_uint_op(circid, OP_LT, (1<<15));
  307. tt_assert(! bitarray_is_set(ba, circid));
  308. bitarray_set(ba, circid);
  309. channel_mark_circid_unusable(chan1, circid);
  310. }
  311. tt_int_op(i, OP_LT, (1<<15));
  312. /* Make sure that being full on chan1 does not interfere with chan2 */
  313. for (i = 0; i < 100; ++i) {
  314. circid = get_unique_circ_id_by_chan(chan2);
  315. tt_uint_op(circid, OP_GT, 0);
  316. tt_uint_op(circid, OP_LT, (1<<15));
  317. channel_mark_circid_unusable(chan2, circid);
  318. }
  319. done:
  320. circuitmux_free(chan1->cmux);
  321. circuitmux_free(chan2->cmux);
  322. tor_free(chan1);
  323. tor_free(chan2);
  324. bitarray_free(ba);
  325. circuit_free_all();
  326. teardown_capture_of_logs();
  327. UNMOCK(channel_dump_statistics);
  328. }
  329. /** Test that the circuit pools of our HS circuitmap are isolated based on
  330. * their token type. */
  331. static void
  332. test_hs_circuitmap_isolation(void *arg)
  333. {
  334. or_circuit_t *circ1 = NULL;
  335. origin_circuit_t *circ2 = NULL;
  336. or_circuit_t *circ3 = NULL;
  337. origin_circuit_t *circ4 = NULL;
  338. (void)arg;
  339. hs_circuitmap_init();
  340. {
  341. const uint8_t tok1[REND_TOKEN_LEN] = "bet i got some of th";
  342. circ1 = or_circuit_new(0, NULL);
  343. tt_assert(circ1);
  344. circ1->base_.purpose = CIRCUIT_PURPOSE_REND_POINT_WAITING;
  345. /* check that circuitmap is empty right? */
  346. tt_ptr_op(NULL, OP_EQ, hs_circuitmap_get_rend_circ_relay_side(tok1));
  347. /* Register circ1 with tok1 as relay-side rend circ */
  348. hs_circuitmap_register_rend_circ_relay_side(circ1, tok1);
  349. /* check that service-side getters don't work */
  350. tt_ptr_op(NULL, OP_EQ, hs_circuitmap_get_rend_circ_service_side(tok1));
  351. tt_ptr_op(NULL, OP_EQ, hs_circuitmap_get_intro_circ_v2_service_side(tok1));
  352. /* Check that the right getter works. */
  353. tt_ptr_op(circ1, OP_EQ, hs_circuitmap_get_rend_circ_relay_side(tok1));
  354. }
  355. {
  356. const uint8_t tok2[REND_TOKEN_LEN] = "you dont know anythi";
  357. circ2 = origin_circuit_new();
  358. tt_assert(circ2);
  359. circ2->base_.purpose = CIRCUIT_PURPOSE_S_ESTABLISH_INTRO;
  360. circ3 = or_circuit_new(0, NULL);
  361. tt_assert(circ3);
  362. circ3->base_.purpose = CIRCUIT_PURPOSE_INTRO_POINT;
  363. circ4 = origin_circuit_new();
  364. tt_assert(circ4);
  365. circ4->base_.purpose = CIRCUIT_PURPOSE_S_ESTABLISH_INTRO;
  366. /* Register circ2 with tok2 as service-side intro v2 circ */
  367. hs_circuitmap_register_intro_circ_v2_service_side(circ2, tok2);
  368. /* Register circ3 with tok2 again but for different purpose */
  369. hs_circuitmap_register_intro_circ_v2_relay_side(circ3, tok2);
  370. /* Check that the getters work */
  371. tt_ptr_op(circ2, OP_EQ,
  372. hs_circuitmap_get_intro_circ_v2_service_side(tok2));
  373. tt_ptr_op(circ3, OP_EQ, hs_circuitmap_get_intro_circ_v2_relay_side(tok2));
  374. /* Register circ4 with tok2: it should override circ2 */
  375. hs_circuitmap_register_intro_circ_v2_service_side(circ4, tok2);
  376. /* check that relay-side getters don't work */
  377. tt_ptr_op(NULL, OP_EQ, hs_circuitmap_get_rend_circ_relay_side(tok2));
  378. /* Check that the getter returns circ4; the last circuit registered with
  379. * that token. */
  380. tt_ptr_op(circ4, OP_EQ,
  381. hs_circuitmap_get_intro_circ_v2_service_side(tok2));
  382. }
  383. done:
  384. circuit_free_(TO_CIRCUIT(circ1));
  385. circuit_free_(TO_CIRCUIT(circ2));
  386. circuit_free_(TO_CIRCUIT(circ3));
  387. circuit_free_(TO_CIRCUIT(circ4));
  388. }
  389. struct testcase_t circuitlist_tests[] = {
  390. { "maps", test_clist_maps, TT_FORK, NULL, NULL },
  391. { "rend_token_maps", test_rend_token_maps, TT_FORK, NULL, NULL },
  392. { "pick_circid", test_pick_circid, TT_FORK, NULL, NULL },
  393. { "hs_circuitmap_isolation", test_hs_circuitmap_isolation,
  394. TT_FORK, NULL, NULL },
  395. END_OF_TESTCASES
  396. };