test_hs_cache.c 18 KB

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