test_pt.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548
  1. /* Copyright (c) 2001-2004, Roger Dingledine.
  2. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  3. * Copyright (c) 2007-2018, The Tor Project, Inc. */
  4. /* See LICENSE for licensing information */
  5. #include "orconfig.h"
  6. #define PT_PRIVATE
  7. #define UTIL_PRIVATE
  8. #define STATEFILE_PRIVATE
  9. #define CONTROL_PRIVATE
  10. #define SUBPROCESS_PRIVATE
  11. #include "or/or.h"
  12. #include "or/config.h"
  13. #include "or/confparse.h"
  14. #include "or/control.h"
  15. #include "or/transports.h"
  16. #include "or/circuitbuild.h"
  17. #include "common/util.h"
  18. #include "or/statefile.h"
  19. #include "test/test.h"
  20. #include "lib/process/subprocess.h"
  21. static void
  22. reset_mp(managed_proxy_t *mp)
  23. {
  24. mp->conf_state = PT_PROTO_LAUNCHED;
  25. SMARTLIST_FOREACH(mp->transports, transport_t *, t, transport_free(t));
  26. smartlist_clear(mp->transports);
  27. }
  28. static void
  29. test_pt_parsing(void *arg)
  30. {
  31. char line[200];
  32. transport_t *transport = NULL;
  33. tor_addr_t test_addr;
  34. managed_proxy_t *mp = tor_malloc_zero(sizeof(managed_proxy_t));
  35. (void)arg;
  36. mp->conf_state = PT_PROTO_INFANT;
  37. mp->transports = smartlist_new();
  38. /* incomplete cmethod */
  39. strlcpy(line,"CMETHOD trebuchet",sizeof(line));
  40. tt_int_op(parse_cmethod_line(line, mp), OP_LT, 0);
  41. reset_mp(mp);
  42. /* wrong proxy type */
  43. strlcpy(line,"CMETHOD trebuchet dog 127.0.0.1:1999",sizeof(line));
  44. tt_int_op(parse_cmethod_line(line, mp), OP_LT, 0);
  45. reset_mp(mp);
  46. /* wrong addrport */
  47. strlcpy(line,"CMETHOD trebuchet socks4 abcd",sizeof(line));
  48. tt_int_op(parse_cmethod_line(line, mp), OP_LT, 0);
  49. reset_mp(mp);
  50. /* correct line */
  51. strlcpy(line,"CMETHOD trebuchet socks5 127.0.0.1:1999",sizeof(line));
  52. tt_int_op(parse_cmethod_line(line, mp), OP_EQ, 0);
  53. tt_int_op(smartlist_len(mp->transports), OP_EQ, 1);
  54. transport = smartlist_get(mp->transports, 0);
  55. /* test registered address of transport */
  56. tor_addr_parse(&test_addr, "127.0.0.1");
  57. tt_assert(tor_addr_eq(&test_addr, &transport->addr));
  58. /* test registered port of transport */
  59. tt_uint_op(transport->port, OP_EQ, 1999);
  60. /* test registered SOCKS version of transport */
  61. tt_int_op(transport->socks_version, OP_EQ, PROXY_SOCKS5);
  62. /* test registered name of transport */
  63. tt_str_op(transport->name,OP_EQ, "trebuchet");
  64. reset_mp(mp);
  65. /* incomplete smethod */
  66. strlcpy(line,"SMETHOD trebuchet",sizeof(line));
  67. tt_int_op(parse_smethod_line(line, mp), OP_LT, 0);
  68. reset_mp(mp);
  69. /* wrong addr type */
  70. strlcpy(line,"SMETHOD trebuchet abcd",sizeof(line));
  71. tt_int_op(parse_smethod_line(line, mp), OP_LT, 0);
  72. reset_mp(mp);
  73. /* cowwect */
  74. strlcpy(line,"SMETHOD trebuchy 127.0.0.2:2999",sizeof(line));
  75. tt_int_op(parse_smethod_line(line, mp), OP_EQ, 0);
  76. tt_int_op(smartlist_len(mp->transports), OP_EQ, 1);
  77. transport = smartlist_get(mp->transports, 0);
  78. /* test registered address of transport */
  79. tor_addr_parse(&test_addr, "127.0.0.2");
  80. tt_assert(tor_addr_eq(&test_addr, &transport->addr));
  81. /* test registered port of transport */
  82. tt_uint_op(transport->port, OP_EQ, 2999);
  83. /* test registered name of transport */
  84. tt_str_op(transport->name,OP_EQ, "trebuchy");
  85. reset_mp(mp);
  86. /* Include some arguments. Good ones. */
  87. strlcpy(line,"SMETHOD trebuchet 127.0.0.1:9999 "
  88. "ARGS:counterweight=3,sling=snappy",
  89. sizeof(line));
  90. tt_int_op(parse_smethod_line(line, mp), OP_EQ, 0);
  91. tt_int_op(1, OP_EQ, smartlist_len(mp->transports));
  92. {
  93. const transport_t *transport_ = smartlist_get(mp->transports, 0);
  94. tt_assert(transport_);
  95. tt_str_op(transport_->name, OP_EQ, "trebuchet");
  96. tt_int_op(transport_->port, OP_EQ, 9999);
  97. tt_str_op(fmt_addr(&transport_->addr), OP_EQ, "127.0.0.1");
  98. tt_str_op(transport_->extra_info_args, OP_EQ,
  99. "counterweight=3,sling=snappy");
  100. }
  101. reset_mp(mp);
  102. /* unsupported version */
  103. strlcpy(line,"VERSION 666",sizeof(line));
  104. tt_int_op(parse_version(line, mp), OP_LT, 0);
  105. /* incomplete VERSION */
  106. strlcpy(line,"VERSION ",sizeof(line));
  107. tt_int_op(parse_version(line, mp), OP_LT, 0);
  108. /* correct VERSION */
  109. strlcpy(line,"VERSION 1",sizeof(line));
  110. tt_int_op(parse_version(line, mp), OP_EQ, 0);
  111. done:
  112. reset_mp(mp);
  113. smartlist_free(mp->transports);
  114. tor_free(mp);
  115. }
  116. static void
  117. test_pt_get_transport_options(void *arg)
  118. {
  119. char **execve_args;
  120. smartlist_t *transport_list = smartlist_new();
  121. managed_proxy_t *mp;
  122. or_options_t *options = get_options_mutable();
  123. char *opt_str = NULL;
  124. config_line_t *cl = NULL;
  125. (void)arg;
  126. execve_args = tor_malloc(sizeof(char*)*2);
  127. execve_args[0] = tor_strdup("cheeseshop");
  128. execve_args[1] = NULL;
  129. mp = managed_proxy_create(transport_list, execve_args, 1);
  130. tt_ptr_op(mp, OP_NE, NULL);
  131. opt_str = get_transport_options_for_server_proxy(mp);
  132. tt_ptr_op(opt_str, OP_EQ, NULL);
  133. smartlist_add_strdup(mp->transports_to_launch, "gruyere");
  134. smartlist_add_strdup(mp->transports_to_launch, "roquefort");
  135. smartlist_add_strdup(mp->transports_to_launch, "stnectaire");
  136. tt_assert(options);
  137. cl = tor_malloc_zero(sizeof(config_line_t));
  138. cl->value = tor_strdup("gruyere melty=10 hardness=se;ven");
  139. options->ServerTransportOptions = cl;
  140. cl = tor_malloc_zero(sizeof(config_line_t));
  141. cl->value = tor_strdup("stnectaire melty=4 hardness=three");
  142. cl->next = options->ServerTransportOptions;
  143. options->ServerTransportOptions = cl;
  144. cl = tor_malloc_zero(sizeof(config_line_t));
  145. cl->value = tor_strdup("pepperjack melty=12 hardness=five");
  146. cl->next = options->ServerTransportOptions;
  147. options->ServerTransportOptions = cl;
  148. opt_str = get_transport_options_for_server_proxy(mp);
  149. tt_str_op(opt_str, OP_EQ,
  150. "gruyere:melty=10;gruyere:hardness=se\\;ven;"
  151. "stnectaire:melty=4;stnectaire:hardness=three");
  152. done:
  153. tor_free(opt_str);
  154. config_free_lines(cl);
  155. managed_proxy_destroy(mp, 0);
  156. smartlist_free(transport_list);
  157. }
  158. static void
  159. test_pt_protocol(void *arg)
  160. {
  161. char line[200];
  162. managed_proxy_t *mp = tor_malloc_zero(sizeof(managed_proxy_t));
  163. (void)arg;
  164. mp->conf_state = PT_PROTO_LAUNCHED;
  165. mp->transports = smartlist_new();
  166. mp->argv = tor_calloc(2, sizeof(char *));
  167. mp->argv[0] = tor_strdup("<testcase>");
  168. /* various wrong protocol runs: */
  169. strlcpy(line,"VERSION 1",sizeof(line));
  170. handle_proxy_line(line, mp);
  171. tt_assert(mp->conf_state == PT_PROTO_ACCEPTING_METHODS);
  172. strlcpy(line,"VERSION 1",sizeof(line));
  173. handle_proxy_line(line, mp);
  174. tt_assert(mp->conf_state == PT_PROTO_BROKEN);
  175. reset_mp(mp);
  176. strlcpy(line,"CMETHOD trebuchet socks5 127.0.0.1:1999",sizeof(line));
  177. handle_proxy_line(line, mp);
  178. tt_assert(mp->conf_state == PT_PROTO_BROKEN);
  179. reset_mp(mp);
  180. /* correct protocol run: */
  181. strlcpy(line,"VERSION 1",sizeof(line));
  182. handle_proxy_line(line, mp);
  183. tt_assert(mp->conf_state == PT_PROTO_ACCEPTING_METHODS);
  184. strlcpy(line,"CMETHOD trebuchet socks5 127.0.0.1:1999",sizeof(line));
  185. handle_proxy_line(line, mp);
  186. tt_assert(mp->conf_state == PT_PROTO_ACCEPTING_METHODS);
  187. strlcpy(line,"CMETHODS DONE",sizeof(line));
  188. handle_proxy_line(line, mp);
  189. tt_assert(mp->conf_state == PT_PROTO_CONFIGURED);
  190. done:
  191. reset_mp(mp);
  192. smartlist_free(mp->transports);
  193. tor_free(mp->argv[0]);
  194. tor_free(mp->argv);
  195. tor_free(mp);
  196. }
  197. static void
  198. test_pt_get_extrainfo_string(void *arg)
  199. {
  200. managed_proxy_t *mp1 = NULL, *mp2 = NULL;
  201. char **argv1, **argv2;
  202. smartlist_t *t1 = smartlist_new(), *t2 = smartlist_new();
  203. int r;
  204. char *s = NULL;
  205. (void) arg;
  206. argv1 = tor_malloc_zero(sizeof(char*)*3);
  207. argv1[0] = tor_strdup("ewige");
  208. argv1[1] = tor_strdup("Blumenkraft");
  209. argv1[2] = NULL;
  210. argv2 = tor_malloc_zero(sizeof(char*)*4);
  211. argv2[0] = tor_strdup("und");
  212. argv2[1] = tor_strdup("ewige");
  213. argv2[2] = tor_strdup("Schlangenkraft");
  214. argv2[3] = NULL;
  215. mp1 = managed_proxy_create(t1, argv1, 1);
  216. mp2 = managed_proxy_create(t2, argv2, 1);
  217. r = parse_smethod_line("SMETHOD hagbard 127.0.0.1:5555", mp1);
  218. tt_int_op(r, OP_EQ, 0);
  219. r = parse_smethod_line("SMETHOD celine 127.0.0.1:1723 ARGS:card=no-enemy",
  220. mp2);
  221. tt_int_op(r, OP_EQ, 0);
  222. /* Force these proxies to look "completed" or they won't generate output. */
  223. mp1->conf_state = mp2->conf_state = PT_PROTO_COMPLETED;
  224. s = pt_get_extra_info_descriptor_string();
  225. tt_assert(s);
  226. tt_str_op(s, OP_EQ,
  227. "transport hagbard 127.0.0.1:5555\n"
  228. "transport celine 127.0.0.1:1723 card=no-enemy\n");
  229. done:
  230. /* XXXX clean up better */
  231. smartlist_free(t1);
  232. smartlist_free(t2);
  233. tor_free(s);
  234. }
  235. #ifdef _WIN32
  236. #define STDIN_HANDLE HANDLE*
  237. #else
  238. #define STDIN_HANDLE int
  239. #endif
  240. static smartlist_t *
  241. tor_get_lines_from_handle_replacement(STDIN_HANDLE handle,
  242. enum stream_status *stream_status_out)
  243. {
  244. static int times_called = 0;
  245. smartlist_t *retval_sl = smartlist_new();
  246. (void) handle;
  247. (void) stream_status_out;
  248. /* Generate some dummy CMETHOD lines the first 5 times. The 6th
  249. time, send 'CMETHODS DONE' to finish configuring the proxy. */
  250. if (times_called++ != 5) {
  251. smartlist_add_asprintf(retval_sl, "SMETHOD mock%d 127.0.0.1:555%d",
  252. times_called, times_called);
  253. } else {
  254. smartlist_add_strdup(retval_sl, "SMETHODS DONE");
  255. }
  256. return retval_sl;
  257. }
  258. /* NOP mock */
  259. static void
  260. tor_process_handle_destroy_replacement(process_handle_t *process_handle,
  261. int also_terminate_process)
  262. {
  263. (void) process_handle;
  264. (void) also_terminate_process;
  265. }
  266. static or_state_t *dummy_state = NULL;
  267. static or_state_t *
  268. get_or_state_replacement(void)
  269. {
  270. return dummy_state;
  271. }
  272. static int controlevent_n = 0;
  273. static uint16_t controlevent_event = 0;
  274. static smartlist_t *controlevent_msgs = NULL;
  275. static void
  276. queue_control_event_string_replacement(uint16_t event, char *msg)
  277. {
  278. ++controlevent_n;
  279. controlevent_event = event;
  280. if (!controlevent_msgs)
  281. controlevent_msgs = smartlist_new();
  282. smartlist_add(controlevent_msgs, msg);
  283. }
  284. /* Test the configure_proxy() function. */
  285. static void
  286. test_pt_configure_proxy(void *arg)
  287. {
  288. int i, retval;
  289. managed_proxy_t *mp = NULL;
  290. (void) arg;
  291. dummy_state = tor_malloc_zero(sizeof(or_state_t));
  292. MOCK(tor_get_lines_from_handle,
  293. tor_get_lines_from_handle_replacement);
  294. MOCK(tor_process_handle_destroy,
  295. tor_process_handle_destroy_replacement);
  296. MOCK(get_or_state,
  297. get_or_state_replacement);
  298. MOCK(queue_control_event_string,
  299. queue_control_event_string_replacement);
  300. control_testing_set_global_event_mask(EVENT_TRANSPORT_LAUNCHED);
  301. mp = tor_malloc_zero(sizeof(managed_proxy_t));
  302. mp->conf_state = PT_PROTO_ACCEPTING_METHODS;
  303. mp->transports = smartlist_new();
  304. mp->transports_to_launch = smartlist_new();
  305. mp->process_handle = tor_malloc_zero(sizeof(process_handle_t));
  306. mp->argv = tor_malloc_zero(sizeof(char*)*2);
  307. mp->argv[0] = tor_strdup("<testcase>");
  308. mp->is_server = 1;
  309. /* Test the return value of configure_proxy() by calling it some
  310. times while it is uninitialized and then finally finalizing its
  311. configuration. */
  312. for (i = 0 ; i < 5 ; i++) {
  313. retval = configure_proxy(mp);
  314. /* retval should be zero because proxy hasn't finished configuring yet */
  315. tt_int_op(retval, OP_EQ, 0);
  316. /* check the number of registered transports */
  317. tt_assert(smartlist_len(mp->transports) == i+1);
  318. /* check that the mp is still waiting for transports */
  319. tt_assert(mp->conf_state == PT_PROTO_ACCEPTING_METHODS);
  320. }
  321. /* this last configure_proxy() should finalize the proxy configuration. */
  322. retval = configure_proxy(mp);
  323. /* retval should be 1 since the proxy finished configuring */
  324. tt_int_op(retval, OP_EQ, 1);
  325. /* check the mp state */
  326. tt_assert(mp->conf_state == PT_PROTO_COMPLETED);
  327. tt_int_op(controlevent_n, OP_EQ, 5);
  328. tt_int_op(controlevent_event, OP_EQ, EVENT_TRANSPORT_LAUNCHED);
  329. tt_int_op(smartlist_len(controlevent_msgs), OP_EQ, 5);
  330. smartlist_sort_strings(controlevent_msgs);
  331. tt_str_op(smartlist_get(controlevent_msgs, 0), OP_EQ,
  332. "650 TRANSPORT_LAUNCHED server mock1 127.0.0.1 5551\r\n");
  333. tt_str_op(smartlist_get(controlevent_msgs, 1), OP_EQ,
  334. "650 TRANSPORT_LAUNCHED server mock2 127.0.0.1 5552\r\n");
  335. tt_str_op(smartlist_get(controlevent_msgs, 2), OP_EQ,
  336. "650 TRANSPORT_LAUNCHED server mock3 127.0.0.1 5553\r\n");
  337. tt_str_op(smartlist_get(controlevent_msgs, 3), OP_EQ,
  338. "650 TRANSPORT_LAUNCHED server mock4 127.0.0.1 5554\r\n");
  339. tt_str_op(smartlist_get(controlevent_msgs, 4), OP_EQ,
  340. "650 TRANSPORT_LAUNCHED server mock5 127.0.0.1 5555\r\n");
  341. { /* check that the transport info were saved properly in the tor state */
  342. config_line_t *transport_in_state = NULL;
  343. smartlist_t *transport_info_sl = smartlist_new();
  344. char *name_of_transport = NULL;
  345. char *bindaddr = NULL;
  346. /* Get the bindaddr for "mock1" and check it against the bindaddr
  347. that the mocked tor_get_lines_from_handle() generated. */
  348. transport_in_state = get_transport_in_state_by_name("mock1");
  349. tt_assert(transport_in_state);
  350. smartlist_split_string(transport_info_sl, transport_in_state->value,
  351. NULL, 0, 0);
  352. name_of_transport = smartlist_get(transport_info_sl, 0);
  353. bindaddr = smartlist_get(transport_info_sl, 1);
  354. tt_str_op(name_of_transport, OP_EQ, "mock1");
  355. tt_str_op(bindaddr, OP_EQ, "127.0.0.1:5551");
  356. SMARTLIST_FOREACH(transport_info_sl, char *, cp, tor_free(cp));
  357. smartlist_free(transport_info_sl);
  358. }
  359. done:
  360. or_state_free(dummy_state);
  361. UNMOCK(tor_get_lines_from_handle);
  362. UNMOCK(tor_process_handle_destroy);
  363. UNMOCK(get_or_state);
  364. UNMOCK(queue_control_event_string);
  365. if (controlevent_msgs) {
  366. SMARTLIST_FOREACH(controlevent_msgs, char *, cp, tor_free(cp));
  367. smartlist_free(controlevent_msgs);
  368. controlevent_msgs = NULL;
  369. }
  370. if (mp->transports) {
  371. SMARTLIST_FOREACH(mp->transports, transport_t *, t, transport_free(t));
  372. smartlist_free(mp->transports);
  373. }
  374. smartlist_free(mp->transports_to_launch);
  375. tor_free(mp->process_handle);
  376. tor_free(mp->argv[0]);
  377. tor_free(mp->argv);
  378. tor_free(mp);
  379. }
  380. /* Test the get_pt_proxy_uri() function. */
  381. static void
  382. test_get_pt_proxy_uri(void *arg)
  383. {
  384. or_options_t *options = get_options_mutable();
  385. char *uri = NULL;
  386. int ret;
  387. (void) arg;
  388. /* Test with no proxy. */
  389. uri = get_pt_proxy_uri();
  390. tt_ptr_op(uri, OP_EQ, NULL);
  391. /* Test with a SOCKS4 proxy. */
  392. options->Socks4Proxy = tor_strdup("192.0.2.1:1080");
  393. ret = tor_addr_port_lookup(options->Socks4Proxy,
  394. &options->Socks4ProxyAddr,
  395. &options->Socks4ProxyPort);
  396. tt_int_op(ret, OP_EQ, 0);
  397. uri = get_pt_proxy_uri();
  398. tt_str_op(uri, OP_EQ, "socks4a://192.0.2.1:1080");
  399. tor_free(uri);
  400. tor_free(options->Socks4Proxy);
  401. /* Test with a SOCKS5 proxy, no username/password. */
  402. options->Socks5Proxy = tor_strdup("192.0.2.1:1080");
  403. ret = tor_addr_port_lookup(options->Socks5Proxy,
  404. &options->Socks5ProxyAddr,
  405. &options->Socks5ProxyPort);
  406. tt_int_op(ret, OP_EQ, 0);
  407. uri = get_pt_proxy_uri();
  408. tt_str_op(uri, OP_EQ, "socks5://192.0.2.1:1080");
  409. tor_free(uri);
  410. /* Test with a SOCKS5 proxy, with username/password. */
  411. options->Socks5ProxyUsername = tor_strdup("hwest");
  412. options->Socks5ProxyPassword = tor_strdup("r34n1m470r");
  413. uri = get_pt_proxy_uri();
  414. tt_str_op(uri, OP_EQ, "socks5://hwest:r34n1m470r@192.0.2.1:1080");
  415. tor_free(uri);
  416. tor_free(options->Socks5Proxy);
  417. tor_free(options->Socks5ProxyUsername);
  418. tor_free(options->Socks5ProxyPassword);
  419. /* Test with a HTTPS proxy, no authenticator. */
  420. options->HTTPSProxy = tor_strdup("192.0.2.1:80");
  421. ret = tor_addr_port_lookup(options->HTTPSProxy,
  422. &options->HTTPSProxyAddr,
  423. &options->HTTPSProxyPort);
  424. tt_int_op(ret, OP_EQ, 0);
  425. uri = get_pt_proxy_uri();
  426. tt_str_op(uri, OP_EQ, "http://192.0.2.1:80");
  427. tor_free(uri);
  428. /* Test with a HTTPS proxy, with authenticator. */
  429. options->HTTPSProxyAuthenticator = tor_strdup("hwest:r34n1m470r");
  430. uri = get_pt_proxy_uri();
  431. tt_str_op(uri, OP_EQ, "http://hwest:r34n1m470r@192.0.2.1:80");
  432. tor_free(uri);
  433. tor_free(options->HTTPSProxy);
  434. tor_free(options->HTTPSProxyAuthenticator);
  435. /* Token nod to the fact that IPv6 exists. */
  436. options->Socks4Proxy = tor_strdup("[2001:db8::1]:1080");
  437. ret = tor_addr_port_lookup(options->Socks4Proxy,
  438. &options->Socks4ProxyAddr,
  439. &options->Socks4ProxyPort);
  440. tt_int_op(ret, OP_EQ, 0);
  441. uri = get_pt_proxy_uri();
  442. tt_str_op(uri, OP_EQ, "socks4a://[2001:db8::1]:1080");
  443. tor_free(uri);
  444. tor_free(options->Socks4Proxy);
  445. done:
  446. if (uri)
  447. tor_free(uri);
  448. }
  449. #define PT_LEGACY(name) \
  450. { #name, test_pt_ ## name , 0, NULL, NULL }
  451. struct testcase_t pt_tests[] = {
  452. PT_LEGACY(parsing),
  453. PT_LEGACY(protocol),
  454. { "get_transport_options", test_pt_get_transport_options, TT_FORK,
  455. NULL, NULL },
  456. { "get_extrainfo_string", test_pt_get_extrainfo_string, TT_FORK,
  457. NULL, NULL },
  458. { "configure_proxy",test_pt_configure_proxy, TT_FORK,
  459. NULL, NULL },
  460. { "get_pt_proxy_uri", test_get_pt_proxy_uri, TT_FORK,
  461. NULL, NULL },
  462. END_OF_TESTCASES
  463. };