aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/namestore/test_namestore_api_zone_iteration_specific_zone.c')
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_specific_zone.c558
1 files changed, 280 insertions, 278 deletions
diff --git a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
index 924e1eb1e..50c247b14 100644
--- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
+++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
@@ -31,16 +31,16 @@
31#define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT 31#define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT
32 32
33 33
34#define TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 100) 34#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 100)
35 35
36 36
37static struct GNUNET_NAMESTORE_Handle * nsh; 37static struct GNUNET_NAMESTORE_Handle *nsh;
38 38
39static struct GNUNET_SCHEDULER_Task * endbadly_task; 39static struct GNUNET_SCHEDULER_Task *endbadly_task;
40 40
41static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey; 41static struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey;
42 42
43static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey2; 43static struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey2;
44 44
45static struct GNUNET_NAMESTORE_ZoneIterator *zi; 45static struct GNUNET_NAMESTORE_ZoneIterator *zi;
46 46
@@ -48,15 +48,15 @@ static int res;
48 48
49static int returned_records; 49static int returned_records;
50 50
51static char * s_name_1; 51static char *s_name_1;
52 52
53static struct GNUNET_GNSRECORD_Data *s_rd_1; 53static struct GNUNET_GNSRECORD_Data *s_rd_1;
54 54
55static char * s_name_2; 55static char *s_name_2;
56 56
57static struct GNUNET_GNSRECORD_Data *s_rd_2; 57static struct GNUNET_GNSRECORD_Data *s_rd_2;
58 58
59static char * s_name_3; 59static char *s_name_3;
60 60
61static struct GNUNET_GNSRECORD_Data *s_rd_3; 61static struct GNUNET_GNSRECORD_Data *s_rd_3;
62 62
@@ -67,246 +67,247 @@ static struct GNUNET_GNSRECORD_Data *s_rd_3;
67 * @param cls handle to use to re-connect. 67 * @param cls handle to use to re-connect.
68 */ 68 */
69static void 69static void
70endbadly(void *cls) 70endbadly (void *cls)
71{ 71{
72 endbadly_task = NULL; 72 endbadly_task = NULL;
73 GNUNET_SCHEDULER_shutdown(); 73 GNUNET_SCHEDULER_shutdown ();
74 res = 1; 74 res = 1;
75} 75}
76 76
77 77
78static void 78static void
79end(void *cls) 79end (void *cls)
80{ 80{
81 if (NULL != zi) 81 if (NULL != zi)
82 { 82 {
83 GNUNET_NAMESTORE_zone_iteration_stop(zi); 83 GNUNET_NAMESTORE_zone_iteration_stop (zi);
84 zi = NULL; 84 zi = NULL;
85 } 85 }
86 if (NULL != endbadly_task) 86 if (NULL != endbadly_task)
87 { 87 {
88 GNUNET_SCHEDULER_cancel(endbadly_task); 88 GNUNET_SCHEDULER_cancel (endbadly_task);
89 endbadly_task = NULL; 89 endbadly_task = NULL;
90 } 90 }
91 if (NULL != privkey) 91 if (NULL != privkey)
92 { 92 {
93 GNUNET_free(privkey); 93 GNUNET_free (privkey);
94 privkey = NULL; 94 privkey = NULL;
95 } 95 }
96 if (NULL != privkey2) 96 if (NULL != privkey2)
97 { 97 {
98 GNUNET_free(privkey2); 98 GNUNET_free (privkey2);
99 privkey2 = NULL; 99 privkey2 = NULL;
100 } 100 }
101 GNUNET_free_non_null(s_name_1); 101 GNUNET_free_non_null (s_name_1);
102 GNUNET_free_non_null(s_name_2); 102 GNUNET_free_non_null (s_name_2);
103 GNUNET_free_non_null(s_name_3); 103 GNUNET_free_non_null (s_name_3);
104 if (s_rd_1 != NULL) 104 if (s_rd_1 != NULL)
105 { 105 {
106 GNUNET_free((void *)s_rd_1->data); 106 GNUNET_free ((void *) s_rd_1->data);
107 GNUNET_free(s_rd_1); 107 GNUNET_free (s_rd_1);
108 } 108 }
109 if (s_rd_2 != NULL) 109 if (s_rd_2 != NULL)
110 { 110 {
111 GNUNET_free((void *)s_rd_2->data); 111 GNUNET_free ((void *) s_rd_2->data);
112 GNUNET_free(s_rd_2); 112 GNUNET_free (s_rd_2);
113 } 113 }
114 if (s_rd_3 != NULL) 114 if (s_rd_3 != NULL)
115 { 115 {
116 GNUNET_free((void *)s_rd_3->data); 116 GNUNET_free ((void *) s_rd_3->data);
117 GNUNET_free(s_rd_3); 117 GNUNET_free (s_rd_3);
118 } 118 }
119 if (nsh != NULL) 119 if (nsh != NULL)
120 { 120 {
121 GNUNET_NAMESTORE_disconnect(nsh); 121 GNUNET_NAMESTORE_disconnect (nsh);
122 nsh = NULL; 122 nsh = NULL;
123 } 123 }
124} 124}
125 125
126 126
127static void 127static void
128fail_cb(void *cls) 128fail_cb (void *cls)
129{ 129{
130 GNUNET_assert(0); 130 GNUNET_assert (0);
131 zi = NULL; 131 zi = NULL;
132} 132}
133 133
134 134
135static void 135static void
136zone_proc(void *cls, 136zone_proc (void *cls,
137 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, 137 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
138 const char *label, 138 const char *label,
139 unsigned int rd_count, 139 unsigned int rd_count,
140 const struct GNUNET_GNSRECORD_Data *rd) 140 const struct GNUNET_GNSRECORD_Data *rd)
141{ 141{
142 int failed = GNUNET_NO; 142 int failed = GNUNET_NO;
143 143
144 GNUNET_assert(NULL != zone); 144 GNUNET_assert (NULL != zone);
145 if (0 == GNUNET_memcmp(zone, 145 if (0 == GNUNET_memcmp (zone,
146 privkey)) 146 privkey))
147 {
148 if (0 == strcmp (label, s_name_1))
147 { 149 {
148 if (0 == strcmp(label, s_name_1)) 150 if (rd_count == 1)
151 {
152 if (GNUNET_YES != GNUNET_GNSRECORD_records_cmp (rd, s_rd_1))
149 { 153 {
150 if (rd_count == 1) 154 failed = GNUNET_YES;
151 { 155 GNUNET_break (0);
152 if (GNUNET_YES != GNUNET_GNSRECORD_records_cmp(rd, s_rd_1))
153 {
154 failed = GNUNET_YES;
155 GNUNET_break(0);
156 }
157 }
158 else
159 {
160 failed = GNUNET_YES;
161 GNUNET_break(0);
162 }
163 }
164 else if (0 == strcmp(label, s_name_2))
165 {
166 if (rd_count == 1)
167 {
168 if (GNUNET_YES != GNUNET_GNSRECORD_records_cmp(rd, s_rd_2))
169 {
170 failed = GNUNET_YES;
171 GNUNET_break(0);
172 }
173 }
174 else
175 {
176 GNUNET_log(GNUNET_ERROR_TYPE_ERROR,
177 "Received invalid record count\n");
178 failed = GNUNET_YES;
179 GNUNET_break(0);
180 }
181 } 156 }
157 }
182 else 158 else
159 {
160 failed = GNUNET_YES;
161 GNUNET_break (0);
162 }
163 }
164 else if (0 == strcmp (label, s_name_2))
165 {
166 if (rd_count == 1)
167 {
168 if (GNUNET_YES != GNUNET_GNSRECORD_records_cmp (rd, s_rd_2))
183 { 169 {
184 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
185 "Comparing result failed: got name `%s' for first zone\n",
186 label);
187 failed = GNUNET_YES; 170 failed = GNUNET_YES;
188 GNUNET_break(0); 171 GNUNET_break (0);
189 } 172 }
173 }
174 else
175 {
176 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
177 "Received invalid record count\n");
178 failed = GNUNET_YES;
179 GNUNET_break (0);
180 }
190 } 181 }
191 else if (0 == GNUNET_memcmp(zone, privkey2)) 182 else
192 { 183 {
193 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, 184 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
194 "Received data for not requested zone\n"); 185 "Comparing result failed: got name `%s' for first zone\n",
186 label);
195 failed = GNUNET_YES; 187 failed = GNUNET_YES;
196 GNUNET_break(0); 188 GNUNET_break (0);
197 } 189 }
190 }
191 else if (0 == GNUNET_memcmp (zone, privkey2))
192 {
193 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
194 "Received data for not requested zone\n");
195 failed = GNUNET_YES;
196 GNUNET_break (0);
197 }
198 else 198 else
199 { 199 {
200 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, 200 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
201 "Received invalid zone\n"); 201 "Received invalid zone\n");
202 failed = GNUNET_YES; 202 failed = GNUNET_YES;
203 GNUNET_break(0); 203 GNUNET_break (0);
204 } 204 }
205 if (failed == GNUNET_NO) 205 if (failed == GNUNET_NO)
206 { 206 {
207 returned_records++; 207 returned_records++;
208 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 208 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
209 "Telling namestore to send the next result\n"); 209 "Telling namestore to send the next result\n");
210 GNUNET_NAMESTORE_zone_iterator_next(zi, 210 GNUNET_NAMESTORE_zone_iterator_next (zi,
211 1); 211 1);
212 } 212 }
213 else 213 else
214 { 214 {
215 GNUNET_break(0); 215 GNUNET_break (0);
216 res = 2; 216 res = 2;
217 GNUNET_SCHEDULER_shutdown(); 217 GNUNET_SCHEDULER_shutdown ();
218 } 218 }
219} 219}
220 220
221 221
222static void 222static void
223zone_proc_end(void *cls) 223zone_proc_end (void *cls)
224{ 224{
225 zi = NULL; 225 zi = NULL;
226 GNUNET_break(2 == returned_records); 226 GNUNET_break (2 == returned_records);
227 if (2 == returned_records) 227 if (2 == returned_records)
228 { 228 {
229 res = 0; /* Last iteraterator callback, we are done */ 229 res = 0; /* Last iteraterator callback, we are done */
230 } 230 }
231 else 231 else
232 { 232 {
233 res = 1; 233 res = 1;
234 } 234 }
235 235
236 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 236 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
237 "Received last result, iteration done after receing %u results\n", 237 "Received last result, iteration done after receing %u results\n",
238 returned_records); 238 returned_records);
239 GNUNET_SCHEDULER_shutdown(); 239 GNUNET_SCHEDULER_shutdown ();
240} 240}
241 241
242 242
243static void 243static void
244put_cont(void *cls, 244put_cont (void *cls,
245 int32_t success, 245 int32_t success,
246 const char *emsg) 246 const char *emsg)
247{ 247{
248 static int c = 0; 248 static int c = 0;
249 249
250 if (success == GNUNET_OK) 250 if (success == GNUNET_OK)
251 { 251 {
252 c++; 252 c++;
253 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 253 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
254 "Created record %u \n", c); 254 "Created record %u \n", c);
255 } 255 }
256 else 256 else
257 { 257 {
258 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, 258 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
259 "Failed to created records: `%s'\n", 259 "Failed to created records: `%s'\n",
260 emsg); 260 emsg);
261 GNUNET_break(0); 261 GNUNET_break (0);
262 res = 2; 262 res = 2;
263 GNUNET_SCHEDULER_shutdown(); 263 GNUNET_SCHEDULER_shutdown ();
264 return; 264 return;
265 } 265 }
266 266
267 if (c == 3) 267 if (c == 3)
268 {
269 res = 1;
270 returned_records = 0;
271 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
272 "All records created, starting iteration over all zones \n");
273 zi = GNUNET_NAMESTORE_zone_iteration_start (nsh,
274 privkey,
275 &fail_cb,
276 NULL,
277 &zone_proc,
278 NULL,
279 &zone_proc_end,
280 NULL);
281 if (zi == NULL)
268 { 282 {
269 res = 1; 283 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
270 returned_records = 0; 284 "Failed to create zone iterator\n");
271 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 285 GNUNET_break (0);
272 "All records created, starting iteration over all zones \n"); 286 res = 2;
273 zi = GNUNET_NAMESTORE_zone_iteration_start(nsh, 287 GNUNET_SCHEDULER_shutdown ();
274 privkey, 288 return;
275 &fail_cb,
276 NULL,
277 &zone_proc,
278 NULL,
279 &zone_proc_end,
280 NULL);
281 if (zi == NULL)
282 {
283 GNUNET_log(GNUNET_ERROR_TYPE_ERROR,
284 "Failed to create zone iterator\n");
285 GNUNET_break(0);
286 res = 2;
287 GNUNET_SCHEDULER_shutdown();
288 return;
289 }
290 } 289 }
290 }
291} 291}
292 292
293 293
294static struct GNUNET_GNSRECORD_Data * 294static struct GNUNET_GNSRECORD_Data *
295create_record(unsigned int count) 295create_record (unsigned int count)
296{ 296{
297 struct GNUNET_GNSRECORD_Data *rd; 297 struct GNUNET_GNSRECORD_Data *rd;
298 298
299 rd = GNUNET_new_array(count, 299 rd = GNUNET_new_array (count,
300 struct GNUNET_GNSRECORD_Data); 300 struct GNUNET_GNSRECORD_Data);
301 for (unsigned int c = 0; c < count; c++) 301 for (unsigned int c = 0; c < count; c++)
302 { 302 {
303 rd[c].expiration_time = GNUNET_TIME_relative_to_absolute(GNUNET_TIME_UNIT_HOURS).abs_value_us; 303 rd[c].expiration_time = GNUNET_TIME_relative_to_absolute (
304 rd[c].record_type = TEST_RECORD_TYPE; 304 GNUNET_TIME_UNIT_HOURS).abs_value_us;
305 rd[c].data_size = 50; 305 rd[c].record_type = TEST_RECORD_TYPE;
306 rd[c].data = GNUNET_malloc(50); 306 rd[c].data_size = 50;
307 rd[c].flags = 0; 307 rd[c].data = GNUNET_malloc (50);
308 memset((char *)rd[c].data, 'a', 50); 308 rd[c].flags = 0;
309 } 309 memset ((char *) rd[c].data, 'a', 50);
310 }
310 return rd; 311 return rd;
311} 312}
312 313
@@ -317,114 +318,114 @@ create_record(unsigned int count)
317 * start the actual tests by filling the zone. 318 * start the actual tests by filling the zone.
318 */ 319 */
319static void 320static void
320empty_zone_proc(void *cls, 321empty_zone_proc (void *cls,
321 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, 322 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
322 const char *label, 323 const char *label,
323 unsigned int rd_count, 324 unsigned int rd_count,
324 const struct GNUNET_GNSRECORD_Data *rd) 325 const struct GNUNET_GNSRECORD_Data *rd)
325{ 326{
326 GNUNET_assert(nsh == cls); 327 GNUNET_assert (nsh == cls);
327 if (NULL != zone) 328 if (NULL != zone)
328 { 329 {
329 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, 330 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
330 _("Expected empty zone but received zone private key\n")); 331 _ ("Expected empty zone but received zone private key\n"));
331 GNUNET_break(0); 332 GNUNET_break (0);
332 res = 2; 333 res = 2;
333 GNUNET_SCHEDULER_shutdown(); 334 GNUNET_SCHEDULER_shutdown ();
334 return; 335 return;
335 } 336 }
336 if ((NULL != label) || (NULL != rd) || (0 != rd_count)) 337 if ((NULL != label) || (NULL != rd) || (0 != rd_count))
337 { 338 {
338 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, 339 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
339 _("Expected no zone content but received data\n")); 340 _ ("Expected no zone content but received data\n"));
340 GNUNET_break(0); 341 GNUNET_break (0);
341 res = 2; 342 res = 2;
342 GNUNET_SCHEDULER_shutdown(); 343 GNUNET_SCHEDULER_shutdown ();
343 return; 344 return;
344 } 345 }
345 GNUNET_assert(0); 346 GNUNET_assert (0);
346} 347}
347 348
348 349
349static void 350static void
350empty_zone_proc_end(void *cls) 351empty_zone_proc_end (void *cls)
351{ 352{
352 zi = NULL; 353 zi = NULL;
353 privkey = GNUNET_CRYPTO_ecdsa_key_create(); 354 privkey = GNUNET_CRYPTO_ecdsa_key_create ();
354 GNUNET_assert(privkey != NULL); 355 GNUNET_assert (privkey != NULL);
355 privkey2 = GNUNET_CRYPTO_ecdsa_key_create(); 356 privkey2 = GNUNET_CRYPTO_ecdsa_key_create ();
356 GNUNET_assert(privkey2 != NULL); 357 GNUNET_assert (privkey2 != NULL);
357 358
358 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 359 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
359 "Created record 1\n"); 360 "Created record 1\n");
360 GNUNET_asprintf(&s_name_1, 361 GNUNET_asprintf (&s_name_1,
361 "dummy1"); 362 "dummy1");
362 s_rd_1 = create_record(1); 363 s_rd_1 = create_record (1);
363 GNUNET_NAMESTORE_records_store(nsh, 364 GNUNET_NAMESTORE_records_store (nsh,
364 privkey, 365 privkey,
365 s_name_1, 366 s_name_1,
366 1, 367 1,
367 s_rd_1, 368 s_rd_1,
368 &put_cont, 369 &put_cont,
369 NULL); 370 NULL);
370 371
371 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 372 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
372 "Created record 2 \n"); 373 "Created record 2 \n");
373 GNUNET_asprintf(&s_name_2, 374 GNUNET_asprintf (&s_name_2,
374 "dummy2"); 375 "dummy2");
375 s_rd_2 = create_record(1); 376 s_rd_2 = create_record (1);
376 GNUNET_NAMESTORE_records_store(nsh, 377 GNUNET_NAMESTORE_records_store (nsh,
377 privkey, 378 privkey,
378 s_name_2, 379 s_name_2,
379 1, 380 1,
380 s_rd_2, 381 s_rd_2,
381 &put_cont, 382 &put_cont,
382 NULL); 383 NULL);
383 384
384 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 385 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
385 "Created record 3\n"); 386 "Created record 3\n");
386 387
387 /* name in different zone */ 388 /* name in different zone */
388 GNUNET_asprintf(&s_name_3, 389 GNUNET_asprintf (&s_name_3,
389 "dummy3"); 390 "dummy3");
390 s_rd_3 = create_record(1); 391 s_rd_3 = create_record (1);
391 GNUNET_NAMESTORE_records_store(nsh, 392 GNUNET_NAMESTORE_records_store (nsh,
392 privkey2, 393 privkey2,
393 s_name_3, 394 s_name_3,
394 1, s_rd_3, 395 1, s_rd_3,
395 &put_cont, 396 &put_cont,
396 NULL); 397 NULL);
397} 398}
398 399
399 400
400static void 401static void
401run(void *cls, 402run (void *cls,
402 const struct GNUNET_CONFIGURATION_Handle *cfg, 403 const struct GNUNET_CONFIGURATION_Handle *cfg,
403 struct GNUNET_TESTING_Peer *peer) 404 struct GNUNET_TESTING_Peer *peer)
404{ 405{
405 GNUNET_SCHEDULER_add_shutdown(&end, 406 GNUNET_SCHEDULER_add_shutdown (&end,
406 NULL); 407 NULL);
407 endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, 408 endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
408 &endbadly, 409 &endbadly,
409 NULL); 410 NULL);
410 nsh = GNUNET_NAMESTORE_connect(cfg); 411 nsh = GNUNET_NAMESTORE_connect (cfg);
411 GNUNET_break(NULL != nsh); 412 GNUNET_break (NULL != nsh);
412 /* first, iterate over empty namestore */ 413 /* first, iterate over empty namestore */
413 zi = GNUNET_NAMESTORE_zone_iteration_start(nsh, 414 zi = GNUNET_NAMESTORE_zone_iteration_start (nsh,
414 NULL, 415 NULL,
415 &fail_cb, 416 &fail_cb,
416 NULL, 417 NULL,
417 &empty_zone_proc, 418 &empty_zone_proc,
418 nsh, 419 nsh,
419 &empty_zone_proc_end, 420 &empty_zone_proc_end,
420 nsh); 421 nsh);
421 if (NULL == zi) 422 if (NULL == zi)
422 { 423 {
423 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, 424 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
424 "Failed to create zone iterator\n"); 425 "Failed to create zone iterator\n");
425 GNUNET_break(0); 426 GNUNET_break (0);
426 GNUNET_SCHEDULER_shutdown(); 427 GNUNET_SCHEDULER_shutdown ();
427 } 428 }
428} 429}
429 430
430 431
@@ -432,24 +433,25 @@ run(void *cls,
432 433
433 434
434int 435int
435main(int argc, char *argv[]) 436main (int argc, char *argv[])
436{ 437{
437 const char *plugin_name; 438 const char *plugin_name;
438 char *cfg_name; 439 char *cfg_name;
439 440
440 SETUP_CFG(plugin_name, cfg_name); 441 SETUP_CFG (plugin_name, cfg_name);
441 res = 1; 442 res = 1;
442 if (0 != 443 if (0 !=
443 GNUNET_TESTING_peer_run("test-namestore-api-zone-iteration-specific-zone", 444 GNUNET_TESTING_peer_run (
444 cfg_name, 445 "test-namestore-api-zone-iteration-specific-zone",
445 &run, 446 cfg_name,
446 NULL)) 447 &run,
447 { 448 NULL))
448 res = 1; 449 {
449 } 450 res = 1;
450 GNUNET_DISK_purge_cfg_dir(cfg_name, 451 }
451 "GNUNET_TEST_HOME"); 452 GNUNET_DISK_purge_cfg_dir (cfg_name,
452 GNUNET_free(cfg_name); 453 "GNUNET_TEST_HOME");
454 GNUNET_free (cfg_name);
453 return res; 455 return res;
454} 456}
455 457