Added core api changes
[oweals/gnunet.git] / src / core / test_core_quota_compliance.c
1 /*
2      This file is part of GNUnet.
3      (C) 2009, 2010 Christian Grothoff (and other contributing authors)
4
5      GNUnet is free software; you can redistribute it and/or modify
6      it under the terms of the GNU General Public License as published
7      by the Free Software Foundation; either version 3, or (at your
8      option) any later version.
9
10      GNUnet is distributed in the hope that it will be useful, but
11      WITHOUT ANY WARRANTY; without even the implied warranty of
12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13      General Public License for more details.
14
15      You should have received a copy of the GNU General Public License
16      along with GNUnet; see the file COPYING.  If not, write to the
17      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18      Boston, MA 02111-1307, USA.
19 */
20 /**
21  * @file core/test_core_quota_compliance.c
22  * @brief testcase for core_api.c focusing quota compliance on core level
23  *
24  * FIXME:
25  * - make sure connect callback is invoked properly as well!
26  */
27 #include "platform.h"
28 #include "gnunet_common.h"
29 #include "gnunet_constants.h"
30 #include "gnunet_arm_service.h"
31 #include "gnunet_core_service.h"
32 #include "gnunet_getopt_lib.h"
33 #include "gnunet_os_lib.h"
34 #include "gnunet_program_lib.h"
35 #include "gnunet_scheduler_lib.h"
36 #include "gnunet_transport_service.h"
37 #include "gnunet_statistics_service.h"
38
39 #define VERBOSE GNUNET_YES
40
41 #define START_ARM GNUNET_YES
42 #define DEBUG_CONNECTIONS GNUNET_NO
43
44 /**
45  * Note that this value must not significantly exceed
46  * 'MAX_PENDING' in 'gnunet-service-transport.c', otherwise
47  * messages may be dropped even for a reliable transport.
48  */
49 #define TOTAL_MSGS (600 * 10)
50
51 #define MEASUREMENT_MSG_SIZE 10240
52 #define MEASUREMENT_MAX_QUOTA 1024 * 1024 * 1024
53 #define MEASUREMENT_MIN_QUOTA 1024
54 #define MEASUREMENT_INTERVALL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
55
56 /**
57  * How long until we give up on transmitting the message?
58  */
59 #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 6000)
60
61 /**
62  * What delay do we request from the core service for transmission?
63  * Any value smaller than the CORK delay will disable CORKing, which
64  * is what we want here.
65  */
66 #define FAST_TIMEOUT GNUNET_TIME_relative_divide (GNUNET_CONSTANTS_MAX_CORK_DELAY, 2)
67
68 #define MTYPE 12345
69
70 static int is_asymmetric_send_constant;
71 static int is_asymmetric_recv_constant;
72 static unsigned long long current_quota_p1_in;
73 static unsigned long long current_quota_p1_out;
74 static unsigned long long current_quota_p2_in;
75 static unsigned long long current_quota_p2_out;
76
77 static unsigned long long total_bytes;
78 static unsigned long long total_bytes_sent;
79 static unsigned long long total_bytes_recv;
80
81 static struct GNUNET_TIME_Absolute start_time;
82
83 static GNUNET_SCHEDULER_TaskIdentifier err_task;
84
85 static GNUNET_SCHEDULER_TaskIdentifier send_task;
86
87 static GNUNET_SCHEDULER_TaskIdentifier measure_task;
88
89 struct PeerContext
90 {
91   struct GNUNET_CONFIGURATION_Handle *cfg;
92   struct GNUNET_STATISTICS_Handle *stats;
93   struct GNUNET_CORE_Handle *ch;
94   struct GNUNET_PeerIdentity id;   
95   struct GNUNET_TRANSPORT_Handle *th;
96   struct GNUNET_MessageHeader *hello;
97
98   int connect_status;
99 #if START_ARM
100   struct GNUNET_OS_Process *arm_proc;
101 #endif
102 };
103
104 static struct PeerContext p1;
105
106 static struct PeerContext p2;
107
108 static int ok;
109 static int measurement_running;
110
111 struct GNUNET_CORE_TransmitHandle * ch;
112
113 #if VERBOSE
114 #define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
115 #else
116 #define OKPP do { ok++; } while (0)
117 #endif
118
119 struct TestMessage 
120 {
121   struct GNUNET_MessageHeader header;
122   uint32_t num;
123 };
124
125 static void
126 terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
127 {
128   unsigned long long delta;
129
130   GNUNET_CORE_disconnect (p1.ch);
131   p1.ch = NULL;
132   GNUNET_CORE_disconnect (p2.ch);
133   p2.ch = NULL;
134   GNUNET_TRANSPORT_disconnect (p1.th);
135   p1.th = NULL;
136   GNUNET_TRANSPORT_disconnect (p2.th);
137   p2.th = NULL;
138   delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value;
139   ok = 0;
140 }
141
142
143 static void
144 terminate_task_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
145 {
146   GNUNET_break (0);
147   if (send_task != GNUNET_SCHEDULER_NO_TASK)
148           GNUNET_SCHEDULER_cancel (send_task);
149   GNUNET_CORE_disconnect (p1.ch);
150   p1.ch = NULL;
151   GNUNET_CORE_disconnect (p2.ch);
152   p2.ch = NULL;
153   GNUNET_TRANSPORT_disconnect (p1.th);
154   p1.th = NULL;
155   GNUNET_TRANSPORT_disconnect (p2.th);
156   p2.th = NULL;
157   ok = 42;
158 }
159
160 static void connect_notify (void *cls,
161                 const struct GNUNET_PeerIdentity *peer,
162                 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
163 {
164   struct PeerContext *pc = cls;
165   GNUNET_assert (pc->connect_status == 0);
166   pc->connect_status = 1;
167 #if DEBUG_CONNECTIONS
168   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
169               "Encrypted connection established to peer `%4s'\n",
170               GNUNET_i2s (peer));
171 #endif
172 }
173
174
175 static void
176 disconnect_notify (void *cls,
177                    const struct GNUNET_PeerIdentity *peer)
178 {
179   struct PeerContext *pc = cls;
180   pc->connect_status = 0;
181 #if DEBUG_CONNECTIONS
182   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
183               "Encrypted connection to `%4s' cut\n", GNUNET_i2s (peer));
184 #endif
185 }
186
187
188 static int
189 inbound_notify (void *cls,
190                 const struct GNUNET_PeerIdentity *other,
191                 const struct GNUNET_MessageHeader *message,
192                 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
193 {
194   total_bytes_recv += ntohs (message->size);
195   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
196               "Core provides inbound data from `%4s' size %u.\n", GNUNET_i2s (other), ntohs (message->size));
197 #if DEBUG_CONNECTIONS
198   #endif
199   return GNUNET_OK;
200 }
201
202
203 static int
204 outbound_notify (void *cls,
205                  const struct GNUNET_PeerIdentity *other,
206                  const struct GNUNET_MessageHeader *message,
207                  const struct GNUNET_TRANSPORT_ATS_Information *atsi)
208 {
209 #if DEBUG_CONNECTIONS
210   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
211               "Core notifies about outbound data for `%4s'.\n",
212               GNUNET_i2s (other));
213 #endif
214   return GNUNET_OK;
215 }
216
217 static void
218 next_fin (void *cls, int success)
219 {
220
221 }
222
223
224 static int
225 check_2 (void *cls,
226          const char *subsystem,
227          const char *name, uint64_t value, int is_persistent)
228 {
229  fprintf(stderr, "%s %s %llu\n", subsystem, name, (long long unsigned int) value);
230  return GNUNET_OK;
231 }
232
233 static void
234 measurement_end (void *cls,
235            const struct GNUNET_SCHEDULER_TaskContext *tc)
236 {
237   struct GNUNET_TIME_Relative duration;
238   
239   measure_task  = GNUNET_SCHEDULER_NO_TASK;
240   if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
241     return;
242   
243   if (err_task != GNUNET_SCHEDULER_NO_TASK)
244     GNUNET_SCHEDULER_cancel (err_task);
245   if (send_task != GNUNET_SCHEDULER_NO_TASK)
246     GNUNET_SCHEDULER_cancel (send_task);
247   
248   GNUNET_STATISTICS_get(p1.stats,"core","# discarded CORE_SEND requests",GNUNET_TIME_UNIT_SECONDS, &next_fin, &check_2, &p1);
249   GNUNET_STATISTICS_get(p1.stats,"core","# discarded CORE_SEND requests",GNUNET_TIME_UNIT_SECONDS, &next_fin, &check_2, &p2);
250   GNUNET_STATISTICS_get(p1.stats,"core","# discarded lower priority CORE_SEND requests",GNUNET_TIME_UNIT_SECONDS, &next_fin, &check_2, &p1);
251   GNUNET_STATISTICS_get(p1.stats,"core","# discarded lower priority CORE_SEND requests",GNUNET_TIME_UNIT_SECONDS, &next_fin, &check_2, &p2);
252   
253   GNUNET_STATISTICS_get(p1.stats,"core","# discarded CORE_SEND request bytes",GNUNET_TIME_UNIT_SECONDS, &next_fin, &check_2, &p1);
254   GNUNET_STATISTICS_get(p1.stats,"core","# discarded CORE_SEND request bytes",GNUNET_TIME_UNIT_SECONDS, &next_fin, &check_2, &p2);
255   GNUNET_STATISTICS_get(p1.stats,"core","# discarded lower priority CORE_SEND request bytes",GNUNET_TIME_UNIT_SECONDS, &next_fin, &check_2, &p1);
256   GNUNET_STATISTICS_get(p1.stats,"core","# discarded lower priority CORE_SEND request bytes",GNUNET_TIME_UNIT_SECONDS, &next_fin, &check_2, &p2);
257   measurement_running = GNUNET_NO;
258   duration = GNUNET_TIME_absolute_get_difference(start_time, GNUNET_TIME_absolute_get());
259   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
260               "\nQuota compliance: \n"                  \
261               "Receive rate: %10llu kB/s\n"
262               "Send rate   : %10llu kB/s\n"                     \
263               "Quota       : %10llu kB/s\n",
264               (total_bytes_recv/(duration.rel_value / 1000)/1024),
265               (total_bytes_sent/(duration.rel_value / 1000)/1024),
266               current_quota_p1_in/1024);
267   GNUNET_SCHEDULER_add_now (&terminate_task, NULL);
268 }
269
270 static size_t
271 transmit_ready (void *cls, size_t size, void *buf);
272
273 static void
274 send_tsk (void *cls,
275            const struct GNUNET_SCHEDULER_TaskContext *tc)
276 {
277   send_task = GNUNET_SCHEDULER_NO_TASK;
278   
279   ch = GNUNET_CORE_notify_transmit_ready (p1.ch,
280                                           0,
281                                           FAST_TIMEOUT,
282                                           &p2.id,
283                                           sizeof (struct TestMessage) + MEASUREMENT_MSG_SIZE,
284                                           &transmit_ready, &p1);
285 }
286
287
288 static void 
289 measure (unsigned long long quota_p1, unsigned long long quota_p2)
290 {
291 #if VERBOSE
292   if ((is_asymmetric_send_constant == GNUNET_YES) || (is_asymmetric_recv_constant == GNUNET_YES))
293           GNUNET_log (GNUNET_ERROR_TYPE_INFO,
294               "Starting core level measurement for %u seconds receiving peer quota %llu kB/s, sending peer quota %llu kB/s\n", MEASUREMENT_INTERVALL.rel_value / 1000 , current_quota_p1_in / 1024, current_quota_p2_out / 1024);
295   else
296           GNUNET_log (GNUNET_ERROR_TYPE_INFO,
297               "Starting core level measurement for %u seconds, symmetric quota %llu kB/s\n", MEASUREMENT_INTERVALL.rel_value / 1000 , current_quota_p2_out / 1024);
298
299 #endif
300 #if DEBUG_CONNECTIONS
301   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
302               "Asking core (1) for transmission to peer `%4s'\n",
303               GNUNET_i2s (&p2.id));
304 #endif
305   err_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
306                               &terminate_task_error,
307                               NULL);
308   measure_task = GNUNET_SCHEDULER_add_delayed (MEASUREMENT_INTERVALL,
309                               &measurement_end,
310                               NULL);
311   start_time = GNUNET_TIME_absolute_get ();
312   measurement_running = GNUNET_YES;
313   total_bytes = 0;
314   total_bytes_sent = 0;
315   ch = GNUNET_CORE_notify_transmit_ready (p1.ch,
316                                           0,
317                                           TIMEOUT,
318                                           &p2.id,
319                                           sizeof (struct TestMessage) + MEASUREMENT_MSG_SIZE,
320                                           &transmit_ready, &p1);
321 }
322
323 static int tr_n;
324
325
326 static int
327 process_mtype (void *cls,
328                const struct GNUNET_PeerIdentity *peer,
329                const struct GNUNET_MessageHeader *message,
330                const struct GNUNET_TRANSPORT_ATS_Information *atsi)
331 {
332   static int n;
333   unsigned int s;
334   const struct TestMessage *hdr;
335
336   hdr = (const struct TestMessage*) message;
337   s = sizeof (struct TestMessage) + MEASUREMENT_MSG_SIZE;
338   if (MTYPE != ntohs (message->type))
339     return GNUNET_SYSERR;
340
341 #if DEBUG_CONNECTIONS
342   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
343               "Got message %u of size %u\n",
344               ntohl (hdr->num),
345               ntohs (message->size));         
346 #endif
347   n++;
348   if (0 == (n % (TOTAL_MSGS/100)))
349     fprintf (stderr, ".");
350
351   return GNUNET_OK;
352 }
353
354
355 static struct GNUNET_CORE_MessageHandler handlers[] = {
356   {&process_mtype, MTYPE, 0},
357   {NULL, 0, 0}
358 };
359
360
361 static size_t
362 transmit_ready (void *cls, size_t size, void *buf)
363 {
364   char *cbuf = buf;
365   struct TestMessage hdr;
366   unsigned int s;
367   unsigned int ret;
368
369   if (measurement_running != GNUNET_YES)
370         return 0;
371
372   GNUNET_assert (size <= GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE); 
373   if (buf == NULL)
374     {
375       if (p1.ch != NULL)
376       {
377                 ch = GNUNET_CORE_notify_transmit_ready (p1.ch,
378                                                          0,
379                                                          FAST_TIMEOUT,
380                                                          &p2.id,
381                                                          sizeof (struct TestMessage) + MEASUREMENT_MSG_SIZE,
382                                                          &transmit_ready, &p1);
383                 GNUNET_break (NULL != ch);
384       }
385       return 0;
386     }
387   ret = 0;
388   ch = NULL;
389   s = sizeof (struct TestMessage) + MEASUREMENT_MSG_SIZE;
390
391   GNUNET_assert (size >= s);
392   GNUNET_assert (buf != NULL);
393   cbuf = buf;
394   do
395     {
396 #if DEBUG_CONNECTIONS
397       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
398                   "Sending message %u of size %u at offset %u\n",
399                   tr_n,
400                   s,
401                   ret);
402 #endif
403       hdr.header.size = htons (s);
404       hdr.header.type = htons (MTYPE);
405       hdr.num = htonl (tr_n);
406       memcpy (&cbuf[ret], &hdr, sizeof (struct TestMessage));
407       ret += sizeof (struct TestMessage);
408       memset (&cbuf[ret], tr_n, s - sizeof (struct TestMessage));
409       ret += s - sizeof (struct TestMessage);
410       tr_n++;
411       if (0 == GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 16))
412         break; /* sometimes pack buffer full, sometimes not */
413     }
414   while (size - ret >= s);
415   GNUNET_SCHEDULER_cancel (err_task);
416   err_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
417                                   &terminate_task_error, 
418                                   NULL);
419
420   total_bytes += ret;
421   total_bytes_sent += ret;
422   if (send_task != GNUNET_SCHEDULER_NO_TASK)
423           GNUNET_SCHEDULER_cancel(send_task);
424   send_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 20), &send_tsk, NULL);
425
426   return ret;
427 }
428
429
430
431 static void
432 init_notify (void *cls,
433              struct GNUNET_CORE_Handle *server,
434              const struct GNUNET_PeerIdentity *my_identity,
435              const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
436 {
437   struct PeerContext *p = cls;
438 #if DEBUG_CONNECTIONS
439   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
440               "Connection to CORE service of `%4s' established\n",
441               GNUNET_i2s (my_identity));
442 #endif
443   GNUNET_assert (server != NULL);
444   p->id = *my_identity;
445   p->ch = server;
446   if (cls == &p1)
447     {
448       GNUNET_assert (ok == 2);
449       OKPP;
450       /* connect p2 */
451       GNUNET_CORE_connect (p2.cfg, 1,
452                            &p2,
453                            &init_notify,                         
454                            &connect_notify,
455                            &disconnect_notify,
456                            NULL,
457                            &inbound_notify,
458                            GNUNET_YES,
459                            &outbound_notify, GNUNET_YES, handlers);
460     }
461   else
462     {
463       GNUNET_assert (ok == 3);
464       OKPP;
465       GNUNET_assert (cls == &p2);
466
467       measure (MEASUREMENT_MIN_QUOTA, MEASUREMENT_MIN_QUOTA);
468     }
469 }
470
471
472 static void
473 process_hello (void *cls,
474                const struct GNUNET_MessageHeader *message)
475 {
476   struct PeerContext *p = cls;
477
478   GNUNET_TRANSPORT_get_hello_cancel (p->th, &process_hello, p);
479 #if DEBUG_CONNECTIONS
480   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
481               "Received (my) `%s' from transport service\n",
482               "HELLO");
483 #endif
484   GNUNET_assert (message != NULL);
485   p->hello = GNUNET_malloc (ntohs (message->size));
486   memcpy (p->hello, message, ntohs (message->size));
487   if ((p == &p1) && (p2.th != NULL))
488     GNUNET_TRANSPORT_offer_hello (p2.th, message);
489   if ((p == &p2) && (p1.th != NULL))
490     GNUNET_TRANSPORT_offer_hello (p1.th, message);
491
492   if ((p == &p1) && (p2.hello != NULL))
493     GNUNET_TRANSPORT_offer_hello (p1.th, p2.hello);
494   if ((p == &p2) && (p1.hello != NULL))
495     GNUNET_TRANSPORT_offer_hello (p2.th, p1.hello);
496 }
497
498
499
500 static void
501 setup_peer (struct PeerContext *p, const char *cfgname)
502 {
503   p->cfg = GNUNET_CONFIGURATION_create ();
504 #if START_ARM
505   p->arm_proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm",
506                                         "gnunet-service-arm",
507 #if VERBOSE
508                                         "-L", "DEBUG",
509 #endif
510                                         "-c", cfgname, NULL);
511 #endif
512   GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
513   p->stats = GNUNET_STATISTICS_create ("core", p->cfg);
514   GNUNET_assert (p->stats != NULL);
515   p->th = GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, NULL, NULL);
516   GNUNET_assert (p->th != NULL);
517   GNUNET_TRANSPORT_get_hello (p->th, &process_hello, p);
518 }
519
520
521 static void
522 run (void *cls,
523      char *const *args,
524      const char *cfgfile,
525      const struct GNUNET_CONFIGURATION_Handle *cfg)
526 {
527   GNUNET_assert (ok == 1);
528   OKPP;
529   setup_peer (&p1, "test_core_quota_peer1.conf");
530   setup_peer (&p2, "test_core_quota_peer2.conf");
531   GNUNET_CORE_connect (p1.cfg, 1,
532                        &p1,
533                        &init_notify,
534                        &connect_notify,
535                        &disconnect_notify,
536                        NULL,
537                        &inbound_notify,
538                        GNUNET_YES, &outbound_notify, GNUNET_YES, handlers);
539
540   GNUNET_assert (GNUNET_SYSERR != GNUNET_CONFIGURATION_get_value_number (p1.cfg,
541                                          "CORE",
542                                          "TOTAL_QUOTA_IN",
543                                          &current_quota_p1_in));
544   GNUNET_assert (GNUNET_SYSERR != GNUNET_CONFIGURATION_get_value_number (p2.cfg,
545                                          "CORE",
546                                          "TOTAL_QUOTA_IN",
547                                          &current_quota_p2_in));
548   GNUNET_assert (GNUNET_SYSERR != GNUNET_CONFIGURATION_get_value_number (p1.cfg,
549                                          "CORE",
550                                          "TOTAL_QUOTA_OUT",
551                                          &current_quota_p1_out));
552   GNUNET_assert (GNUNET_SYSERR != GNUNET_CONFIGURATION_get_value_number (p2.cfg,
553                                          "CORE",
554                                          "TOTAL_QUOTA_OUT",
555                                          &current_quota_p2_out));
556 }
557
558
559 static void
560 stop_arm (struct PeerContext *p)
561 {
562 #if START_ARM
563   if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM))
564         GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
565   if (GNUNET_OS_process_wait(p->arm_proc) != GNUNET_OK)
566         GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid");
567
568   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"ARM process stopped\n");
569   GNUNET_OS_process_close (p->arm_proc);
570   p->arm_proc = NULL;
571 #endif
572   GNUNET_STATISTICS_destroy (p->stats, 0);
573   GNUNET_CONFIGURATION_destroy (p->cfg);
574 }
575
576 static int
577 check ()
578 {
579   char *const argv[] = { "test-core-quota-compliance",
580     "-c",
581     "test_core_api_data.conf",
582 #if VERBOSE
583     "-L", "DEBUG",
584 #endif
585     NULL
586   };
587   struct GNUNET_GETOPT_CommandLineOption options[] = {
588     GNUNET_GETOPT_OPTION_END
589   };
590   ok = 1;
591   GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1,
592                       argv, "test_core_quota_compliance", "nohelp", options, &run, &ok);
593   stop_arm (&p1);
594   stop_arm (&p2);
595   return ok;
596 }
597
598 int
599 main (int argc, char *argv[])
600 {
601   int ret;
602
603   GNUNET_log_setup ("test-core-quota-compliance",
604 #if VERBOSE
605                     "DEBUG",
606 #else
607                     "WARNING",
608 #endif
609                     NULL);
610   ret = check ();
611   GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-quota-peer-2");
612   GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-quota-peer-2");
613
614   return ret;
615 }
616
617 /* end of test_core_quota_compliance.c */