test_hs_cache.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. /* Copyright (c) 2016-2018, The Tor Project, Inc. */
  2. /* See LICENSE for licensing information */
  3. /**
  4. * \file test_hs_cache.c
  5. * \brief Test hidden service caches.
  6. */
  7. #define CONNECTION_PRIVATE
  8. #define DIRECTORY_PRIVATE
  9. #define HS_CACHE_PRIVATE
  10. #include "trunnel/ed25519_cert.h"
  11. #include "or/hs_cache.h"
  12. #include "or/rendcache.h"
  13. #include "or/directory.h"
  14. #include "or/networkstatus.h"
  15. #include "or/connection.h"
  16. #include "or/proto_http.h"
  17. #include "or/dir_connection_st.h"
  18. #include "or/networkstatus_st.h"
  19. #include "test/hs_test_helpers.h"
  20. #include "test/test_helpers.h"
  21. #include "test/test.h"
  22. /* Static variable used to encoded the HSDir query. */
  23. static char query_b64[256];
  24. /* Build an HSDir query using a ed25519 public key. */
  25. static const char *
  26. helper_get_hsdir_query(const hs_descriptor_t *desc)
  27. {
  28. ed25519_public_to_base64(query_b64, &desc->plaintext_data.blinded_pubkey);
  29. return query_b64;
  30. }
  31. static void
  32. init_test(void)
  33. {
  34. /* Always needed. Initialize the subsystem. */
  35. hs_cache_init();
  36. /* We need the v2 cache since our OOM and cache cleanup does poke at it. */
  37. rend_cache_init();
  38. }
  39. static void
  40. test_directory(void *arg)
  41. {
  42. int ret;
  43. size_t oom_size;
  44. char *desc1_str = NULL;
  45. const char *desc_out;
  46. ed25519_keypair_t signing_kp1;
  47. hs_descriptor_t *desc1 = NULL;
  48. (void) arg;
  49. init_test();
  50. /* Generate a valid descriptor with normal values. */
  51. ret = ed25519_keypair_generate(&signing_kp1, 0);
  52. tt_int_op(ret, OP_EQ, 0);
  53. desc1 = hs_helper_build_hs_desc_with_ip(&signing_kp1);
  54. tt_assert(desc1);
  55. ret = hs_desc_encode_descriptor(desc1, &signing_kp1, &desc1_str);
  56. tt_int_op(ret, OP_EQ, 0);
  57. /* Very first basic test, should be able to be stored, survive a
  58. * clean, found with a lookup and then cleaned by our OOM. */
  59. {
  60. ret = hs_cache_store_as_dir(desc1_str);
  61. tt_int_op(ret, OP_EQ, 0);
  62. /* Re-add, it should fail since we already have it. */
  63. ret = hs_cache_store_as_dir(desc1_str);
  64. tt_int_op(ret, OP_EQ, -1);
  65. /* Try to clean now which should be fine, there is at worst few seconds
  66. * between the store and this call. */
  67. hs_cache_clean_as_dir(time(NULL));
  68. /* We should find it in our cache. */
  69. ret = hs_cache_lookup_as_dir(3, helper_get_hsdir_query(desc1), &desc_out);
  70. tt_int_op(ret, OP_EQ, 1);
  71. tt_str_op(desc_out, OP_EQ, desc1_str);
  72. /* Tell our OOM to run and to at least remove a byte which will result in
  73. * removing the descriptor from our cache. */
  74. oom_size = hs_cache_handle_oom(time(NULL), 1);
  75. tt_int_op(oom_size, OP_GE, 1);
  76. ret = hs_cache_lookup_as_dir(3, helper_get_hsdir_query(desc1), NULL);
  77. tt_int_op(ret, OP_EQ, 0);
  78. }
  79. /* Store two descriptors and remove the expiring one only. */
  80. {
  81. ed25519_keypair_t signing_kp_zero;
  82. ret = ed25519_keypair_generate(&signing_kp_zero, 0);
  83. tt_int_op(ret, OP_EQ, 0);
  84. hs_descriptor_t *desc_zero_lifetime;
  85. desc_zero_lifetime = hs_helper_build_hs_desc_with_ip(&signing_kp_zero);
  86. tt_assert(desc_zero_lifetime);
  87. desc_zero_lifetime->plaintext_data.revision_counter = 1;
  88. desc_zero_lifetime->plaintext_data.lifetime_sec = 0;
  89. char *desc_zero_lifetime_str;
  90. ret = hs_desc_encode_descriptor(desc_zero_lifetime, &signing_kp_zero,
  91. &desc_zero_lifetime_str);
  92. tt_int_op(ret, OP_EQ, 0);
  93. ret = hs_cache_store_as_dir(desc1_str);
  94. tt_int_op(ret, OP_EQ, 0);
  95. ret = hs_cache_store_as_dir(desc_zero_lifetime_str);
  96. tt_int_op(ret, OP_EQ, 0);
  97. /* This one should clear out our zero lifetime desc. */
  98. hs_cache_clean_as_dir(time(NULL));
  99. /* We should find desc1 in our cache. */
  100. ret = hs_cache_lookup_as_dir(3, helper_get_hsdir_query(desc1), &desc_out);
  101. tt_int_op(ret, OP_EQ, 1);
  102. tt_str_op(desc_out, OP_EQ, desc1_str);
  103. /* We should NOT find our zero lifetime desc in our cache. */
  104. ret = hs_cache_lookup_as_dir(3,
  105. helper_get_hsdir_query(desc_zero_lifetime),
  106. NULL);
  107. tt_int_op(ret, OP_EQ, 0);
  108. /* Cleanup our entire cache. */
  109. oom_size = hs_cache_handle_oom(time(NULL), 1);
  110. tt_int_op(oom_size, OP_GE, 1);
  111. hs_descriptor_free(desc_zero_lifetime);
  112. tor_free(desc_zero_lifetime_str);
  113. }
  114. /* Throw junk at it. */
  115. {
  116. ret = hs_cache_store_as_dir("blah");
  117. tt_int_op(ret, OP_EQ, -1);
  118. /* Poor attempt at tricking the decoding. */
  119. ret = hs_cache_store_as_dir("hs-descriptor 3\nJUNK");
  120. tt_int_op(ret, OP_EQ, -1);
  121. /* Undecodable base64 query. */
  122. ret = hs_cache_lookup_as_dir(3, "blah", NULL);
  123. tt_int_op(ret, OP_EQ, -1);
  124. /* Decodable base64 query but wrong ed25519 size. */
  125. ret = hs_cache_lookup_as_dir(3, "dW5pY29ybg==", NULL);
  126. tt_int_op(ret, OP_EQ, -1);
  127. }
  128. /* Test descriptor replacement with revision counter. */
  129. {
  130. char *new_desc_str;
  131. /* Add a descriptor. */
  132. ret = hs_cache_store_as_dir(desc1_str);
  133. tt_int_op(ret, OP_EQ, 0);
  134. ret = hs_cache_lookup_as_dir(3, helper_get_hsdir_query(desc1), &desc_out);
  135. tt_int_op(ret, OP_EQ, 1);
  136. /* Bump revision counter. */
  137. desc1->plaintext_data.revision_counter++;
  138. ret = hs_desc_encode_descriptor(desc1, &signing_kp1, &new_desc_str);
  139. tt_int_op(ret, OP_EQ, 0);
  140. ret = hs_cache_store_as_dir(new_desc_str);
  141. tt_int_op(ret, OP_EQ, 0);
  142. /* Look it up, it should have been replaced. */
  143. ret = hs_cache_lookup_as_dir(3, helper_get_hsdir_query(desc1), &desc_out);
  144. tt_int_op(ret, OP_EQ, 1);
  145. tt_str_op(desc_out, OP_EQ, new_desc_str);
  146. tor_free(new_desc_str);
  147. }
  148. done:
  149. hs_descriptor_free(desc1);
  150. tor_free(desc1_str);
  151. }
  152. static void
  153. test_clean_as_dir(void *arg)
  154. {
  155. size_t ret;
  156. char *desc1_str = NULL;
  157. time_t now = time(NULL);
  158. hs_descriptor_t *desc1 = NULL;
  159. ed25519_keypair_t signing_kp1;
  160. (void) arg;
  161. init_test();
  162. /* Generate a valid descriptor with values. */
  163. ret = ed25519_keypair_generate(&signing_kp1, 0);
  164. tt_int_op(ret, OP_EQ, 0);
  165. desc1 = hs_helper_build_hs_desc_with_ip(&signing_kp1);
  166. tt_assert(desc1);
  167. ret = hs_desc_encode_descriptor(desc1, &signing_kp1, &desc1_str);
  168. tt_int_op(ret, OP_EQ, 0);
  169. ret = hs_cache_store_as_dir(desc1_str);
  170. tt_int_op(ret, OP_EQ, 0);
  171. /* With the lifetime being 3 hours, a cleanup shouldn't remove it. */
  172. ret = cache_clean_v3_as_dir(now, 0);
  173. tt_int_op(ret, OP_EQ, 0);
  174. /* Should be present after clean up. */
  175. ret = hs_cache_lookup_as_dir(3, helper_get_hsdir_query(desc1), NULL);
  176. tt_int_op(ret, OP_EQ, 1);
  177. /* Set a cutoff 100 seconds in the past. It should not remove the entry
  178. * since the entry is still recent enough. */
  179. ret = cache_clean_v3_as_dir(now, now - 100);
  180. tt_int_op(ret, OP_EQ, 0);
  181. /* Should be present after clean up. */
  182. ret = hs_cache_lookup_as_dir(3, helper_get_hsdir_query(desc1), NULL);
  183. tt_int_op(ret, OP_EQ, 1);
  184. /* Set a cutoff of 100 seconds in the future. It should remove the entry
  185. * that we've just added since it's not too old for the cutoff. */
  186. ret = cache_clean_v3_as_dir(now, now + 100);
  187. tt_int_op(ret, OP_GT, 0);
  188. /* Shouldn't be present after clean up. */
  189. ret = hs_cache_lookup_as_dir(3, helper_get_hsdir_query(desc1), NULL);
  190. tt_int_op(ret, OP_EQ, 0);
  191. done:
  192. hs_descriptor_free(desc1);
  193. tor_free(desc1_str);
  194. }
  195. /* Test helper: Fetch an HS descriptor from an HSDir (for the hidden service
  196. with <b>blinded_key</b>. Return the received descriptor string. */
  197. static char *
  198. helper_fetch_desc_from_hsdir(const ed25519_public_key_t *blinded_key)
  199. {
  200. int retval;
  201. char *received_desc = NULL;
  202. char *hsdir_query_str = NULL;
  203. /* The dir conn we are going to simulate */
  204. dir_connection_t *conn = NULL;
  205. /* First extract the blinded public key that we are going to use in our
  206. query, and then build the actual query string. */
  207. {
  208. char hsdir_cache_key[ED25519_BASE64_LEN+1];
  209. retval = ed25519_public_to_base64(hsdir_cache_key,
  210. blinded_key);
  211. tt_int_op(retval, OP_EQ, 0);
  212. tor_asprintf(&hsdir_query_str, GET("/tor/hs/3/%s"), hsdir_cache_key);
  213. }
  214. /* Simulate an HTTP GET request to the HSDir */
  215. conn = dir_connection_new(AF_INET);
  216. tor_addr_from_ipv4h(&conn->base_.addr, 0x7f000001);
  217. TO_CONN(conn)->linked = 1;/* Pretend the conn is encrypted :) */
  218. retval = directory_handle_command_get(conn, hsdir_query_str,
  219. NULL, 0);
  220. tt_int_op(retval, OP_EQ, 0);
  221. /* Read the descriptor that the HSDir just served us */
  222. {
  223. char *headers = NULL;
  224. size_t body_used = 0;
  225. fetch_from_buf_http(TO_CONN(conn)->outbuf, &headers, MAX_HEADERS_SIZE,
  226. &received_desc, &body_used, HS_DESC_MAX_LEN, 0);
  227. tor_free(headers);
  228. }
  229. done:
  230. tor_free(hsdir_query_str);
  231. if (conn)
  232. connection_free_minimal(TO_CONN(conn));
  233. return received_desc;
  234. }
  235. /* Publish a descriptor to the HSDir, then fetch it. Check that the received
  236. descriptor matches the published one. */
  237. static void
  238. test_upload_and_download_hs_desc(void *arg)
  239. {
  240. int retval;
  241. hs_descriptor_t *published_desc = NULL;
  242. char *published_desc_str = NULL;
  243. char *received_desc_str = NULL;
  244. (void) arg;
  245. /* Initialize HSDir cache subsystem */
  246. init_test();
  247. /* Test a descriptor not found in the directory cache. */
  248. {
  249. ed25519_public_key_t blinded_key;
  250. memset(&blinded_key.pubkey, 'A', sizeof(blinded_key.pubkey));
  251. received_desc_str = helper_fetch_desc_from_hsdir(&blinded_key);
  252. tt_int_op(strlen(received_desc_str), OP_EQ, 0);
  253. tor_free(received_desc_str);
  254. }
  255. /* Generate a valid descriptor with normal values. */
  256. {
  257. ed25519_keypair_t signing_kp;
  258. retval = ed25519_keypair_generate(&signing_kp, 0);
  259. tt_int_op(retval, OP_EQ, 0);
  260. published_desc = hs_helper_build_hs_desc_with_ip(&signing_kp);
  261. tt_assert(published_desc);
  262. retval = hs_desc_encode_descriptor(published_desc, &signing_kp,
  263. &published_desc_str);
  264. tt_int_op(retval, OP_EQ, 0);
  265. }
  266. /* Publish descriptor to the HSDir */
  267. {
  268. retval = handle_post_hs_descriptor("/tor/hs/3/publish",published_desc_str);
  269. tt_int_op(retval, OP_EQ, 200);
  270. }
  271. /* Simulate a fetch of the previously published descriptor */
  272. {
  273. const ed25519_public_key_t *blinded_key;
  274. blinded_key = &published_desc->plaintext_data.blinded_pubkey;
  275. received_desc_str = helper_fetch_desc_from_hsdir(blinded_key);
  276. }
  277. /* Verify we received the exact same descriptor we published earlier */
  278. tt_str_op(received_desc_str, OP_EQ, published_desc_str);
  279. tor_free(received_desc_str);
  280. /* With a valid descriptor in the directory cache, try again an invalid. */
  281. {
  282. ed25519_public_key_t blinded_key;
  283. memset(&blinded_key.pubkey, 'A', sizeof(blinded_key.pubkey));
  284. received_desc_str = helper_fetch_desc_from_hsdir(&blinded_key);
  285. tt_int_op(strlen(received_desc_str), OP_EQ, 0);
  286. }
  287. done:
  288. tor_free(received_desc_str);
  289. tor_free(published_desc_str);
  290. hs_descriptor_free(published_desc);
  291. }
  292. /* Test that HSDirs reject outdated descriptors based on their revision
  293. * counter. Also test that HSDirs correctly replace old descriptors with newer
  294. * descriptors. */
  295. static void
  296. test_hsdir_revision_counter_check(void *arg)
  297. {
  298. int retval;
  299. ed25519_keypair_t signing_kp;
  300. hs_descriptor_t *published_desc = NULL;
  301. char *published_desc_str = NULL;
  302. uint8_t subcredential[DIGEST256_LEN];
  303. char *received_desc_str = NULL;
  304. hs_descriptor_t *received_desc = NULL;
  305. (void) arg;
  306. /* Initialize HSDir cache subsystem */
  307. init_test();
  308. /* Generate a valid descriptor with normal values. */
  309. {
  310. retval = ed25519_keypair_generate(&signing_kp, 0);
  311. tt_int_op(retval, OP_EQ, 0);
  312. published_desc = hs_helper_build_hs_desc_with_ip(&signing_kp);
  313. tt_assert(published_desc);
  314. retval = hs_desc_encode_descriptor(published_desc, &signing_kp,
  315. &published_desc_str);
  316. tt_int_op(retval, OP_EQ, 0);
  317. }
  318. /* Publish descriptor to the HSDir */
  319. {
  320. retval = handle_post_hs_descriptor("/tor/hs/3/publish",published_desc_str);
  321. tt_int_op(retval, OP_EQ, 200);
  322. }
  323. /* Try publishing again with the same revision counter: Should fail. */
  324. {
  325. retval = handle_post_hs_descriptor("/tor/hs/3/publish",published_desc_str);
  326. tt_int_op(retval, OP_EQ, 400);
  327. }
  328. /* Fetch the published descriptor and validate the revision counter. */
  329. {
  330. const ed25519_public_key_t *blinded_key;
  331. blinded_key = &published_desc->plaintext_data.blinded_pubkey;
  332. hs_get_subcredential(&signing_kp.pubkey, blinded_key, subcredential);
  333. received_desc_str = helper_fetch_desc_from_hsdir(blinded_key);
  334. retval = hs_desc_decode_descriptor(received_desc_str,
  335. subcredential, &received_desc);
  336. tt_int_op(retval, OP_EQ, 0);
  337. tt_assert(received_desc);
  338. /* Check that the revision counter is correct */
  339. tt_u64_op(received_desc->plaintext_data.revision_counter, OP_EQ, 42);
  340. hs_descriptor_free(received_desc);
  341. received_desc = NULL;
  342. tor_free(received_desc_str);
  343. }
  344. /* Increment the revision counter and try again. Should work. */
  345. {
  346. published_desc->plaintext_data.revision_counter = 1313;
  347. tor_free(published_desc_str);
  348. retval = hs_desc_encode_descriptor(published_desc, &signing_kp,
  349. &published_desc_str);
  350. tt_int_op(retval, OP_EQ, 0);
  351. retval = handle_post_hs_descriptor("/tor/hs/3/publish",published_desc_str);
  352. tt_int_op(retval, OP_EQ, 200);
  353. }
  354. /* Again, fetch the published descriptor and perform the revision counter
  355. validation. The revision counter must have changed. */
  356. {
  357. const ed25519_public_key_t *blinded_key;
  358. blinded_key = &published_desc->plaintext_data.blinded_pubkey;
  359. received_desc_str = helper_fetch_desc_from_hsdir(blinded_key);
  360. retval = hs_desc_decode_descriptor(received_desc_str,
  361. subcredential, &received_desc);
  362. tt_int_op(retval, OP_EQ, 0);
  363. tt_assert(received_desc);
  364. /* Check that the revision counter is the latest */
  365. tt_u64_op(received_desc->plaintext_data.revision_counter, OP_EQ, 1313);
  366. }
  367. done:
  368. hs_descriptor_free(published_desc);
  369. hs_descriptor_free(received_desc);
  370. tor_free(received_desc_str);
  371. tor_free(published_desc_str);
  372. }
  373. static networkstatus_t mock_ns;
  374. static networkstatus_t *
  375. mock_networkstatus_get_live_consensus(time_t now)
  376. {
  377. (void) now;
  378. return &mock_ns;
  379. }
  380. /** Test that we can store HS descriptors in the client HS cache. */
  381. static void
  382. test_client_cache(void *arg)
  383. {
  384. int retval;
  385. ed25519_keypair_t signing_kp;
  386. hs_descriptor_t *published_desc = NULL;
  387. char *published_desc_str = NULL;
  388. uint8_t wanted_subcredential[DIGEST256_LEN];
  389. response_handler_args_t *args = NULL;
  390. dir_connection_t *conn = NULL;
  391. (void) arg;
  392. /* Initialize HSDir cache subsystem */
  393. init_test();
  394. MOCK(networkstatus_get_live_consensus,
  395. mock_networkstatus_get_live_consensus);
  396. /* Set consensus time */
  397. parse_rfc1123_time("Sat, 26 Oct 1985 13:00:00 UTC",
  398. &mock_ns.valid_after);
  399. parse_rfc1123_time("Sat, 26 Oct 1985 14:00:00 UTC",
  400. &mock_ns.fresh_until);
  401. parse_rfc1123_time("Sat, 26 Oct 1985 16:00:00 UTC",
  402. &mock_ns.valid_until);
  403. /* Generate a valid descriptor with normal values. */
  404. {
  405. retval = ed25519_keypair_generate(&signing_kp, 0);
  406. tt_int_op(retval, OP_EQ, 0);
  407. published_desc = hs_helper_build_hs_desc_with_ip(&signing_kp);
  408. tt_assert(published_desc);
  409. retval = hs_desc_encode_descriptor(published_desc, &signing_kp,
  410. &published_desc_str);
  411. tt_int_op(retval, OP_EQ, 0);
  412. memcpy(wanted_subcredential, published_desc->subcredential, DIGEST256_LEN);
  413. tt_assert(!tor_mem_is_zero((char*)wanted_subcredential, DIGEST256_LEN));
  414. }
  415. /* Test handle_response_fetch_hsdesc_v3() */
  416. {
  417. args = tor_malloc_zero(sizeof(response_handler_args_t));
  418. args->status_code = 200;
  419. args->reason = NULL;
  420. args->body = published_desc_str;
  421. args->body_len = strlen(published_desc_str);
  422. conn = tor_malloc_zero(sizeof(dir_connection_t));
  423. conn->hs_ident = tor_malloc_zero(sizeof(hs_ident_dir_conn_t));
  424. ed25519_pubkey_copy(&conn->hs_ident->identity_pk, &signing_kp.pubkey);
  425. }
  426. /* store the descriptor! */
  427. retval = handle_response_fetch_hsdesc_v3(conn, args);
  428. tt_int_op(retval, == , 0);
  429. /* Progress time a bit and attempt to clean cache: our desc should not be
  430. * cleaned since we still in the same TP. */
  431. {
  432. parse_rfc1123_time("Sat, 27 Oct 1985 02:00:00 UTC",
  433. &mock_ns.valid_after);
  434. parse_rfc1123_time("Sat, 27 Oct 1985 03:00:00 UTC",
  435. &mock_ns.fresh_until);
  436. parse_rfc1123_time("Sat, 27 Oct 1985 05:00:00 UTC",
  437. &mock_ns.valid_until);
  438. /* fetch the descriptor and make sure it's there */
  439. const hs_descriptor_t *cached_desc = NULL;
  440. cached_desc = hs_cache_lookup_as_client(&signing_kp.pubkey);
  441. tt_assert(cached_desc);
  442. tt_mem_op(cached_desc->subcredential, OP_EQ, wanted_subcredential,
  443. DIGEST256_LEN);
  444. }
  445. /* Progress time to next TP and check that desc was cleaned */
  446. {
  447. parse_rfc1123_time("Sat, 27 Oct 1985 12:00:00 UTC",
  448. &mock_ns.valid_after);
  449. parse_rfc1123_time("Sat, 27 Oct 1985 13:00:00 UTC",
  450. &mock_ns.fresh_until);
  451. parse_rfc1123_time("Sat, 27 Oct 1985 15:00:00 UTC",
  452. &mock_ns.valid_until);
  453. const hs_descriptor_t *cached_desc = NULL;
  454. cached_desc = hs_cache_lookup_as_client(&signing_kp.pubkey);
  455. tt_assert(!cached_desc);
  456. }
  457. done:
  458. tor_free(args);
  459. hs_descriptor_free(published_desc);
  460. tor_free(published_desc_str);
  461. if (conn) {
  462. tor_free(conn->hs_ident);
  463. tor_free(conn);
  464. }
  465. }
  466. struct testcase_t hs_cache[] = {
  467. /* Encoding tests. */
  468. { "directory", test_directory, TT_FORK,
  469. NULL, NULL },
  470. { "clean_as_dir", test_clean_as_dir, TT_FORK,
  471. NULL, NULL },
  472. { "hsdir_revision_counter_check", test_hsdir_revision_counter_check, TT_FORK,
  473. NULL, NULL },
  474. { "upload_and_download_hs_desc", test_upload_and_download_hs_desc, TT_FORK,
  475. NULL, NULL },
  476. { "client_cache", test_client_cache, TT_FORK,
  477. NULL, NULL },
  478. END_OF_TESTCASES
  479. };