diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-02-24 10:28:16 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-02-24 10:28:16 +0100 |
commit | 0b5dc8a620fca8dbca9c122594b70267e404859f (patch) | |
tree | 71166165545fcd77ee36bba8eaec45f7bac62da9 /src/namestore/test_namestore_api_zone_iteration.c | |
parent | 4577873dccd43d132062ae3c07e316c86be6af2f (diff) | |
download | gnunet-0b5dc8a620fca8dbca9c122594b70267e404859f.tar.gz gnunet-0b5dc8a620fca8dbca9c122594b70267e404859f.zip |
avoid failing hard if 'gnunetcheck' db does not exist
(or plugins cannot be loaded for other reasons)
Diffstat (limited to 'src/namestore/test_namestore_api_zone_iteration.c')
-rw-r--r-- | src/namestore/test_namestore_api_zone_iteration.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c index d09505db1..fa641954b 100644 --- a/src/namestore/test_namestore_api_zone_iteration.c +++ b/src/namestore/test_namestore_api_zone_iteration.c | |||
@@ -98,9 +98,9 @@ end (void *cls) | |||
98 | GNUNET_free (privkey2); | 98 | GNUNET_free (privkey2); |
99 | privkey2 = NULL; | 99 | privkey2 = NULL; |
100 | } | 100 | } |
101 | GNUNET_free (s_name_1); | 101 | GNUNET_free_non_null (s_name_1); |
102 | GNUNET_free (s_name_2); | 102 | GNUNET_free_non_null (s_name_2); |
103 | GNUNET_free (s_name_3); | 103 | GNUNET_free_non_null (s_name_3); |
104 | if (NULL != s_rd_1) | 104 | if (NULL != s_rd_1) |
105 | { | 105 | { |
106 | GNUNET_free ((void *)s_rd_1->data); | 106 | GNUNET_free ((void *)s_rd_1->data); |
@@ -466,18 +466,16 @@ run (void *cls, | |||
466 | } | 466 | } |
467 | 467 | ||
468 | 468 | ||
469 | #include "test_common.c" | ||
470 | |||
471 | |||
469 | int | 472 | int |
470 | main (int argc, char *argv[]) | 473 | main (int argc, char *argv[]) |
471 | { | 474 | { |
472 | const char *plugin_name; | 475 | const char *plugin_name; |
473 | char *cfg_name; | 476 | char *cfg_name; |
474 | 477 | ||
475 | plugin_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]); | 478 | SETUP_CFG (plugin_name, cfg_name); |
476 | GNUNET_asprintf (&cfg_name, | ||
477 | "test_namestore_api_%s.conf", | ||
478 | plugin_name); | ||
479 | GNUNET_DISK_purge_cfg_dir (cfg_name, | ||
480 | "GNUNET_TEST_HOME"); | ||
481 | res = 1; | 479 | res = 1; |
482 | if (0 != | 480 | if (0 != |
483 | GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration", | 481 | GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration", |