2 This file is part of GNUnet.
3 (C) 2009 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
21 * @file gns/test_gns_pseu_shorten.c
22 * @brief base testcase for testing on the fly pseu import and shorten
26 #include "gnunet_testing_lib.h"
27 #include "gnunet_core_service.h"
28 #include "block_gns.h"
29 #include "gnunet_signatures.h"
30 #include "gnunet_namestore_service.h"
31 #include "../namestore/namestore.h"
32 #include "gnunet_dnsparser_lib.h"
33 #include "gnunet_dht_service.h"
34 #include "gnunet_gns_service.h"
37 #define VERBOSE GNUNET_YES
39 /* Timeout for entire testcase */
40 #define TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 5)
42 /* If number of peers not in config file, use this number */
43 #define DEFAULT_NUM_PEERS 2
45 /* test records to resolve */
46 #define TEST_DOMAIN "www.alicewonderland.bobbuilder.gnunet"
47 #define TEST_IP "127.0.0.1"
48 #define TEST_RECORD_NAME "www"
50 #define TEST_PRIVATE_ZONE "private"
51 #define TEST_SHORTEN_ZONE "short"
52 #define TEST_AUTHORITY_BOB "bobbuilder"
53 #define TEST_AUTHORITY_ALICE "alicewonderland"
54 #define TEST_PSEU_ALICE "carol"
55 #define TEST_EXPECTED_RESULT "www.carol.short.private.gnunet"
57 #define DHT_OPERATION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30)
59 #define KEYFILE_SHORTEN = "zonefiles/188JSUMKEF25GVU8TTV0PBNNN8JVCPUEDFV1UHJJU884JD25V0T0.zkey"
60 #define KEYFILE_PRIVATE = "zonefiles/OEFL7A4VEF1B40QLEMTG5D8G1CN6EN16QUSG5R2DT71GRJN34LSG.zkey"
61 #define KEYFILE_BOB "../namestore/zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey"
62 #define KEYFILE_ALICE "../namestore/zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"
67 * Directory to store temp data in, defined in config file
69 static char *test_directory;
71 static struct GNUNET_TESTING_PeerGroup *pg;
73 /* Task handle to use to schedule test failure */
74 static GNUNET_SCHEDULER_TaskIdentifier die_task;
76 static GNUNET_SCHEDULER_TaskIdentifier disco_task;
78 /* Global return value (0 for success, anything else for failure) */
81 static struct GNUNET_NAMESTORE_Handle *namestore_handle;
83 static struct GNUNET_GNS_Handle *gns_handle;
85 static struct GNUNET_DHT_Handle *dht_handle;
87 const struct GNUNET_CONFIGURATION_Handle *cfg;
89 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey;
90 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded bob_pkey;
91 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded our_pkey;
92 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded priv_pkey;
93 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded short_pkey;
94 struct GNUNET_CRYPTO_RsaPrivateKey *alice_key;
95 struct GNUNET_CRYPTO_RsaPrivateKey *bob_key;
96 struct GNUNET_CRYPTO_RsaPrivateKey *our_key;
97 struct GNUNET_CRYPTO_RsaPrivateKey *priv_key;
98 struct GNUNET_CRYPTO_RsaPrivateKey *short_key;
99 struct GNUNET_CRYPTO_ShortHashCode alice_hash;
100 struct GNUNET_CRYPTO_ShortHashCode bob_hash;
101 struct GNUNET_CRYPTO_ShortHashCode our_zone;
102 struct GNUNET_CRYPTO_ShortHashCode priv_zone;
103 struct GNUNET_CRYPTO_ShortHashCode short_zone;
106 * Check whether peers successfully shut down.
109 shutdown_callback (void *cls, const char *emsg)
111 if (disco_task != GNUNET_SCHEDULER_NO_TASK)
113 disco_task = GNUNET_SCHEDULER_NO_TASK;
114 GNUNET_SCHEDULER_cancel(disco_task);
115 GNUNET_DHT_disconnect(dht_handle);
121 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Error on shutdown! ret=%d\n", ok);
126 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "done(ret=%d)!\n", ok);
130 disco_dht(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
132 disco_task = GNUNET_SCHEDULER_NO_TASK;
133 GNUNET_DHT_disconnect(dht_handle);
138 * Called when gns shorten finishes
141 process_shorten_result(void* cls, const char* sname)
143 GNUNET_GNS_disconnect(gns_handle);
144 //GNUNET_SCHEDULER_add_now(disco_dht, NULL);
149 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
150 "shorten test failed!\n");
155 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
156 "%s shortened to %s\n", (char*)cls, sname);
157 if (0 != strcmp(sname, TEST_EXPECTED_RESULT))
159 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
160 "shorten test failed! (wanted: %s got: %s\n",
165 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "shorten test succeeded!\n");
168 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down peer1!\n");
169 GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
173 do_shorten(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
175 GNUNET_GNS_shorten_zone (gns_handle, TEST_DOMAIN,
177 &process_shorten_result,
182 on_lookup_result(void *cls, uint32_t rd_count,
183 const struct GNUNET_NAMESTORE_RecordData *rd)
191 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
192 "Lookup failed, rp_filtering?\n");
198 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "name: %s\n", (char*)cls);
199 for (i=0; i<rd_count; i++)
201 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "type: %d\n", rd[i].record_type);
202 if (rd[i].record_type == GNUNET_GNS_RECORD_TYPE_A)
204 memcpy(&a, rd[i].data, sizeof(a));
206 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "address: %s\n", addr);
207 if (0 == strcmp(addr, TEST_IP))
209 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
210 "%s correctly resolved to %s!\n", TEST_DOMAIN, addr);
216 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "No resolution!\n");
221 GNUNET_SCHEDULER_add_delayed (TIMEOUT, &do_shorten, NULL);
226 * Function scheduled to be run on the successful start of services
227 * tries to look up the dns record for TEST_DOMAIN
230 commence_testing (void *cls, int success)
232 GNUNET_SCHEDULER_add_now(disco_dht, NULL);
233 //GNUNET_DHT_disconnect(dht_handle);
235 GNUNET_CRYPTO_rsa_key_free(our_key);
236 GNUNET_CRYPTO_rsa_key_free(bob_key);
237 GNUNET_CRYPTO_rsa_key_free(alice_key);
239 gns_handle = GNUNET_GNS_connect(cfg);
241 if (NULL == gns_handle)
243 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
244 "Failed to connect to GNS!\n");
247 GNUNET_GNS_lookup_zone (gns_handle, TEST_DOMAIN,
249 GNUNET_GNS_RECORD_TYPE_A,
252 &on_lookup_result, TEST_DOMAIN);
256 * Continuation for the GNUNET_DHT_get_stop call, so that we don't shut
257 * down the peers without freeing memory associated with GET request.
260 end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
262 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failing test with error: `%s'!\n",
266 if (disco_task != GNUNET_SCHEDULER_NO_TASK)
268 disco_task = GNUNET_SCHEDULER_NO_TASK;
269 GNUNET_SCHEDULER_cancel(disco_task);
270 GNUNET_DHT_disconnect(dht_handle);
274 GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
275 GNUNET_SCHEDULER_cancel (die_task);
279 put_pseu_dht(void *cls, int success)
281 struct GNSNameRecordBlock *nrb;
282 struct GNUNET_CRYPTO_ShortHashCode name_hash;
283 struct GNUNET_CRYPTO_ShortHashCode zone_hash;
284 struct GNUNET_HashCode xor_hash;
285 struct GNUNET_HashCode name_hash_double;
286 struct GNUNET_HashCode zone_hash_double;
287 uint32_t rd_payload_length;
288 char* nrb_data = NULL;
289 struct GNUNET_CRYPTO_RsaSignature *sig;
290 struct GNUNET_NAMESTORE_RecordData rd;
292 rd.expiration_time = UINT64_MAX;
293 rd.data_size = strlen(TEST_PSEU_ALICE)+1;
294 rd.data = TEST_PSEU_ALICE;
295 rd.record_type = GNUNET_GNS_RECORD_PSEU;
297 sig = GNUNET_NAMESTORE_create_signature(alice_key,
298 GNUNET_TIME_UNIT_FOREVER_ABS,
301 rd_payload_length = GNUNET_NAMESTORE_records_get_size (1, &rd);
302 nrb = GNUNET_malloc(rd_payload_length + strlen("+") + 1
303 + sizeof(struct GNSNameRecordBlock));
304 nrb->signature = *sig;
305 nrb->public_key = alice_pkey;
306 nrb->rd_count = htonl(1);
307 memset(&nrb[1], 0, strlen("+") + 1);
308 strcpy((char*)&nrb[1], "+");
309 nrb_data = (char*)&nrb[1];
310 nrb_data += strlen("+") + 1;
312 if (-1 == GNUNET_NAMESTORE_records_serialize (1,
317 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Record serialization failed!\n");
319 GNUNET_DHT_disconnect(dht_handle);
322 GNUNET_CRYPTO_rsa_key_free(our_key);
323 GNUNET_CRYPTO_rsa_key_free(bob_key);
324 GNUNET_CRYPTO_rsa_key_free(alice_key);
329 GNUNET_CRYPTO_short_hash("+", strlen("+"), &name_hash);
330 GNUNET_CRYPTO_short_hash(&alice_pkey,
331 sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
334 GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double);
335 GNUNET_CRYPTO_short_hash_double(&zone_hash, &zone_hash_double);
336 GNUNET_CRYPTO_hash_xor(&zone_hash_double, &name_hash_double, &xor_hash);
338 rd_payload_length += sizeof(struct GNSNameRecordBlock) +
341 GNUNET_DHT_put (dht_handle, &xor_hash,
344 GNUNET_BLOCK_TYPE_GNS_NAMERECORD,
347 GNUNET_TIME_UNIT_FOREVER_ABS,
348 DHT_OPERATION_TIMEOUT,
357 put_www_dht(void *cls, int success)
359 struct GNSNameRecordBlock *nrb;
360 struct GNUNET_CRYPTO_ShortHashCode name_hash;
361 struct GNUNET_CRYPTO_ShortHashCode zone_hash;
362 struct GNUNET_HashCode xor_hash;
363 struct GNUNET_HashCode name_hash_double;
364 struct GNUNET_HashCode zone_hash_double;
365 uint32_t rd_payload_length;
366 char* nrb_data = NULL;
367 struct GNUNET_CRYPTO_RsaSignature *sig;
368 struct GNUNET_NAMESTORE_RecordData rd;
370 struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr));
372 rd.expiration_time = UINT64_MAX;
373 GNUNET_assert(1 == inet_pton (AF_INET, ip, web));
374 rd.data_size = sizeof(struct in_addr);
376 rd.record_type = GNUNET_DNSPARSER_TYPE_A;
378 sig = GNUNET_NAMESTORE_create_signature(alice_key,
379 GNUNET_TIME_UNIT_FOREVER_ABS,
382 rd_payload_length = GNUNET_NAMESTORE_records_get_size (1, &rd);
383 nrb = GNUNET_malloc(rd_payload_length + strlen(TEST_RECORD_NAME) + 1
384 + sizeof(struct GNSNameRecordBlock));
385 nrb->signature = *sig;
386 nrb->public_key = alice_pkey;
387 nrb->rd_count = htonl(1);
388 memset(&nrb[1], 0, strlen(TEST_RECORD_NAME) + 1);
389 strcpy((char*)&nrb[1], TEST_RECORD_NAME);
390 nrb_data = (char*)&nrb[1];
391 nrb_data += strlen(TEST_RECORD_NAME) + 1;
393 if (-1 == GNUNET_NAMESTORE_records_serialize (1,
398 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Record serialization failed!\n");
400 GNUNET_DHT_disconnect(dht_handle);
402 GNUNET_CRYPTO_rsa_key_free(our_key);
403 GNUNET_CRYPTO_rsa_key_free(bob_key);
404 GNUNET_CRYPTO_rsa_key_free(alice_key);
409 GNUNET_CRYPTO_short_hash(TEST_RECORD_NAME, strlen(TEST_RECORD_NAME), &name_hash);
410 GNUNET_CRYPTO_short_hash(&alice_pkey,
411 sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
413 GNUNET_CRYPTO_short_hash_double(&zone_hash, &zone_hash_double);
414 GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double);
415 GNUNET_CRYPTO_hash_xor(&zone_hash_double, &name_hash_double, &xor_hash);
417 rd_payload_length += sizeof(struct GNSNameRecordBlock) +
418 strlen(TEST_RECORD_NAME) + 1;
420 GNUNET_DHT_put (dht_handle, &xor_hash,
423 GNUNET_BLOCK_TYPE_GNS_NAMERECORD,
426 GNUNET_TIME_UNIT_FOREVER_ABS,
427 DHT_OPERATION_TIMEOUT,
437 put_pkey_dht(void *cls, int32_t success, const char *emsg)
439 struct GNSNameRecordBlock *nrb;
440 struct GNUNET_CRYPTO_ShortHashCode name_hash;
441 struct GNUNET_CRYPTO_ShortHashCode zone_hash;
442 struct GNUNET_HashCode xor_hash;
443 struct GNUNET_HashCode name_hash_double;
444 struct GNUNET_HashCode zone_hash_double;
445 uint32_t rd_payload_length;
446 char* nrb_data = NULL;
447 struct GNUNET_CRYPTO_RsaSignature *sig;
448 struct GNUNET_NAMESTORE_RecordData rd;
450 rd.expiration_time = UINT64_MAX;
451 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
452 rd.data = &alice_hash;
453 rd.record_type = GNUNET_GNS_RECORD_PKEY;
455 sig = GNUNET_NAMESTORE_create_signature(bob_key,
456 GNUNET_TIME_UNIT_FOREVER_ABS,
457 TEST_AUTHORITY_ALICE,
461 rd_payload_length = GNUNET_NAMESTORE_records_get_size (1, &rd);
462 nrb = GNUNET_malloc(rd_payload_length + strlen(TEST_AUTHORITY_ALICE) + 1
463 + sizeof(struct GNSNameRecordBlock));
464 nrb->signature = *sig;
465 nrb->public_key = bob_pkey;
466 nrb->rd_count = htonl(1);
467 memset(&nrb[1], 0, strlen(TEST_AUTHORITY_ALICE) + 1);
468 strcpy((char*)&nrb[1], TEST_AUTHORITY_ALICE);
469 nrb_data = (char*)&nrb[1];
470 nrb_data += strlen(TEST_AUTHORITY_ALICE) + 1;
472 if (-1 == GNUNET_NAMESTORE_records_serialize (1,
477 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Record serialization failed!\n");
480 GNUNET_CRYPTO_rsa_key_free(our_key);
481 GNUNET_CRYPTO_rsa_key_free(bob_key);
482 GNUNET_CRYPTO_rsa_key_free(alice_key);
489 GNUNET_CRYPTO_short_hash(TEST_AUTHORITY_ALICE,
490 strlen(TEST_AUTHORITY_ALICE), &name_hash);
491 GNUNET_CRYPTO_short_hash(&bob_pkey,
492 sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
494 GNUNET_CRYPTO_short_hash_double(&zone_hash, &zone_hash_double);
495 GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double);
496 GNUNET_CRYPTO_hash_xor(&zone_hash_double, &name_hash_double, &xor_hash);
498 rd_payload_length += sizeof(struct GNSNameRecordBlock) +
499 strlen(TEST_AUTHORITY_ALICE) + 1;
500 GNUNET_DHT_put (dht_handle, &xor_hash,
503 GNUNET_BLOCK_TYPE_GNS_NAMERECORD,
506 GNUNET_TIME_UNIT_FOREVER_ABS,
507 DHT_OPERATION_TIMEOUT,
510 GNUNET_NAMESTORE_disconnect(namestore_handle, GNUNET_NO);
515 fin_init_zone (void *cls, int32_t success, const char *emsg)
517 struct GNUNET_NAMESTORE_RecordData rd;
518 rd.expiration_time = UINT64_MAX;
519 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
521 rd.record_type = GNUNET_GNS_RECORD_PKEY;
523 GNUNET_NAMESTORE_record_create (namestore_handle,
533 cont_init_zone (void *cls, int32_t success, const char *emsg)
536 struct GNUNET_NAMESTORE_RecordData rd;
537 rd.expiration_time = UINT64_MAX;
538 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
539 rd.data = &short_zone;
540 rd.record_type = GNUNET_GNS_RECORD_PKEY;
542 GNUNET_NAMESTORE_record_create (namestore_handle,
551 do_lookup (void *cls, const struct GNUNET_PeerIdentity *id,
552 const struct GNUNET_CONFIGURATION_Handle *_cfg,
553 struct GNUNET_TESTING_Daemon *d, const char *emsg)
556 char* private_keyfile;
557 char* shorten_keyfile;
562 GNUNET_SCHEDULER_cancel (die_task);
564 /* put records into namestore */
565 namestore_handle = GNUNET_NAMESTORE_connect(cfg);
566 if (NULL == namestore_handle)
568 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to namestore\n");
574 dht_handle = GNUNET_DHT_connect(cfg, 1);
575 if (NULL == dht_handle)
577 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to dht\n");
582 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns",
586 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to get key from cfg\n");
591 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns",
595 GNUNET_log(GNUNET_ERROR_TYPE_ERROR,
596 "Failed to get shorten zone key from cfg\n");
601 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns",
605 GNUNET_log(GNUNET_ERROR_TYPE_ERROR,
606 "Failed to get private zone key from cfg\n");
610 our_key = GNUNET_CRYPTO_rsa_key_create_from_file (our_keyfile);
611 priv_key = GNUNET_CRYPTO_rsa_key_create_from_file (private_keyfile);
612 short_key = GNUNET_CRYPTO_rsa_key_create_from_file (shorten_keyfile);
613 bob_key = GNUNET_CRYPTO_rsa_key_create_from_file (KEYFILE_BOB);
614 alice_key = GNUNET_CRYPTO_rsa_key_create_from_file (KEYFILE_ALICE);
616 GNUNET_free(our_keyfile);
617 GNUNET_free(shorten_keyfile);
618 GNUNET_free(private_keyfile);
620 GNUNET_CRYPTO_rsa_key_get_public (our_key, &our_pkey);
621 GNUNET_CRYPTO_rsa_key_get_public (priv_key, &priv_pkey);
622 GNUNET_CRYPTO_rsa_key_get_public (short_key, &short_pkey);
623 GNUNET_CRYPTO_rsa_key_get_public (bob_key, &bob_pkey);
624 GNUNET_CRYPTO_rsa_key_get_public (alice_key, &alice_pkey);
625 GNUNET_CRYPTO_short_hash(&bob_pkey, sizeof(bob_pkey), &bob_hash);
626 GNUNET_CRYPTO_short_hash(&alice_pkey, sizeof(alice_pkey), &alice_hash);
627 GNUNET_CRYPTO_short_hash(&our_pkey, sizeof(our_pkey), &our_zone);
628 GNUNET_CRYPTO_short_hash(&priv_pkey, sizeof(priv_pkey), &priv_zone);
629 GNUNET_CRYPTO_short_hash(&short_pkey, sizeof(short_pkey), &short_zone);
631 struct GNUNET_NAMESTORE_RecordData rd;
632 rd.expiration_time = UINT64_MAX;
633 rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
634 rd.data = &priv_zone;
635 rd.record_type = GNUNET_GNS_RECORD_PKEY;
637 GNUNET_NAMESTORE_record_create (namestore_handle,
650 run (void *cls, char *const *args, const char *cfgfile,
651 const struct GNUNET_CONFIGURATION_Handle *c)
654 /* Get path from configuration file */
656 GNUNET_CONFIGURATION_get_value_string (cfg, "paths", "servicehome",
664 /* Set up a task to end testing if peer start fails */
666 GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly,
667 "didn't start all daemons in reasonable amount of time!!!");
670 //d1 = GNUNET_TESTING_daemon_start(cfg, TIMEOUT, GNUNET_NO, NULL, NULL, 0,
671 // NULL, NULL, NULL, &do_lookup, NULL);
672 pg = GNUNET_TESTING_daemons_start(cfg, 1, 1, 1, TIMEOUT,
673 NULL, NULL, &do_lookup, NULL,
682 /* Arguments for GNUNET_PROGRAM_run */
683 char *const argv[] = { "test-gns-pseu-shorten", /* Name to give running binary */
685 "test_gns_simple_lookup.conf", /* Config file to use */
691 struct GNUNET_GETOPT_CommandLineOption options[] = {
692 GNUNET_GETOPT_OPTION_END
694 /* Run the run function as a new program */
696 GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv,
697 "test-gns-pseu-shorten", "nohelp", options, &run,
699 if (ret != GNUNET_OK)
701 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
702 "`test-gns-pseu-shorten': Failed with error code %d\n", ret);
708 main (int argc, char *argv[])
712 GNUNET_log_setup ("test-gns-pseu-shorten",
721 * Need to remove base directory, subdirectories taken care
722 * of by the testing framework.
727 /* end of test_gns_twopeer.c */