2 This file is part of GNUnet.
3 (C) 2009, 2010 Christian Grothoff (and other contributing authors)
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.
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.
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.
21 * @file core/test_core_quota_compliance.c
22 * @brief testcase for core_api.c focusing quota compliance on core level
25 #include "gnunet_common.h"
26 #include "gnunet_constants.h"
27 #include "gnunet_arm_service.h"
28 #include "gnunet_core_service.h"
29 #include "gnunet_getopt_lib.h"
30 #include "gnunet_os_lib.h"
31 #include "gnunet_program_lib.h"
32 #include "gnunet_scheduler_lib.h"
33 #include "gnunet_transport_service.h"
34 #include "gnunet_statistics_service.h"
36 #define VERBOSE GNUNET_NO
37 #define DEBUG_TRANSMISSION GNUNET_NO
40 #define ASYMMETRIC_SEND_LIMITED 1
41 #define ASYMMETRIC_RECV_LIMITED 2
43 #define START_ARM GNUNET_YES
46 * Note that this value must not significantly exceed
47 * 'MAX_PENDING' in 'gnunet-service-transport.c', otherwise
48 * messages may be dropped even for a reliable transport.
50 #define TOTAL_MSGS (60000 * 10)
53 * How long until we give up on transmitting the message?
55 #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 180)
58 * What delay do we request from the core service for transmission?
60 #define FAST_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
63 #define MESSAGESIZE 1024
64 #define MEASUREMENT_LENGTH GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
66 static unsigned long long total_bytes_sent;
67 static unsigned long long total_bytes_recv;
69 static struct GNUNET_TIME_Absolute start_time;
71 static GNUNET_SCHEDULER_TaskIdentifier err_task;
73 static GNUNET_SCHEDULER_TaskIdentifier measure_task;
78 struct GNUNET_CONFIGURATION_Handle *cfg;
79 struct GNUNET_CORE_Handle *ch;
80 struct GNUNET_PeerIdentity id;
81 struct GNUNET_TRANSPORT_Handle *th;
82 struct GNUNET_MessageHeader *hello;
83 struct GNUNET_STATISTICS_Handle *stats;
86 struct GNUNET_OS_Process *arm_proc;
90 static struct PeerContext p1;
91 static struct PeerContext p2;
93 static unsigned long long current_quota_p1_in;
94 static unsigned long long current_quota_p1_out;
95 static unsigned long long current_quota_p2_in;
96 static unsigned long long current_quota_p2_out;
106 #define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
108 #define OKPP do { ok++; } while (0)
113 struct GNUNET_MessageHeader header;
118 process_hello (void *cls, const struct GNUNET_MessageHeader *message);
121 terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
123 struct GNUNET_CORE_Handle *ch;
125 GNUNET_TRANSPORT_get_hello_cancel (p2.th, &process_hello, &p2);
126 GNUNET_TRANSPORT_get_hello_cancel (p1.th, &process_hello, &p1);
129 GNUNET_CORE_disconnect (ch);
132 GNUNET_CORE_disconnect (ch);
133 GNUNET_TRANSPORT_disconnect (p1.th);
135 GNUNET_TRANSPORT_disconnect (p2.th);
141 terminate_task_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
143 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
144 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Testcase failed!\n");
147 if (measure_task != GNUNET_SCHEDULER_NO_TASK)
148 GNUNET_SCHEDULER_cancel (measure_task);
150 GNUNET_TRANSPORT_get_hello_cancel (p1.th, &process_hello, &p1);
151 GNUNET_TRANSPORT_get_hello_cancel (p2.th, &process_hello, &p2);
153 GNUNET_CORE_disconnect (p1.ch);
155 GNUNET_CORE_disconnect (p2.ch);
157 GNUNET_TRANSPORT_disconnect (p1.th);
159 GNUNET_TRANSPORT_disconnect (p2.th);
166 * Callback function to process statistic values.
169 * @param subsystem name of subsystem that created the statistic
170 * @param name the name of the datum
171 * @param value the current value
172 * @param is_persistent GNUNET_YES if the value is persistent, GNUNET_NO if not
173 * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration
176 print_stat (void *cls, const char *subsystem, const char *name, uint64_t value,
180 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer1 %50s = %12llu\n", name,
181 (unsigned long long) value);
183 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer2 %50s = %12llu\n", name,
184 (unsigned long long) value);
189 measurement_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
191 unsigned long long int delta;
192 unsigned long long int throughput_out;
193 unsigned long long int throughput_in;
194 unsigned long long int max_quota_in;
195 unsigned long long int max_quota_out;
196 unsigned long long int quota_delta;
198 measure_task = GNUNET_SCHEDULER_NO_TASK;
199 fprintf (stdout, "\n");
202 delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value;
204 throughput_out = total_bytes_sent * 1000 / 1024 / delta;
205 throughput_in = total_bytes_recv * 1000 / 1024 / delta;
207 if (current_quota_p1_in < current_quota_p2_in)
208 max_quota_in = current_quota_p1_in;
210 max_quota_in = current_quota_p2_in;
211 if (current_quota_p1_out < current_quota_p2_out)
212 max_quota_out = current_quota_p1_out;
214 max_quota_out = current_quota_p2_out;
216 if (max_quota_out < max_quota_in)
217 quota_delta = max_quota_in / 10;
219 quota_delta = max_quota_out / 10;
221 if ((throughput_out > (max_quota_out + quota_delta) / 1024) ||
222 (throughput_in > (max_quota_in + quota_delta) / 1024))
227 GNUNET_STATISTICS_get (p1.stats, "core", "# discarded CORE_SEND requests",
228 GNUNET_TIME_UNIT_FOREVER_REL, NULL, &print_stat, &p1);
230 GNUNET_STATISTICS_get (p1.stats, "core",
231 "# discarded CORE_SEND request bytes",
232 GNUNET_TIME_UNIT_FOREVER_REL, NULL, &print_stat, &p1);
233 GNUNET_STATISTICS_get (p1.stats, "core",
234 "# discarded lower priority CORE_SEND requests",
235 GNUNET_TIME_UNIT_FOREVER_REL, NULL, &print_stat, NULL);
236 GNUNET_STATISTICS_get (p1.stats, "core",
237 "# discarded lower priority CORE_SEND request bytes",
238 GNUNET_TIME_UNIT_FOREVER_REL, NULL, &print_stat, &p1);
239 GNUNET_STATISTICS_get (p2.stats, "core", "# discarded CORE_SEND requests",
240 GNUNET_TIME_UNIT_FOREVER_REL, NULL, &print_stat, &p2);
242 GNUNET_STATISTICS_get (p2.stats, "core",
243 "# discarded CORE_SEND request bytes",
244 GNUNET_TIME_UNIT_FOREVER_REL, NULL, &print_stat, &p2);
245 GNUNET_STATISTICS_get (p2.stats, "core",
246 "# discarded lower priority CORE_SEND requests",
247 GNUNET_TIME_UNIT_FOREVER_REL, NULL, &print_stat, &p2);
248 GNUNET_STATISTICS_get (p2.stats, "core",
249 "# discarded lower priority CORE_SEND request bytes",
250 GNUNET_TIME_UNIT_FOREVER_REL, NULL, &print_stat, &p2);
252 enum GNUNET_ErrorType kind = GNUNET_ERROR_TYPE_DEBUG;
256 kind = GNUNET_ERROR_TYPE_ERROR;
261 GNUNET_log (kind, "Core quota compliance test with symmetric quotas: %s\n",
262 (ok == 0) ? "PASSED" : "FAILED");
264 case ASYMMETRIC_SEND_LIMITED:
266 "Core quota compliance test with limited sender quota: %s\n",
267 (ok == 0) ? "PASSED" : "FAILED");
269 case ASYMMETRIC_RECV_LIMITED:
271 "Core quota compliance test with limited receiver quota: %s\n",
272 (ok == 0) ? "PASSED" : "FAILED");
275 GNUNET_log (kind, "Peer 1 send rate: %llu kB/s (%llu Bytes in %u sec.)\n",
276 throughput_out, total_bytes_sent, delta / 1000);
277 GNUNET_log (kind, "Peer 1 send quota: %llu kB/s\n",
278 current_quota_p1_out / 1024);
279 GNUNET_log (kind, "Peer 2 receive rate: %llu kB/s (%llu Bytes in %u sec.)\n",
280 throughput_in, total_bytes_recv, delta / 1000);
281 GNUNET_log (kind, "Peer 2 receive quota: %llu kB/s\n",
282 current_quota_p2_in / 1024);
284 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Max. inbound quota allowed: %llu kB/s\n",max_quota_in /1024);
285 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Max. outbound quota allowed: %llu kB/s\n",max_quota_out/1024);
287 GNUNET_SCHEDULER_cancel (err_task);
288 GNUNET_SCHEDULER_add_now (&terminate_task, NULL);
293 transmit_ready (void *cls, size_t size, void *buf)
296 struct TestMessage hdr;
299 GNUNET_assert (size <= GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE);
302 if ((p1.ch != NULL) && (p1.connect_status == 1))
303 GNUNET_break (NULL !=
304 GNUNET_CORE_notify_transmit_ready (p1.ch, GNUNET_NO, 0,
305 FAST_TIMEOUT, &p2.id,
307 &transmit_ready, &p1));
310 GNUNET_assert (tr_n < TOTAL_MSGS);
312 GNUNET_assert (size >= MESSAGESIZE);
313 GNUNET_assert (buf != NULL);
317 #if DEBUG_TRANSMISSION
318 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
319 "Sending message %u of size %u at offset %u\n", tr_n,
322 hdr.header.size = htons (MESSAGESIZE);
323 hdr.header.type = htons (MTYPE);
324 hdr.num = htonl (tr_n);
325 memcpy (&cbuf[ret], &hdr, sizeof (struct TestMessage));
326 ret += sizeof (struct TestMessage);
327 memset (&cbuf[ret], tr_n, MESSAGESIZE - sizeof (struct TestMessage));
328 ret += MESSAGESIZE - sizeof (struct TestMessage);
330 if (0 == GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 16))
331 break; /* sometimes pack buffer full, sometimes not */
333 while (size - ret >= MESSAGESIZE);
334 GNUNET_SCHEDULER_cancel (err_task);
336 GNUNET_SCHEDULER_add_delayed (TIMEOUT, &terminate_task_error, NULL);
338 total_bytes_sent += ret;
345 connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer,
346 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
348 struct PeerContext *pc = cls;
350 if (0 == memcmp (&pc->id, peer, sizeof (struct GNUNET_PeerIdentity)))
352 GNUNET_assert (pc->connect_status == 0);
353 pc->connect_status = 1;
356 #if DEBUG_TRANSMISSION
357 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
358 "Encrypted connection established to peer `%4s'\n",
360 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
361 "Asking core (1) for transmission to peer `%4s'\n",
362 GNUNET_i2s (&p2.id));
364 if (err_task != GNUNET_SCHEDULER_NO_TASK)
365 GNUNET_SCHEDULER_cancel (err_task);
367 GNUNET_SCHEDULER_add_delayed (TIMEOUT, &terminate_task_error, NULL);
368 start_time = GNUNET_TIME_absolute_get ();
369 running = GNUNET_YES;
371 GNUNET_SCHEDULER_add_delayed (MEASUREMENT_LENGTH, &measurement_stop,
374 GNUNET_break (NULL !=
375 GNUNET_CORE_notify_transmit_ready (p1.ch, GNUNET_NO, 0,
378 &transmit_ready, &p1));
384 disconnect_notify (void *cls, const struct GNUNET_PeerIdentity *peer)
386 struct PeerContext *pc = cls;
388 if (0 == memcmp (&pc->id, peer, sizeof (struct GNUNET_PeerIdentity)))
390 pc->connect_status = 0;
391 #if DEBUG_TRANSMISSION
392 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Encrypted connection to `%4s' cut\n",
399 inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
400 const struct GNUNET_MessageHeader *message,
401 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
403 #if DEBUG_TRANSMISSION
404 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
405 "Core provides inbound data from `%4s' %llu.\n",
406 GNUNET_i2s (other), ntohs (message->size));
408 total_bytes_recv += ntohs (message->size);
414 outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
415 const struct GNUNET_MessageHeader *message,
416 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
418 #if DEBUG_TRANSMISSION
419 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
420 "Core notifies about outbound data for `%4s'.\n",
428 transmit_ready (void *cls, size_t size, void *buf);
431 process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
432 const struct GNUNET_MessageHeader *message,
433 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
436 const struct TestMessage *hdr;
438 hdr = (const struct TestMessage *) message;
439 if (MTYPE != ntohs (message->type))
440 return GNUNET_SYSERR;
441 if (ntohs (message->size) != MESSAGESIZE)
443 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
444 "Expected message %u of size %u, got %u bytes of message %u\n",
445 n, MESSAGESIZE, ntohs (message->size), ntohl (hdr->num));
446 GNUNET_SCHEDULER_cancel (err_task);
447 err_task = GNUNET_SCHEDULER_add_now (&terminate_task_error, NULL);
448 return GNUNET_SYSERR;
450 if (ntohl (hdr->num) != n)
452 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
453 "Expected message %u of size %u, got %u bytes of message %u\n",
454 n, MESSAGESIZE, ntohs (message->size), ntohl (hdr->num));
455 GNUNET_SCHEDULER_cancel (err_task);
456 err_task = GNUNET_SCHEDULER_add_now (&terminate_task_error, NULL);
457 return GNUNET_SYSERR;
459 #if DEBUG_TRANSMISSION
460 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Got message %u of size %u\n",
461 ntohl (hdr->num), ntohs (message->size));
465 fprintf (stderr, ".");
468 if (running == GNUNET_YES)
469 GNUNET_break (NULL !=
470 GNUNET_CORE_notify_transmit_ready (p1.ch, GNUNET_NO, 0,
471 FAST_TIMEOUT, &p2.id,
473 &transmit_ready, &p1));
478 static struct GNUNET_CORE_MessageHandler handlers[] = {
479 {&process_mtype, MTYPE, 0},
486 init_notify (void *cls, struct GNUNET_CORE_Handle *server,
487 const struct GNUNET_PeerIdentity *my_identity,
488 const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
490 struct PeerContext *p = cls;
492 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
493 "Connection to CORE service of `%4s' established\n",
494 GNUNET_i2s (my_identity));
495 GNUNET_assert (server != NULL);
496 p->id = *my_identity;
500 GNUNET_assert (ok == 2);
503 GNUNET_CORE_connect (p2.cfg, 1, &p2, &init_notify, &connect_notify,
504 &disconnect_notify, NULL, &inbound_notify, GNUNET_YES,
505 &outbound_notify, GNUNET_YES, handlers);
509 GNUNET_assert (ok == 3);
511 GNUNET_assert (cls == &p2);
512 #if DEBUG_TRANSMISSION
513 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
514 "Asking core (1) to connect to peer `%4s'\n",
515 GNUNET_i2s (&p2.id));
517 GNUNET_CORE_peer_request_connect (p1.ch, &p2.id, NULL, NULL);
523 process_hello (void *cls, const struct GNUNET_MessageHeader *message)
525 struct PeerContext *p = cls;
528 #if DEBUG_TRANSMISSION
529 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
530 "Received (my) `%s' from transport service\n", "HELLO");
532 GNUNET_assert (message != NULL);
533 p->hello = GNUNET_malloc (ntohs (message->size));
534 memcpy (p->hello, message, ntohs (message->size));
535 if ((p == &p1) && (p2.th != NULL))
536 GNUNET_TRANSPORT_offer_hello (p2.th, message, NULL, NULL);
537 if ((p == &p2) && (p1.th != NULL))
538 GNUNET_TRANSPORT_offer_hello (p1.th, message, NULL, NULL);
540 if ((p == &p1) && (p2.hello != NULL))
541 GNUNET_TRANSPORT_offer_hello (p1.th, p2.hello, NULL, NULL);
542 if ((p == &p2) && (p1.hello != NULL))
543 GNUNET_TRANSPORT_offer_hello (p2.th, p1.hello, NULL, NULL);
549 setup_peer (struct PeerContext *p, const char *cfgname)
551 p->cfg = GNUNET_CONFIGURATION_create ();
554 GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm",
555 "gnunet-service-arm",
559 "-c", cfgname, NULL);
561 GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
562 p->stats = GNUNET_STATISTICS_create ("core", p->cfg);
563 GNUNET_assert (p->stats != NULL);
564 p->th = GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, NULL, NULL);
565 GNUNET_assert (p->th != NULL);
566 GNUNET_TRANSPORT_get_hello (p->th, &process_hello, p);
571 run (void *cls, char *const *args, const char *cfgfile,
572 const struct GNUNET_CONFIGURATION_Handle *cfg)
574 GNUNET_assert (ok == 1);
577 GNUNET_SCHEDULER_add_delayed (TIMEOUT, &terminate_task_error, NULL);
578 if (test == SYMMETRIC)
580 setup_peer (&p1, "test_core_quota_peer1.conf");
581 setup_peer (&p2, "test_core_quota_peer2.conf");
583 else if (test == ASYMMETRIC_SEND_LIMITED)
585 setup_peer (&p1, "test_core_quota_asymmetric_send_limit_peer1.conf");
586 setup_peer (&p2, "test_core_quota_asymmetric_send_limit_peer2.conf");
588 else if (test == ASYMMETRIC_RECV_LIMITED)
590 setup_peer (&p1, "test_core_quota_asymmetric_recv_limited_peer1.conf");
591 setup_peer (&p2, "test_core_quota_asymmetric_recv_limited_peer2.conf");
594 GNUNET_assert (test != -1);
595 GNUNET_assert (GNUNET_SYSERR !=
596 GNUNET_CONFIGURATION_get_value_number (p1.cfg, "CORE",
598 ¤t_quota_p1_in));
599 GNUNET_assert (GNUNET_SYSERR !=
600 GNUNET_CONFIGURATION_get_value_number (p2.cfg, "CORE",
602 ¤t_quota_p2_in));
603 GNUNET_assert (GNUNET_SYSERR !=
604 GNUNET_CONFIGURATION_get_value_number (p1.cfg, "CORE",
606 ¤t_quota_p1_out));
607 GNUNET_assert (GNUNET_SYSERR !=
608 GNUNET_CONFIGURATION_get_value_number (p2.cfg, "CORE",
610 ¤t_quota_p2_out));
612 GNUNET_CORE_connect (p1.cfg, 1, &p1, &init_notify, &connect_notify,
613 &disconnect_notify, NULL, &inbound_notify, GNUNET_YES,
614 &outbound_notify, GNUNET_YES, handlers);
619 stop_arm (struct PeerContext *p)
622 if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM))
623 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
624 if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK)
625 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid");
626 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ARM process %u stopped\n",
627 GNUNET_OS_process_get_pid (p->arm_proc));
628 GNUNET_OS_process_close (p->arm_proc);
631 GNUNET_CONFIGURATION_destroy (p->cfg);
639 char *const argv[] = { "test-core-quota-compliance",
641 "test_core_api_data.conf",
647 struct GNUNET_GETOPT_CommandLineOption options[] = {
648 GNUNET_GETOPT_OPTION_END
651 GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv,
652 "test-core-quota-compliance", "nohelp", options, &run,
660 main (int argc, char *argv[])
665 if (strstr (argv[0], "_symmetric") != NULL)
669 else if (strstr (argv[0], "_asymmetric_send") != NULL)
671 test = ASYMMETRIC_SEND_LIMITED;
673 else if (strstr (argv[0], "_asymmetric_recv") != NULL)
675 test = ASYMMETRIC_RECV_LIMITED;
677 GNUNET_assert (test != -1);
678 if (test == SYMMETRIC)
680 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-quota-sym-peer-1/");
681 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-quota-sym-peer-2/");
683 else if (test == ASYMMETRIC_SEND_LIMITED)
685 GNUNET_DISK_directory_remove
686 ("/tmp/test-gnunet-core-quota-asym-send-lim-peer-1/");
687 GNUNET_DISK_directory_remove
688 ("/tmp/test-gnunet-core-quota-asym-send-lim-peer-2/");
690 else if (test == ASYMMETRIC_RECV_LIMITED)
692 GNUNET_DISK_directory_remove
693 ("/tmp/test-gnunet-core-quota-asym-recv-lim-peer-1/");
694 GNUNET_DISK_directory_remove
695 ("/tmp/test-gnunet-core-quota-asym-recv-lim-peer-2/");
698 GNUNET_log_setup ("test-core-quota-compliance",
706 if (test == SYMMETRIC)
708 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-quota-sym-peer-1/");
709 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-quota-sym-peer-2/");
711 else if (test == ASYMMETRIC_SEND_LIMITED)
713 GNUNET_DISK_directory_remove
714 ("/tmp/test-gnunet-core-quota-asym-send-lim-peer-1/");
715 GNUNET_DISK_directory_remove
716 ("/tmp/test-gnunet-core-quota-asym-send-lim-peer-2/");
718 else if (test == ASYMMETRIC_RECV_LIMITED)
720 GNUNET_DISK_directory_remove
721 ("/tmp/test-gnunet-core-quota-asym-recv-lim-peer-1/");
722 GNUNET_DISK_directory_remove
723 ("/tmp/test-gnunet-core-quota-asym-recv-lim-peer-2/");
731 /* end of test_core_api_reliability.c */