From 55942930db8ad9c07d1ee5878bdb414495743c7f Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Thu, 28 Nov 2013 08:10:19 +0000 Subject: - Tests did not clean up: TEST_HOME with namestore db was not removed after test Therefore test_namestore_api_remove_not_existing_record passed when executed on a clean system, but failed if ran after a previous test adding a record - remove unused file namestore/test_namestore_api_put.c --- src/namestore/test_namestore_api_remove_not_existing_record.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/namestore/test_namestore_api_remove_not_existing_record.c') diff --git a/src/namestore/test_namestore_api_remove_not_existing_record.c b/src/namestore/test_namestore_api_remove_not_existing_record.c index d1a664b17..c3afee6ff 100644 --- a/src/namestore/test_namestore_api_remove_not_existing_record.c +++ b/src/namestore/test_namestore_api_remove_not_existing_record.c @@ -46,6 +46,7 @@ static int res; static struct GNUNET_NAMESTORE_QueueEntry *nsqe; +static char *directory; static void cleanup () @@ -60,6 +61,11 @@ cleanup () GNUNET_free (privkey); privkey = NULL; } + if (NULL != directory) + { + GNUNET_DISK_directory_remove (directory); + GNUNET_free (directory); + } GNUNET_SCHEDULER_shutdown (); } @@ -133,6 +139,9 @@ run (void *cls, char *hostkey_file; const char * name = "dummy.dummy.gnunet"; + directory = NULL; + GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); + endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &endbadly, NULL); GNUNET_asprintf (&hostkey_file, -- cgit v1.2.3