diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-15 21:46:35 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-15 21:46:35 +0000 |
commit | 502af2167f7c218366666ca4944bd7cc54b5b19a (patch) | |
tree | a91fec5cc9769d260640bd91c6633cb9cf395524 /src/fs/test_fs_search_persistence.c | |
parent | 03af5a603b7cc53432249d5854cd412aa90dde0d (diff) | |
download | gnunet-502af2167f7c218366666ca4944bd7cc54b5b19a.tar.gz gnunet-502af2167f7c218366666ca4944bd7cc54b5b19a.zip |
indentation
Diffstat (limited to 'src/fs/test_fs_search_persistence.c')
-rw-r--r-- | src/fs/test_fs_search_persistence.c | 300 |
1 files changed, 143 insertions, 157 deletions
diff --git a/src/fs/test_fs_search_persistence.c b/src/fs/test_fs_search_persistence.c index 47d177a81..eceb4d1d5 100644 --- a/src/fs/test_fs_search_persistence.c +++ b/src/fs/test_fs_search_persistence.c | |||
@@ -45,13 +45,13 @@ | |||
45 | 45 | ||
46 | /** | 46 | /** |
47 | * How long should our test-content live? | 47 | * How long should our test-content live? |
48 | */ | 48 | */ |
49 | #define LIFETIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 15) | 49 | #define LIFETIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 15) |
50 | 50 | ||
51 | struct PeerContext | 51 | struct PeerContext |
52 | { | 52 | { |
53 | struct GNUNET_CONFIGURATION_Handle *cfg; | 53 | struct GNUNET_CONFIGURATION_Handle *cfg; |
54 | struct GNUNET_PeerIdentity id; | 54 | struct GNUNET_PeerIdentity id; |
55 | #if START_ARM | 55 | #if START_ARM |
56 | struct GNUNET_OS_Process *arm_proc; | 56 | struct GNUNET_OS_Process *arm_proc; |
57 | #endif | 57 | #endif |
@@ -70,8 +70,7 @@ static struct GNUNET_FS_PublishContext *publish; | |||
70 | static const struct GNUNET_CONFIGURATION_Handle *cfg; | 70 | static const struct GNUNET_CONFIGURATION_Handle *cfg; |
71 | 71 | ||
72 | static void | 72 | static void |
73 | abort_publish_task (void *cls, | 73 | abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
74 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
75 | { | 74 | { |
76 | GNUNET_FS_publish_stop (publish); | 75 | GNUNET_FS_publish_stop (publish); |
77 | publish = NULL; | 76 | publish = NULL; |
@@ -79,8 +78,7 @@ abort_publish_task (void *cls, | |||
79 | 78 | ||
80 | 79 | ||
81 | static void | 80 | static void |
82 | abort_search_task (void *cls, | 81 | abort_search_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
83 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
84 | { | 82 | { |
85 | if (search != NULL) | 83 | if (search != NULL) |
86 | GNUNET_FS_search_stop (search); | 84 | GNUNET_FS_search_stop (search); |
@@ -88,22 +86,19 @@ abort_search_task (void *cls, | |||
88 | } | 86 | } |
89 | 87 | ||
90 | 88 | ||
91 | static void * | 89 | static void *progress_cb (void *cls, |
92 | progress_cb (void *cls, | 90 | const struct GNUNET_FS_ProgressInfo *event); |
93 | const struct GNUNET_FS_ProgressInfo *event); | ||
94 | 91 | ||
95 | 92 | ||
96 | static void | 93 | static void |
97 | restart_fs_task (void *cls, | 94 | restart_fs_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
98 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
99 | { | 95 | { |
100 | GNUNET_FS_stop (fs); | 96 | GNUNET_FS_stop (fs); |
101 | fs = GNUNET_FS_start (cfg, | 97 | fs = GNUNET_FS_start (cfg, |
102 | "test-fs-search-persistence", | 98 | "test-fs-search-persistence", |
103 | &progress_cb, | 99 | &progress_cb, |
104 | NULL, | 100 | NULL, |
105 | GNUNET_FS_FLAGS_PERSISTENCE, | 101 | GNUNET_FS_FLAGS_PERSISTENCE, GNUNET_FS_OPTIONS_END); |
106 | GNUNET_FS_OPTIONS_END); | ||
107 | } | 102 | } |
108 | 103 | ||
109 | 104 | ||
@@ -122,129 +117,124 @@ consider_restart (int ev) | |||
122 | static int prev[32]; | 117 | static int prev[32]; |
123 | static int off; | 118 | static int off; |
124 | int i; | 119 | int i; |
125 | for (i=0;i<off;i++) | 120 | |
121 | for (i = 0; i < off; i++) | ||
126 | if (prev[i] == ev) | 122 | if (prev[i] == ev) |
127 | return; | 123 | return; |
128 | prev[off++] = ev; | 124 | prev[off++] = ev; |
129 | GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_URGENT, | 125 | GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_URGENT, |
130 | &restart_fs_task, | 126 | &restart_fs_task, NULL); |
131 | NULL); | ||
132 | } | 127 | } |
133 | 128 | ||
134 | 129 | ||
135 | static void * | 130 | static void * |
136 | progress_cb (void *cls, | 131 | progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) |
137 | const struct GNUNET_FS_ProgressInfo *event) | 132 | { |
138 | { | ||
139 | const char *keywords[] = { | 133 | const char *keywords[] = { |
140 | "down_foo" | 134 | "down_foo" |
141 | }; | 135 | }; |
142 | struct GNUNET_FS_Uri *kuri; | 136 | struct GNUNET_FS_Uri *kuri; |
143 | 137 | ||
144 | switch (event->status) | 138 | switch (event->status) |
145 | { | 139 | { |
146 | case GNUNET_FS_STATUS_PUBLISH_PROGRESS: | 140 | case GNUNET_FS_STATUS_PUBLISH_PROGRESS: |
147 | #if VERBOSE | 141 | #if VERBOSE |
148 | printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n", | 142 | printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n", |
149 | (unsigned long long) event->value.publish.completed, | 143 | (unsigned long long) event->value.publish.completed, |
150 | (unsigned long long) event->value.publish.size, | 144 | (unsigned long long) event->value.publish.size, |
151 | event->value.publish.specifics.progress.depth, | 145 | event->value.publish.specifics.progress.depth, |
152 | (unsigned long long) event->value.publish.specifics.progress.offset); | 146 | (unsigned long long) event->value.publish.specifics. |
153 | #endif | 147 | progress.offset); |
154 | break; | 148 | #endif |
155 | case GNUNET_FS_STATUS_PUBLISH_COMPLETED: | 149 | break; |
156 | kuri = GNUNET_FS_uri_ksk_create_from_args (1, keywords); | 150 | case GNUNET_FS_STATUS_PUBLISH_COMPLETED: |
157 | start = GNUNET_TIME_absolute_get (); | 151 | kuri = GNUNET_FS_uri_ksk_create_from_args (1, keywords); |
158 | GNUNET_FS_search_start (fs, | 152 | start = GNUNET_TIME_absolute_get (); |
159 | kuri, | 153 | GNUNET_FS_search_start (fs, |
160 | 1, | 154 | kuri, 1, GNUNET_FS_SEARCH_OPTION_NONE, "search"); |
161 | GNUNET_FS_SEARCH_OPTION_NONE, | 155 | GNUNET_FS_uri_destroy (kuri); |
162 | "search"); | 156 | GNUNET_assert (search != NULL); |
163 | GNUNET_FS_uri_destroy (kuri); | 157 | break; |
164 | GNUNET_assert (search != NULL); | 158 | case GNUNET_FS_STATUS_PUBLISH_SUSPEND: |
165 | break; | 159 | if (event->value.publish.pc == publish) |
166 | case GNUNET_FS_STATUS_PUBLISH_SUSPEND: | 160 | publish = NULL; |
167 | if (event->value.publish.pc == publish) | 161 | break; |
168 | publish = NULL; | 162 | case GNUNET_FS_STATUS_PUBLISH_RESUME: |
169 | break; | 163 | if (NULL == publish) |
170 | case GNUNET_FS_STATUS_PUBLISH_RESUME: | 164 | publish = event->value.publish.pc; |
171 | if (NULL == publish) | 165 | break; |
172 | publish = event->value.publish.pc; | 166 | case GNUNET_FS_STATUS_SEARCH_RESULT: |
173 | break; | 167 | /* FIXME: consider_restart (event->status); cannot be tested with |
174 | case GNUNET_FS_STATUS_SEARCH_RESULT: | 168 | * search result since we exit here after the first one... */ |
175 | /* FIXME: consider_restart (event->status); cannot be tested with | ||
176 | search result since we exit here after the first one... */ | ||
177 | #if VERBOSE | 169 | #if VERBOSE |
178 | printf ("Search complete.\n"); | 170 | printf ("Search complete.\n"); |
179 | #endif | 171 | #endif |
180 | GNUNET_SCHEDULER_add_continuation (&abort_search_task, | 172 | GNUNET_SCHEDULER_add_continuation (&abort_search_task, |
181 | NULL, | 173 | NULL, |
182 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 174 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
183 | break; | 175 | break; |
184 | case GNUNET_FS_STATUS_PUBLISH_ERROR: | 176 | case GNUNET_FS_STATUS_PUBLISH_ERROR: |
185 | fprintf (stderr, | 177 | fprintf (stderr, |
186 | "Error publishing file: %s\n", | 178 | "Error publishing file: %s\n", |
187 | event->value.publish.specifics.error.message); | 179 | event->value.publish.specifics.error.message); |
188 | GNUNET_break (0); | 180 | GNUNET_break (0); |
189 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, | 181 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, |
190 | NULL, | 182 | NULL, |
191 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 183 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
192 | break; | 184 | break; |
193 | case GNUNET_FS_STATUS_SEARCH_ERROR: | 185 | case GNUNET_FS_STATUS_SEARCH_ERROR: |
194 | fprintf (stderr, | 186 | fprintf (stderr, |
195 | "Error searching file: %s\n", | 187 | "Error searching file: %s\n", |
196 | event->value.search.specifics.error.message); | 188 | event->value.search.specifics.error.message); |
197 | GNUNET_SCHEDULER_add_continuation (&abort_search_task, | 189 | GNUNET_SCHEDULER_add_continuation (&abort_search_task, |
198 | NULL, | 190 | NULL, |
199 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 191 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
200 | break; | 192 | break; |
201 | case GNUNET_FS_STATUS_SEARCH_SUSPEND: | 193 | case GNUNET_FS_STATUS_SEARCH_SUSPEND: |
202 | if (event->value.search.sc == search) | 194 | if (event->value.search.sc == search) |
203 | search = NULL; | ||
204 | break; | ||
205 | case GNUNET_FS_STATUS_SEARCH_RESUME: | ||
206 | if (NULL == search) | ||
207 | { | ||
208 | search = event->value.search.sc; | ||
209 | return "search"; | ||
210 | } | ||
211 | break; | ||
212 | case GNUNET_FS_STATUS_PUBLISH_START: | ||
213 | GNUNET_assert (0 == strcmp ("publish-context", event->value.publish.cctx)); | ||
214 | GNUNET_assert (NULL == event->value.publish.pctx); | ||
215 | GNUNET_assert (FILESIZE == event->value.publish.size); | ||
216 | GNUNET_assert (0 == event->value.publish.completed); | ||
217 | GNUNET_assert (1 == event->value.publish.anonymity); | ||
218 | break; | ||
219 | case GNUNET_FS_STATUS_PUBLISH_STOPPED: | ||
220 | GNUNET_assert (publish == event->value.publish.pc); | ||
221 | GNUNET_assert (FILESIZE == event->value.publish.size); | ||
222 | GNUNET_assert (1 == event->value.publish.anonymity); | ||
223 | GNUNET_FS_stop (fs); | ||
224 | fs = NULL; | ||
225 | break; | ||
226 | case GNUNET_FS_STATUS_SEARCH_START: | ||
227 | consider_restart (event->status); | ||
228 | GNUNET_assert (search == NULL); | ||
229 | search = event->value.search.sc; | ||
230 | GNUNET_assert (0 == strcmp ("search", event->value.search.cctx)); | ||
231 | GNUNET_assert (1 == event->value.search.anonymity); | ||
232 | break; | ||
233 | case GNUNET_FS_STATUS_SEARCH_RESULT_STOPPED: | ||
234 | break; | ||
235 | case GNUNET_FS_STATUS_SEARCH_STOPPED: | ||
236 | GNUNET_assert (search == event->value.search.sc); | ||
237 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, | ||
238 | NULL, | ||
239 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | ||
240 | search = NULL; | 195 | search = NULL; |
241 | break; | 196 | break; |
242 | default: | 197 | case GNUNET_FS_STATUS_SEARCH_RESUME: |
243 | fprintf (stderr, | 198 | if (NULL == search) |
244 | "Unexpected event: %d\n", | 199 | { |
245 | event->status); | 200 | search = event->value.search.sc; |
246 | break; | 201 | return "search"; |
247 | } | 202 | } |
203 | break; | ||
204 | case GNUNET_FS_STATUS_PUBLISH_START: | ||
205 | GNUNET_assert (0 == strcmp ("publish-context", event->value.publish.cctx)); | ||
206 | GNUNET_assert (NULL == event->value.publish.pctx); | ||
207 | GNUNET_assert (FILESIZE == event->value.publish.size); | ||
208 | GNUNET_assert (0 == event->value.publish.completed); | ||
209 | GNUNET_assert (1 == event->value.publish.anonymity); | ||
210 | break; | ||
211 | case GNUNET_FS_STATUS_PUBLISH_STOPPED: | ||
212 | GNUNET_assert (publish == event->value.publish.pc); | ||
213 | GNUNET_assert (FILESIZE == event->value.publish.size); | ||
214 | GNUNET_assert (1 == event->value.publish.anonymity); | ||
215 | GNUNET_FS_stop (fs); | ||
216 | fs = NULL; | ||
217 | break; | ||
218 | case GNUNET_FS_STATUS_SEARCH_START: | ||
219 | consider_restart (event->status); | ||
220 | GNUNET_assert (search == NULL); | ||
221 | search = event->value.search.sc; | ||
222 | GNUNET_assert (0 == strcmp ("search", event->value.search.cctx)); | ||
223 | GNUNET_assert (1 == event->value.search.anonymity); | ||
224 | break; | ||
225 | case GNUNET_FS_STATUS_SEARCH_RESULT_STOPPED: | ||
226 | break; | ||
227 | case GNUNET_FS_STATUS_SEARCH_STOPPED: | ||
228 | GNUNET_assert (search == event->value.search.sc); | ||
229 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, | ||
230 | NULL, | ||
231 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | ||
232 | search = NULL; | ||
233 | break; | ||
234 | default: | ||
235 | fprintf (stderr, "Unexpected event: %d\n", event->status); | ||
236 | break; | ||
237 | } | ||
248 | return NULL; | 238 | return NULL; |
249 | } | 239 | } |
250 | 240 | ||
@@ -255,11 +245,11 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
255 | p->cfg = GNUNET_CONFIGURATION_create (); | 245 | p->cfg = GNUNET_CONFIGURATION_create (); |
256 | #if START_ARM | 246 | #if START_ARM |
257 | p->arm_proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", | 247 | p->arm_proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", |
258 | "gnunet-service-arm", | 248 | "gnunet-service-arm", |
259 | #if VERBOSE | 249 | #if VERBOSE |
260 | "-L", "DEBUG", | 250 | "-L", "DEBUG", |
261 | #endif | 251 | #endif |
262 | "-c", cfgname, NULL); | 252 | "-c", cfgname, NULL); |
263 | #endif | 253 | #endif |
264 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); | 254 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); |
265 | } | 255 | } |
@@ -270,16 +260,17 @@ stop_arm (struct PeerContext *p) | |||
270 | { | 260 | { |
271 | #if START_ARM | 261 | #if START_ARM |
272 | if (NULL != p->arm_proc) | 262 | if (NULL != p->arm_proc) |
273 | { | 263 | { |
274 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) | 264 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) |
275 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 265 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
276 | if (GNUNET_OS_process_wait(p->arm_proc) != GNUNET_OK) | 266 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) |
277 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); | 267 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); |
278 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 268 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
279 | "ARM process %u stopped\n", GNUNET_OS_process_get_pid (p->arm_proc)); | 269 | "ARM process %u stopped\n", |
280 | GNUNET_OS_process_close (p->arm_proc); | 270 | GNUNET_OS_process_get_pid (p->arm_proc)); |
281 | p->arm_proc = NULL; | 271 | GNUNET_OS_process_close (p->arm_proc); |
282 | } | 272 | p->arm_proc = NULL; |
273 | } | ||
283 | #endif | 274 | #endif |
284 | GNUNET_CONFIGURATION_destroy (p->cfg); | 275 | GNUNET_CONFIGURATION_destroy (p->cfg); |
285 | } | 276 | } |
@@ -288,8 +279,7 @@ stop_arm (struct PeerContext *p) | |||
288 | static void | 279 | static void |
289 | run (void *cls, | 280 | run (void *cls, |
290 | char *const *args, | 281 | char *const *args, |
291 | const char *cfgfile, | 282 | const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c) |
292 | const struct GNUNET_CONFIGURATION_Handle *c) | ||
293 | { | 283 | { |
294 | const char *keywords[] = { | 284 | const char *keywords[] = { |
295 | "down_foo", | 285 | "down_foo", |
@@ -305,12 +295,11 @@ run (void *cls, | |||
305 | cfg = c; | 295 | cfg = c; |
306 | setup_peer (&p1, "test_fs_search_data.conf"); | 296 | setup_peer (&p1, "test_fs_search_data.conf"); |
307 | fs = GNUNET_FS_start (cfg, | 297 | fs = GNUNET_FS_start (cfg, |
308 | "test-fs-search-persistence", | 298 | "test-fs-search-persistence", |
309 | &progress_cb, | 299 | &progress_cb, |
310 | NULL, | 300 | NULL, |
311 | GNUNET_FS_FLAGS_PERSISTENCE, | 301 | GNUNET_FS_FLAGS_PERSISTENCE, GNUNET_FS_OPTIONS_END); |
312 | GNUNET_FS_OPTIONS_END); | 302 | GNUNET_assert (NULL != fs); |
313 | GNUNET_assert (NULL != fs); | ||
314 | buf = GNUNET_malloc (FILESIZE); | 303 | buf = GNUNET_malloc (FILESIZE); |
315 | for (i = 0; i < FILESIZE; i++) | 304 | for (i = 0; i < FILESIZE; i++) |
316 | buf[i] = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 256); | 305 | buf[i] = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 256); |
@@ -321,21 +310,18 @@ run (void *cls, | |||
321 | bo.replication_level = 0; | 310 | bo.replication_level = 0; |
322 | bo.expiration_time = GNUNET_TIME_relative_to_absolute (LIFETIME); | 311 | bo.expiration_time = GNUNET_TIME_relative_to_absolute (LIFETIME); |
323 | fi = GNUNET_FS_file_information_create_from_data (fs, | 312 | fi = GNUNET_FS_file_information_create_from_data (fs, |
324 | "publish-context", | 313 | "publish-context", |
325 | FILESIZE, | 314 | FILESIZE, |
326 | buf, | 315 | buf, |
327 | kuri, | 316 | kuri, meta, GNUNET_NO, &bo); |
328 | meta, | ||
329 | GNUNET_NO, | ||
330 | &bo); | ||
331 | GNUNET_FS_uri_destroy (kuri); | 317 | GNUNET_FS_uri_destroy (kuri); |
332 | GNUNET_CONTAINER_meta_data_destroy (meta); | 318 | GNUNET_CONTAINER_meta_data_destroy (meta); |
333 | GNUNET_assert (NULL != fi); | 319 | GNUNET_assert (NULL != fi); |
334 | start = GNUNET_TIME_absolute_get (); | 320 | start = GNUNET_TIME_absolute_get (); |
335 | publish = GNUNET_FS_publish_start (fs, | 321 | publish = GNUNET_FS_publish_start (fs, |
336 | fi, | 322 | fi, |
337 | NULL, NULL, NULL, | 323 | NULL, NULL, NULL, |
338 | GNUNET_FS_PUBLISH_OPTION_NONE); | 324 | GNUNET_FS_PUBLISH_OPTION_NONE); |
339 | GNUNET_assert (publish != NULL); | 325 | GNUNET_assert (publish != NULL); |
340 | } | 326 | } |
341 | 327 | ||
@@ -343,7 +329,7 @@ run (void *cls, | |||
343 | int | 329 | int |
344 | main (int argc, char *argv[]) | 330 | main (int argc, char *argv[]) |
345 | { | 331 | { |
346 | char *const argvx[] = { | 332 | char *const argvx[] = { |
347 | "test-fs-search-persistence", | 333 | "test-fs-search-persistence", |
348 | "-c", | 334 | "-c", |
349 | "test_fs_search_data.conf", | 335 | "test_fs_search_data.conf", |
@@ -357,16 +343,16 @@ main (int argc, char *argv[]) | |||
357 | }; | 343 | }; |
358 | 344 | ||
359 | GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-search/"); | 345 | GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-search/"); |
360 | GNUNET_log_setup ("test_fs_search_persistence", | 346 | GNUNET_log_setup ("test_fs_search_persistence", |
361 | #if VERBOSE | 347 | #if VERBOSE |
362 | "DEBUG", | 348 | "DEBUG", |
363 | #else | 349 | #else |
364 | "WARNING", | 350 | "WARNING", |
365 | #endif | 351 | #endif |
366 | NULL); | 352 | NULL); |
367 | GNUNET_PROGRAM_run ((sizeof (argvx) / sizeof (char *)) - 1, | 353 | GNUNET_PROGRAM_run ((sizeof (argvx) / sizeof (char *)) - 1, |
368 | argvx, "test-fs-search-persistence", | 354 | argvx, "test-fs-search-persistence", |
369 | "nohelp", options, &run, NULL); | 355 | "nohelp", options, &run, NULL); |
370 | stop_arm (&p1); | 356 | stop_arm (&p1); |
371 | GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-search/"); | 357 | GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-search/"); |
372 | return 0; | 358 | return 0; |