diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-02-24 13:04:36 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-02-24 13:04:36 +0100 |
commit | 3a3088b2704eec5858c1b36ac990ca6c6a15d646 (patch) | |
tree | d1e95b9d4692be1cd2fb136e8dd98a0f38f2fb4c /src/namestore/test_namestore_api_zone_iteration_specific_zone.c | |
parent | c1f87d457fa51d9d85f5b35f808b802fa14088bb (diff) | |
download | gnunet-3a3088b2704eec5858c1b36ac990ca6c6a15d646.tar.gz gnunet-3a3088b2704eec5858c1b36ac990ca6c6a15d646.zip |
more code cleanup, better error handing in tests
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.c | 16 |
1 files changed, 7 insertions, 9 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 0be9bab98..cbcd94cd5 100644 --- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c +++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.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 (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); |
@@ -429,19 +429,17 @@ run (void *cls, | |||
429 | } | 429 | } |
430 | 430 | ||
431 | 431 | ||
432 | #include "test_common.c" | ||
433 | |||
434 | |||
432 | int | 435 | int |
433 | main (int argc, char *argv[]) | 436 | main (int argc, char *argv[]) |
434 | { | 437 | { |
435 | const char *plugin_name; | 438 | const char *plugin_name; |
436 | char *cfg_name; | 439 | char *cfg_name; |
437 | 440 | ||
438 | plugin_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]); | 441 | SETUP_CFG (plugin_name, cfg_name); |
439 | GNUNET_asprintf (&cfg_name, | ||
440 | "test_namestore_api_%s.conf", | ||
441 | plugin_name); | ||
442 | res = 1; | 442 | res = 1; |
443 | GNUNET_DISK_purge_cfg_dir (cfg_name, | ||
444 | "GNUNET_TEST_HOME"); | ||
445 | if (0 != | 443 | if (0 != |
446 | GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration-specific-zone", | 444 | GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration-specific-zone", |
447 | cfg_name, | 445 | cfg_name, |