diff options
author | LRN <lrn1986@gmail.com> | 2013-12-09 17:53:31 +0000 |
---|---|---|
committer | LRN <lrn1986@gmail.com> | 2013-12-09 17:53:31 +0000 |
commit | cc57e1d42bbfee97247ad7ea1db3fa81ecbf2c08 (patch) | |
tree | a1239bef1cb83eed339459d24dad5e69f27c8aa1 | |
parent | 2d828dcdcd023b9361b11491254d08f122c142b1 (diff) | |
download | gnunet-cc57e1d42bbfee97247ad7ea1db3fa81ecbf2c08.tar.gz gnunet-cc57e1d42bbfee97247ad7ea1db3fa81ecbf2c08.zip |
Remove test home at the beginning and at the VERY end
16 files changed, 144 insertions, 123 deletions
diff --git a/src/namestore/test_namestore_api_lookup_nick.c b/src/namestore/test_namestore_api_lookup_nick.c index 9cefc8a13..093fa17ed 100644 --- a/src/namestore/test_namestore_api_lookup_nick.c +++ b/src/namestore/test_namestore_api_lookup_nick.c | |||
@@ -68,11 +68,6 @@ cleanup () | |||
68 | GNUNET_free (privkey); | 68 | GNUNET_free (privkey); |
69 | privkey = NULL; | 69 | privkey = NULL; |
70 | } | 70 | } |
71 | if (NULL != directory) | ||
72 | { | ||
73 | GNUNET_DISK_directory_remove (directory); | ||
74 | GNUNET_free (directory); | ||
75 | } | ||
76 | GNUNET_SCHEDULER_shutdown (); | 71 | GNUNET_SCHEDULER_shutdown (); |
77 | } | 72 | } |
78 | 73 | ||
@@ -276,6 +271,7 @@ run (void *cls, | |||
276 | 271 | ||
277 | directory = NULL; | 272 | directory = NULL; |
278 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | 273 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); |
274 | GNUNET_DISK_directory_remove (directory); | ||
279 | 275 | ||
280 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 276 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
281 | &endbadly, NULL); | 277 | &endbadly, NULL); |
@@ -310,7 +306,14 @@ main (int argc, char *argv[]) | |||
310 | "test_namestore_api.conf", | 306 | "test_namestore_api.conf", |
311 | &run, | 307 | &run, |
312 | NULL)) | 308 | NULL)) |
313 | return 1; | 309 | { |
310 | res = 1; | ||
311 | } | ||
312 | if (NULL != directory) | ||
313 | { | ||
314 | GNUNET_DISK_directory_remove (directory); | ||
315 | GNUNET_free (directory); | ||
316 | } | ||
314 | return res; | 317 | return res; |
315 | } | 318 | } |
316 | 319 | ||
diff --git a/src/namestore/test_namestore_api_lookup_private.c b/src/namestore/test_namestore_api_lookup_private.c index 398d31475..ca03bf489 100644 --- a/src/namestore/test_namestore_api_lookup_private.c +++ b/src/namestore/test_namestore_api_lookup_private.c | |||
@@ -63,11 +63,6 @@ cleanup () | |||
63 | GNUNET_free (privkey); | 63 | GNUNET_free (privkey); |
64 | privkey = NULL; | 64 | privkey = NULL; |
65 | } | 65 | } |
66 | if (NULL != directory) | ||
67 | { | ||
68 | GNUNET_DISK_directory_remove (directory); | ||
69 | GNUNET_free (directory); | ||
70 | } | ||
71 | GNUNET_SCHEDULER_shutdown (); | 66 | GNUNET_SCHEDULER_shutdown (); |
72 | } | 67 | } |
73 | 68 | ||
@@ -179,6 +174,7 @@ run (void *cls, | |||
179 | 174 | ||
180 | directory = NULL; | 175 | directory = NULL; |
181 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | 176 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); |
177 | GNUNET_DISK_directory_remove (directory); | ||
182 | 178 | ||
183 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 179 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
184 | &endbadly, NULL); | 180 | &endbadly, NULL); |
@@ -222,7 +218,14 @@ main (int argc, char *argv[]) | |||
222 | "test_namestore_api.conf", | 218 | "test_namestore_api.conf", |
223 | &run, | 219 | &run, |
224 | NULL)) | 220 | NULL)) |
225 | return 1; | 221 | { |
222 | res = 1; | ||
223 | } | ||
224 | if (NULL != directory) | ||
225 | { | ||
226 | GNUNET_DISK_directory_remove (directory); | ||
227 | GNUNET_free (directory); | ||
228 | } | ||
226 | return res; | 229 | return res; |
227 | } | 230 | } |
228 | 231 | ||
diff --git a/src/namestore/test_namestore_api_lookup_public.c b/src/namestore/test_namestore_api_lookup_public.c index 096e5e055..2504bc053 100644 --- a/src/namestore/test_namestore_api_lookup_public.c +++ b/src/namestore/test_namestore_api_lookup_public.c | |||
@@ -71,11 +71,6 @@ cleanup () | |||
71 | GNUNET_free (privkey); | 71 | GNUNET_free (privkey); |
72 | privkey = NULL; | 72 | privkey = NULL; |
73 | } | 73 | } |
74 | if (NULL != directory) | ||
75 | { | ||
76 | GNUNET_DISK_directory_remove (directory); | ||
77 | GNUNET_free (directory); | ||
78 | } | ||
79 | GNUNET_SCHEDULER_shutdown (); | 74 | GNUNET_SCHEDULER_shutdown (); |
80 | } | 75 | } |
81 | 76 | ||
@@ -201,6 +196,7 @@ run (void *cls, | |||
201 | 196 | ||
202 | directory = NULL; | 197 | directory = NULL; |
203 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | 198 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); |
199 | GNUNET_DISK_directory_remove (directory); | ||
204 | 200 | ||
205 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 201 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
206 | &endbadly, NULL); | 202 | &endbadly, NULL); |
@@ -247,7 +243,14 @@ main (int argc, char *argv[]) | |||
247 | "test_namestore_api.conf", | 243 | "test_namestore_api.conf", |
248 | &run, | 244 | &run, |
249 | NULL)) | 245 | NULL)) |
250 | return 1; | 246 | { |
247 | res = 1; | ||
248 | } | ||
249 | if (NULL != directory) | ||
250 | { | ||
251 | GNUNET_DISK_directory_remove (directory); | ||
252 | GNUNET_free (directory); | ||
253 | } | ||
251 | return res; | 254 | return res; |
252 | } | 255 | } |
253 | 256 | ||
diff --git a/src/namestore/test_namestore_api_lookup_shadow.c b/src/namestore/test_namestore_api_lookup_shadow.c index e77e9f2df..dde224e1e 100644 --- a/src/namestore/test_namestore_api_lookup_shadow.c +++ b/src/namestore/test_namestore_api_lookup_shadow.c | |||
@@ -73,11 +73,6 @@ cleanup () | |||
73 | GNUNET_free (privkey); | 73 | GNUNET_free (privkey); |
74 | privkey = NULL; | 74 | privkey = NULL; |
75 | } | 75 | } |
76 | if (NULL != directory) | ||
77 | { | ||
78 | GNUNET_DISK_directory_remove (directory); | ||
79 | GNUNET_free (directory); | ||
80 | } | ||
81 | GNUNET_SCHEDULER_shutdown (); | 76 | GNUNET_SCHEDULER_shutdown (); |
82 | } | 77 | } |
83 | 78 | ||
@@ -233,6 +228,7 @@ run (void *cls, | |||
233 | 228 | ||
234 | directory = NULL; | 229 | directory = NULL; |
235 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | 230 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); |
231 | GNUNET_DISK_directory_remove (directory); | ||
236 | 232 | ||
237 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 233 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
238 | &endbadly, NULL); | 234 | &endbadly, NULL); |
@@ -277,7 +273,14 @@ main (int argc, char *argv[]) | |||
277 | "test_namestore_api.conf", | 273 | "test_namestore_api.conf", |
278 | &run, | 274 | &run, |
279 | NULL)) | 275 | NULL)) |
280 | return 1; | 276 | { |
277 | res = 1; | ||
278 | } | ||
279 | if (NULL != directory) | ||
280 | { | ||
281 | GNUNET_DISK_directory_remove (directory); | ||
282 | GNUNET_free (directory); | ||
283 | } | ||
281 | return res; | 284 | return res; |
282 | } | 285 | } |
283 | 286 | ||
diff --git a/src/namestore/test_namestore_api_lookup_shadow_filter.c b/src/namestore/test_namestore_api_lookup_shadow_filter.c index 34d997819..4a5a2c422 100644 --- a/src/namestore/test_namestore_api_lookup_shadow_filter.c +++ b/src/namestore/test_namestore_api_lookup_shadow_filter.c | |||
@@ -86,11 +86,6 @@ cleanup () | |||
86 | GNUNET_free (privkey); | 86 | GNUNET_free (privkey); |
87 | privkey = NULL; | 87 | privkey = NULL; |
88 | } | 88 | } |
89 | if (NULL != directory) | ||
90 | { | ||
91 | GNUNET_DISK_directory_remove (directory); | ||
92 | GNUNET_free (directory); | ||
93 | } | ||
94 | GNUNET_SCHEDULER_shutdown (); | 89 | GNUNET_SCHEDULER_shutdown (); |
95 | } | 90 | } |
96 | 91 | ||
@@ -300,6 +295,7 @@ run (void *cls, | |||
300 | 295 | ||
301 | directory = NULL; | 296 | directory = NULL; |
302 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | 297 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); |
298 | GNUNET_DISK_directory_remove (directory); | ||
303 | 299 | ||
304 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 300 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
305 | &endbadly, NULL); | 301 | &endbadly, NULL); |
@@ -354,7 +350,14 @@ main (int argc, char *argv[]) | |||
354 | "test_namestore_api.conf", | 350 | "test_namestore_api.conf", |
355 | &run, | 351 | &run, |
356 | NULL)) | 352 | NULL)) |
357 | return 1; | 353 | { |
354 | res = 1; | ||
355 | } | ||
356 | if (NULL != directory) | ||
357 | { | ||
358 | GNUNET_DISK_directory_remove (directory); | ||
359 | GNUNET_free (directory); | ||
360 | } | ||
358 | return res; | 361 | return res; |
359 | } | 362 | } |
360 | 363 | ||
diff --git a/src/namestore/test_namestore_api_monitoring.c b/src/namestore/test_namestore_api_monitoring.c index 895313d1b..c2fe450ce 100644 --- a/src/namestore/test_namestore_api_monitoring.c +++ b/src/namestore/test_namestore_api_monitoring.c | |||
@@ -119,11 +119,6 @@ do_shutdown () | |||
119 | GNUNET_free (privkey2); | 119 | GNUNET_free (privkey2); |
120 | privkey2 = NULL; | 120 | privkey2 = NULL; |
121 | } | 121 | } |
122 | if (NULL != directory) | ||
123 | { | ||
124 | GNUNET_DISK_directory_remove (directory); | ||
125 | GNUNET_free (directory); | ||
126 | } | ||
127 | } | 122 | } |
128 | 123 | ||
129 | 124 | ||
@@ -277,6 +272,7 @@ run (void *cls, | |||
277 | 272 | ||
278 | directory = NULL; | 273 | directory = NULL; |
279 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | 274 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); |
275 | GNUNET_DISK_directory_remove (directory); | ||
280 | 276 | ||
281 | GNUNET_asprintf(&hostkey_file, | 277 | GNUNET_asprintf(&hostkey_file, |
282 | "zonefiles%s%s", | 278 | "zonefiles%s%s", |
@@ -357,7 +353,14 @@ main (int argc, char *argv[]) | |||
357 | "test_namestore_api.conf", | 353 | "test_namestore_api.conf", |
358 | &run, | 354 | &run, |
359 | NULL)) | 355 | NULL)) |
360 | return 1; | 356 | { |
357 | res = 1; | ||
358 | } | ||
359 | if (NULL != directory) | ||
360 | { | ||
361 | GNUNET_DISK_directory_remove (directory); | ||
362 | GNUNET_free (directory); | ||
363 | } | ||
361 | return res; | 364 | return res; |
362 | } | 365 | } |
363 | 366 | ||
diff --git a/src/namestore/test_namestore_api_monitoring_existing.c b/src/namestore/test_namestore_api_monitoring_existing.c index 9051a8d89..5d376a634 100644 --- a/src/namestore/test_namestore_api_monitoring_existing.c +++ b/src/namestore/test_namestore_api_monitoring_existing.c | |||
@@ -120,11 +120,6 @@ do_shutdown () | |||
120 | GNUNET_free (privkey2); | 120 | GNUNET_free (privkey2); |
121 | privkey2 = NULL; | 121 | privkey2 = NULL; |
122 | } | 122 | } |
123 | if (NULL != directory) | ||
124 | { | ||
125 | GNUNET_DISK_directory_remove (directory); | ||
126 | GNUNET_free (directory); | ||
127 | } | ||
128 | } | 123 | } |
129 | 124 | ||
130 | 125 | ||
@@ -288,6 +283,7 @@ run (void *cls, | |||
288 | 283 | ||
289 | directory = NULL; | 284 | directory = NULL; |
290 | GNUNET_CONFIGURATION_get_value_string(mycfg, "PATHS", "GNUNET_TEST_HOME", &directory); | 285 | GNUNET_CONFIGURATION_get_value_string(mycfg, "PATHS", "GNUNET_TEST_HOME", &directory); |
286 | GNUNET_DISK_directory_remove (directory); | ||
291 | 287 | ||
292 | res = 1; | 288 | res = 1; |
293 | 289 | ||
@@ -355,7 +351,14 @@ main (int argc, char *argv[]) | |||
355 | "test_namestore_api.conf", | 351 | "test_namestore_api.conf", |
356 | &run, | 352 | &run, |
357 | NULL)) | 353 | NULL)) |
358 | return 1; | 354 | { |
355 | res = 1; | ||
356 | } | ||
357 | if (NULL != directory) | ||
358 | { | ||
359 | GNUNET_DISK_directory_remove (directory); | ||
360 | GNUNET_free (directory); | ||
361 | } | ||
359 | return res; | 362 | return res; |
360 | } | 363 | } |
361 | 364 | ||
diff --git a/src/namestore/test_namestore_api_remove.c b/src/namestore/test_namestore_api_remove.c index 5ae82b1ef..2fd70b438 100644 --- a/src/namestore/test_namestore_api_remove.c +++ b/src/namestore/test_namestore_api_remove.c | |||
@@ -63,11 +63,6 @@ cleanup () | |||
63 | GNUNET_free (privkey); | 63 | GNUNET_free (privkey); |
64 | privkey = NULL; | 64 | privkey = NULL; |
65 | } | 65 | } |
66 | if (NULL != directory) | ||
67 | { | ||
68 | GNUNET_DISK_directory_remove (directory); | ||
69 | GNUNET_free (directory); | ||
70 | } | ||
71 | GNUNET_SCHEDULER_shutdown (); | 66 | GNUNET_SCHEDULER_shutdown (); |
72 | } | 67 | } |
73 | 68 | ||
@@ -161,6 +156,7 @@ run (void *cls, | |||
161 | 156 | ||
162 | directory = NULL; | 157 | directory = NULL; |
163 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | 158 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); |
159 | GNUNET_DISK_directory_remove (directory); | ||
164 | 160 | ||
165 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 161 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
166 | &endbadly, NULL); | 162 | &endbadly, NULL); |
@@ -205,7 +201,14 @@ main (int argc, char *argv[]) | |||
205 | "test_namestore_api.conf", | 201 | "test_namestore_api.conf", |
206 | &run, | 202 | &run, |
207 | NULL)) | 203 | NULL)) |
208 | return 1; | 204 | { |
205 | res = 1; | ||
206 | } | ||
207 | if (NULL != directory) | ||
208 | { | ||
209 | GNUNET_DISK_directory_remove (directory); | ||
210 | GNUNET_free (directory); | ||
211 | } | ||
209 | return res; | 212 | return res; |
210 | } | 213 | } |
211 | 214 | ||
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 c3afee6ff..2bc53c192 100644 --- a/src/namestore/test_namestore_api_remove_not_existing_record.c +++ b/src/namestore/test_namestore_api_remove_not_existing_record.c | |||
@@ -61,11 +61,6 @@ cleanup () | |||
61 | GNUNET_free (privkey); | 61 | GNUNET_free (privkey); |
62 | privkey = NULL; | 62 | privkey = NULL; |
63 | } | 63 | } |
64 | if (NULL != directory) | ||
65 | { | ||
66 | GNUNET_DISK_directory_remove (directory); | ||
67 | GNUNET_free (directory); | ||
68 | } | ||
69 | GNUNET_SCHEDULER_shutdown (); | 64 | GNUNET_SCHEDULER_shutdown (); |
70 | } | 65 | } |
71 | 66 | ||
@@ -141,6 +136,7 @@ run (void *cls, | |||
141 | 136 | ||
142 | directory = NULL; | 137 | directory = NULL; |
143 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | 138 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); |
139 | GNUNET_DISK_directory_remove (directory); | ||
144 | 140 | ||
145 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 141 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
146 | &endbadly, NULL); | 142 | &endbadly, NULL); |
@@ -178,7 +174,14 @@ main (int argc, char *argv[]) | |||
178 | "test_namestore_api.conf", | 174 | "test_namestore_api.conf", |
179 | &run, | 175 | &run, |
180 | NULL)) | 176 | NULL)) |
181 | return 1; | 177 | { |
178 | res = 1; | ||
179 | } | ||
180 | if (NULL != directory) | ||
181 | { | ||
182 | GNUNET_DISK_directory_remove (directory); | ||
183 | GNUNET_free (directory); | ||
184 | } | ||
182 | return res; | 185 | return res; |
183 | } | 186 | } |
184 | 187 | ||
diff --git a/src/namestore/test_namestore_api_store.c b/src/namestore/test_namestore_api_store.c index c44d24809..a7a1f2bbc 100644 --- a/src/namestore/test_namestore_api_store.c +++ b/src/namestore/test_namestore_api_store.c | |||
@@ -61,11 +61,6 @@ cleanup () | |||
61 | GNUNET_free (privkey); | 61 | GNUNET_free (privkey); |
62 | privkey = NULL; | 62 | privkey = NULL; |
63 | } | 63 | } |
64 | if (NULL != directory) | ||
65 | { | ||
66 | GNUNET_DISK_directory_remove (directory); | ||
67 | GNUNET_free (directory); | ||
68 | } | ||
69 | GNUNET_SCHEDULER_shutdown (); | 64 | GNUNET_SCHEDULER_shutdown (); |
70 | } | 65 | } |
71 | 66 | ||
@@ -125,6 +120,7 @@ run (void *cls, | |||
125 | 120 | ||
126 | directory = NULL; | 121 | directory = NULL; |
127 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | 122 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); |
123 | GNUNET_DISK_directory_remove (directory); | ||
128 | 124 | ||
129 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 125 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
130 | &endbadly, NULL); | 126 | &endbadly, NULL); |
@@ -169,7 +165,14 @@ main (int argc, char *argv[]) | |||
169 | "test_namestore_api.conf", | 165 | "test_namestore_api.conf", |
170 | &run, | 166 | &run, |
171 | NULL)) | 167 | NULL)) |
172 | return 1; | 168 | { |
169 | res = 1; | ||
170 | } | ||
171 | if (NULL != directory) | ||
172 | { | ||
173 | GNUNET_DISK_directory_remove (directory); | ||
174 | GNUNET_free (directory); | ||
175 | } | ||
173 | return res; | 176 | return res; |
174 | } | 177 | } |
175 | 178 | ||
diff --git a/src/namestore/test_namestore_api_store_update.c b/src/namestore/test_namestore_api_store_update.c index 213d934bf..c0300fa27 100644 --- a/src/namestore/test_namestore_api_store_update.c +++ b/src/namestore/test_namestore_api_store_update.c | |||
@@ -83,11 +83,6 @@ cleanup () | |||
83 | GNUNET_free (privkey); | 83 | GNUNET_free (privkey); |
84 | privkey = NULL; | 84 | privkey = NULL; |
85 | } | 85 | } |
86 | if (NULL != directory) | ||
87 | { | ||
88 | GNUNET_DISK_directory_remove (directory); | ||
89 | GNUNET_free (directory); | ||
90 | } | ||
91 | GNUNET_SCHEDULER_shutdown (); | 86 | GNUNET_SCHEDULER_shutdown (); |
92 | } | 87 | } |
93 | 88 | ||
@@ -239,6 +234,7 @@ run (void *cls, | |||
239 | 234 | ||
240 | directory = NULL; | 235 | directory = NULL; |
241 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | 236 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); |
237 | GNUNET_DISK_directory_remove (directory); | ||
242 | 238 | ||
243 | update_performed = GNUNET_NO; | 239 | update_performed = GNUNET_NO; |
244 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 240 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
@@ -280,14 +276,20 @@ run (void *cls, | |||
280 | int | 276 | int |
281 | main (int argc, char *argv[]) | 277 | main (int argc, char *argv[]) |
282 | { | 278 | { |
283 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/"); | ||
284 | res = 1; | 279 | res = 1; |
285 | if (0 != | 280 | if (0 != |
286 | GNUNET_TESTING_peer_run ("test-namestore-api-store-update", | 281 | GNUNET_TESTING_peer_run ("test-namestore-api-store-update", |
287 | "test_namestore_api.conf", | 282 | "test_namestore_api.conf", |
288 | &run, | 283 | &run, |
289 | NULL)) | 284 | NULL)) |
290 | return 1; | 285 | { |
286 | res = 1; | ||
287 | } | ||
288 | if (NULL != directory) | ||
289 | { | ||
290 | GNUNET_DISK_directory_remove (directory); | ||
291 | GNUNET_free (directory); | ||
292 | } | ||
291 | return res; | 293 | return res; |
292 | } | 294 | } |
293 | 295 | ||
diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c index 9c9be53c7..20e927e51 100644 --- a/src/namestore/test_namestore_api_zone_iteration.c +++ b/src/namestore/test_namestore_api_zone_iteration.c | |||
@@ -105,11 +105,6 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
105 | if (privkey2 != NULL) | 105 | if (privkey2 != NULL) |
106 | GNUNET_free (privkey2); | 106 | GNUNET_free (privkey2); |
107 | privkey2 = NULL; | 107 | privkey2 = NULL; |
108 | if (NULL != directory) | ||
109 | { | ||
110 | GNUNET_DISK_directory_remove (directory); | ||
111 | GNUNET_free (directory); | ||
112 | } | ||
113 | res = 1; | 108 | res = 1; |
114 | } | 109 | } |
115 | 110 | ||
@@ -156,11 +151,6 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
156 | } | 151 | } |
157 | if (nsh != NULL) | 152 | if (nsh != NULL) |
158 | GNUNET_NAMESTORE_disconnect (nsh); | 153 | GNUNET_NAMESTORE_disconnect (nsh); |
159 | if (NULL != directory) | ||
160 | { | ||
161 | GNUNET_DISK_directory_remove (directory); | ||
162 | GNUNET_free (directory); | ||
163 | } | ||
164 | nsh = NULL; | 154 | nsh = NULL; |
165 | } | 155 | } |
166 | 156 | ||
@@ -435,6 +425,7 @@ run (void *cls, | |||
435 | { | 425 | { |
436 | directory = NULL; | 426 | directory = NULL; |
437 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | 427 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); |
428 | GNUNET_DISK_directory_remove (directory); | ||
438 | 429 | ||
439 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); | 430 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); |
440 | nsh = GNUNET_NAMESTORE_connect (cfg); | 431 | nsh = GNUNET_NAMESTORE_connect (cfg); |
@@ -456,13 +447,19 @@ int | |||
456 | main (int argc, char *argv[]) | 447 | main (int argc, char *argv[]) |
457 | { | 448 | { |
458 | res = 1; | 449 | res = 1; |
459 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore"); | ||
460 | if (0 != | 450 | if (0 != |
461 | GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration", | 451 | GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration", |
462 | "test_namestore_api.conf", | 452 | "test_namestore_api.conf", |
463 | &run, | 453 | &run, |
464 | NULL)) | 454 | NULL)) |
465 | return 1; | 455 | { |
456 | res = 1; | ||
457 | } | ||
458 | if (NULL != directory) | ||
459 | { | ||
460 | GNUNET_DISK_directory_remove (directory); | ||
461 | GNUNET_free (directory); | ||
462 | } | ||
466 | return res; | 463 | return res; |
467 | } | 464 | } |
468 | 465 | ||
diff --git a/src/namestore/test_namestore_api_zone_iteration_nick.c b/src/namestore/test_namestore_api_zone_iteration_nick.c index 8a1b18cbf..8453edfc7 100644 --- a/src/namestore/test_namestore_api_zone_iteration_nick.c +++ b/src/namestore/test_namestore_api_zone_iteration_nick.c | |||
@@ -107,11 +107,6 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
107 | 107 | ||
108 | if (privkey2 != NULL) | 108 | if (privkey2 != NULL) |
109 | GNUNET_free (privkey2); | 109 | GNUNET_free (privkey2); |
110 | if (NULL != directory) | ||
111 | { | ||
112 | GNUNET_DISK_directory_remove (directory); | ||
113 | GNUNET_free (directory); | ||
114 | } | ||
115 | privkey2 = NULL; | 110 | privkey2 = NULL; |
116 | res = 1; | 111 | res = 1; |
117 | } | 112 | } |
@@ -160,11 +155,6 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
160 | if (nsh != NULL) | 155 | if (nsh != NULL) |
161 | GNUNET_NAMESTORE_disconnect (nsh); | 156 | GNUNET_NAMESTORE_disconnect (nsh); |
162 | nsh = NULL; | 157 | nsh = NULL; |
163 | if (NULL != directory) | ||
164 | { | ||
165 | GNUNET_DISK_directory_remove (directory); | ||
166 | GNUNET_free (directory); | ||
167 | } | ||
168 | } | 158 | } |
169 | 159 | ||
170 | static int | 160 | static int |
@@ -445,6 +435,7 @@ run (void *cls, | |||
445 | { | 435 | { |
446 | directory = NULL; | 436 | directory = NULL; |
447 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | 437 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); |
438 | GNUNET_DISK_directory_remove (directory); | ||
448 | 439 | ||
449 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); | 440 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); |
450 | nsh = GNUNET_NAMESTORE_connect (cfg); | 441 | nsh = GNUNET_NAMESTORE_connect (cfg); |
@@ -467,13 +458,19 @@ int | |||
467 | main (int argc, char *argv[]) | 458 | main (int argc, char *argv[]) |
468 | { | 459 | { |
469 | res = 1; | 460 | res = 1; |
470 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore"); | ||
471 | if (0 != | 461 | if (0 != |
472 | GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration", | 462 | GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration", |
473 | "test_namestore_api.conf", | 463 | "test_namestore_api.conf", |
474 | &run, | 464 | &run, |
475 | NULL)) | 465 | NULL)) |
476 | return 1; | 466 | { |
467 | res = 1; | ||
468 | } | ||
469 | if (NULL != directory) | ||
470 | { | ||
471 | GNUNET_DISK_directory_remove (directory); | ||
472 | GNUNET_free (directory); | ||
473 | } | ||
477 | return res; | 474 | return res; |
478 | } | 475 | } |
479 | 476 | ||
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 bd4c5cc93..0a85b5182 100644 --- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c +++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c | |||
@@ -104,12 +104,6 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
104 | if (privkey2 != NULL) | 104 | if (privkey2 != NULL) |
105 | GNUNET_free (privkey2); | 105 | GNUNET_free (privkey2); |
106 | privkey2 = NULL; | 106 | privkey2 = NULL; |
107 | |||
108 | if (NULL != directory) | ||
109 | { | ||
110 | GNUNET_DISK_directory_remove (directory); | ||
111 | GNUNET_free (directory); | ||
112 | } | ||
113 | res = 1; | 107 | res = 1; |
114 | } | 108 | } |
115 | 109 | ||
@@ -158,11 +152,6 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
158 | if (nsh != NULL) | 152 | if (nsh != NULL) |
159 | GNUNET_NAMESTORE_disconnect (nsh); | 153 | GNUNET_NAMESTORE_disconnect (nsh); |
160 | nsh = NULL; | 154 | nsh = NULL; |
161 | if (NULL != directory) | ||
162 | { | ||
163 | GNUNET_DISK_directory_remove (directory); | ||
164 | GNUNET_free (directory); | ||
165 | } | ||
166 | } | 155 | } |
167 | 156 | ||
168 | 157 | ||
@@ -411,6 +400,7 @@ run (void *cls, | |||
411 | { | 400 | { |
412 | directory = NULL; | 401 | directory = NULL; |
413 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | 402 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); |
403 | GNUNET_DISK_directory_remove (directory); | ||
414 | 404 | ||
415 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); | 405 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); |
416 | nsh = GNUNET_NAMESTORE_connect (cfg); | 406 | nsh = GNUNET_NAMESTORE_connect (cfg); |
@@ -432,14 +422,20 @@ run (void *cls, | |||
432 | int | 422 | int |
433 | main (int argc, char *argv[]) | 423 | main (int argc, char *argv[]) |
434 | { | 424 | { |
435 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/"); | ||
436 | res = 1; | 425 | res = 1; |
437 | if (0 != | 426 | if (0 != |
438 | GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration", | 427 | GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration", |
439 | "test_namestore_api.conf", | 428 | "test_namestore_api.conf", |
440 | &run, | 429 | &run, |
441 | NULL)) | 430 | NULL)) |
442 | return 1; | 431 | { |
432 | res = 1; | ||
433 | } | ||
434 | if (NULL != directory) | ||
435 | { | ||
436 | GNUNET_DISK_directory_remove (directory); | ||
437 | GNUNET_free (directory); | ||
438 | } | ||
443 | return res; | 439 | return res; |
444 | } | 440 | } |
445 | 441 | ||
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c index 77a3d6a38..adfd234c6 100644 --- a/src/namestore/test_namestore_api_zone_iteration_stop.c +++ b/src/namestore/test_namestore_api_zone_iteration_stop.c | |||
@@ -105,12 +105,6 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
105 | if (privkey2 != NULL) | 105 | if (privkey2 != NULL) |
106 | GNUNET_free (privkey2); | 106 | GNUNET_free (privkey2); |
107 | privkey2 = NULL; | 107 | privkey2 = NULL; |
108 | |||
109 | if (NULL != directory) | ||
110 | { | ||
111 | GNUNET_DISK_directory_remove (directory); | ||
112 | GNUNET_free (directory); | ||
113 | } | ||
114 | res = 1; | 108 | res = 1; |
115 | } | 109 | } |
116 | 110 | ||
@@ -441,6 +435,7 @@ run (void *cls, | |||
441 | { | 435 | { |
442 | directory = NULL; | 436 | directory = NULL; |
443 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | 437 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); |
438 | GNUNET_DISK_directory_remove (directory); | ||
444 | 439 | ||
445 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); | 440 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); |
446 | nsh = GNUNET_NAMESTORE_connect (cfg); | 441 | nsh = GNUNET_NAMESTORE_connect (cfg); |
@@ -461,14 +456,20 @@ run (void *cls, | |||
461 | int | 456 | int |
462 | main (int argc, char *argv[]) | 457 | main (int argc, char *argv[]) |
463 | { | 458 | { |
464 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/"); | ||
465 | res = 1; | 459 | res = 1; |
466 | if (0 != | 460 | if (0 != |
467 | GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration-stop", | 461 | GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration-stop", |
468 | "test_namestore_api.conf", | 462 | "test_namestore_api.conf", |
469 | &run, | 463 | &run, |
470 | NULL)) | 464 | NULL)) |
471 | return 1; | 465 | { |
466 | res = 1; | ||
467 | } | ||
468 | if (NULL != directory) | ||
469 | { | ||
470 | GNUNET_DISK_directory_remove (directory); | ||
471 | GNUNET_free (directory); | ||
472 | } | ||
472 | return res; | 473 | return res; |
473 | } | 474 | } |
474 | 475 | ||
diff --git a/src/namestore/test_namestore_api_zone_to_name.c b/src/namestore/test_namestore_api_zone_to_name.c index 26593547b..9ade0cfc1 100644 --- a/src/namestore/test_namestore_api_zone_to_name.c +++ b/src/namestore/test_namestore_api_zone_to_name.c | |||
@@ -73,11 +73,6 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
73 | nsh = NULL; | 73 | nsh = NULL; |
74 | if (privkey != NULL) | 74 | if (privkey != NULL) |
75 | GNUNET_free (privkey); | 75 | GNUNET_free (privkey); |
76 | if (NULL != directory) | ||
77 | { | ||
78 | GNUNET_DISK_directory_remove (directory); | ||
79 | GNUNET_free (directory); | ||
80 | } | ||
81 | privkey = NULL; | 76 | privkey = NULL; |
82 | res = 1; | 77 | res = 1; |
83 | } | 78 | } |
@@ -96,11 +91,6 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
96 | privkey = NULL; | 91 | privkey = NULL; |
97 | if (nsh != NULL) | 92 | if (nsh != NULL) |
98 | GNUNET_NAMESTORE_disconnect (nsh); | 93 | GNUNET_NAMESTORE_disconnect (nsh); |
99 | if (NULL != directory) | ||
100 | { | ||
101 | GNUNET_DISK_directory_remove (directory); | ||
102 | GNUNET_free (directory); | ||
103 | } | ||
104 | nsh = NULL; | 94 | nsh = NULL; |
105 | } | 95 | } |
106 | 96 | ||
@@ -180,6 +170,7 @@ run (void *cls, | |||
180 | 170 | ||
181 | directory = NULL; | 171 | directory = NULL; |
182 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | 172 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); |
173 | GNUNET_DISK_directory_remove (directory); | ||
183 | 174 | ||
184 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT,endbadly, NULL); | 175 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT,endbadly, NULL); |
185 | GNUNET_asprintf (&s_name, "dummy"); | 176 | GNUNET_asprintf (&s_name, "dummy"); |
@@ -232,7 +223,14 @@ main (int argc, char *argv[]) | |||
232 | "test_namestore_api.conf", | 223 | "test_namestore_api.conf", |
233 | &run, | 224 | &run, |
234 | NULL)) | 225 | NULL)) |
235 | return 1; | 226 | { |
227 | res = 1; | ||
228 | } | ||
229 | if (NULL != directory) | ||
230 | { | ||
231 | GNUNET_DISK_directory_remove (directory); | ||
232 | GNUNET_free (directory); | ||
233 | } | ||
236 | return res; | 234 | return res; |
237 | } | 235 | } |
238 | 236 | ||