make test resistant againt duplicate notifications
[oweals/gnunet.git] / src / transport / test_plugin_transport.c
1 /*
2      This file is part of GNUnet.
3      (C) 2009 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 transport/test_plugin_transport.c
22  * @brief testcase for transport_api.c
23  * @author Sailor Siraj
24  * @author Christian Grothoff
25  */
26
27 #include "platform.h"
28 #include "gnunet_common.h"
29 #include "gnunet_constants.h"
30 #include "gnunet_util_lib.h"
31 #include "gnunet_hello_lib.h"
32 #include "gnunet_peerinfo_service.h"
33 #include "gnunet_statistics_service.h"
34 #include "gnunet_protocols.h"
35 #include "gnunet_signatures.h"
36 #include "gnunet_transport_plugin.h"
37
38 #include "transport.h"
39
40 /**
41  * How long until we give up on transmitting the message?
42  */
43 #define WAIT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
44 #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30)
45
46 #define HOSTKEY_FILE "test_plugin_hostkey.ecc"
47
48 /**
49  * Our public key.
50  */
51 static struct GNUNET_CRYPTO_EccPublicKey my_public_key;
52
53 /**
54  * Our identity.
55  */
56 static struct GNUNET_PeerIdentity my_identity;
57
58 /**
59  * Our private key.
60  */
61 static struct GNUNET_CRYPTO_EccPrivateKey *my_private_key;
62
63 /**
64  * Our configuration.
65  */
66 const struct GNUNET_CONFIGURATION_Handle *cfg;
67
68 /**
69  * Our configuration.
70  */
71 struct GNUNET_STATISTICS_Handle *stats;
72
73 /**
74  * Our HELLO
75  */
76 struct GNUNET_HELLO_Message *hello;
77
78 /**
79  * Number of neighbours we'd like to have.
80  */
81 static uint32_t max_connect_per_transport;
82
83 /**
84  * Environment for this plugin.
85  */
86 struct GNUNET_TRANSPORT_PluginEnvironment env;
87
88 /**
89  *handle for the api provided by this plugin
90  */
91 struct GNUNET_TRANSPORT_PluginFunctions *api;
92
93 /**
94  * Helper handler
95  */
96 struct GNUNET_HELPER_Handle *suid_helper;
97
98 /**
99  * Timeout task
100  */
101 static GNUNET_SCHEDULER_TaskIdentifier timeout_endbadly;
102
103 /**
104  * Timeout task
105  */
106 static GNUNET_SCHEDULER_TaskIdentifier timeout_wait;
107
108 /**
109  * Library name
110  */
111 static char *libname;
112
113 /**
114  * Plugin addresses head
115  */
116 struct AddressWrapper *head;
117
118 /**
119  * Plugin addresses tail
120  */
121 struct AddressWrapper *tail;
122
123 unsigned int addresses_reported;
124
125 unsigned int pretty_printers_running;
126
127 /**
128  * Did the test pass or fail?
129  */
130 static int ok;
131
132
133 struct AddressWrapper
134 {
135   struct AddressWrapper *next;
136
137   struct AddressWrapper *prev;
138
139   void *addr;
140
141   size_t addrlen;
142
143   char *addrstring;
144 };
145
146
147 static void
148 end ()
149 {
150   struct AddressWrapper *w;
151   int c = 0;
152   ok = 0;
153
154   if (GNUNET_SCHEDULER_NO_TASK != timeout_endbadly)
155   {
156       GNUNET_SCHEDULER_cancel (timeout_endbadly);
157       timeout_endbadly = GNUNET_SCHEDULER_NO_TASK;
158   }
159   if (NULL != api)
160       GNUNET_PLUGIN_unload (libname, api);
161
162   while (NULL != head)
163   {
164       w = head;
165       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
166                   "Plugin did not remove address `%s'\n", w->addrstring);
167       GNUNET_CONTAINER_DLL_remove (head, tail, w);
168       c ++;
169       GNUNET_free (w->addr);
170       GNUNET_free (w->addrstring);
171       GNUNET_free (w);
172   }
173   if (c > 0)
174   {
175     GNUNET_break (0);
176     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
177                 "Plugin did not remove %u addresses \n", c);
178     ok = 1;
179   }
180
181
182   GNUNET_free (libname);
183   libname = NULL;
184   GNUNET_STATISTICS_destroy (stats, GNUNET_NO);
185   stats = NULL;
186
187   if (NULL != suid_helper)
188   {
189     GNUNET_HELPER_stop (suid_helper, GNUNET_NO);
190     suid_helper = NULL;
191   }
192 }
193
194
195 static void
196 end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
197 {
198   struct AddressWrapper *w;
199   int c = 0;
200
201   timeout_endbadly = GNUNET_SCHEDULER_NO_TASK;
202   if (GNUNET_SCHEDULER_NO_TASK != timeout_wait)
203   {
204       GNUNET_SCHEDULER_cancel (timeout_wait);
205       timeout_wait = GNUNET_SCHEDULER_NO_TASK;
206   }
207
208   if (pretty_printers_running > 0)
209   {
210       timeout_endbadly = GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_UNIT_SECONDS, &end_badly, &ok);
211       GNUNET_log (GNUNET_ERROR_TYPE_INFO,
212                   "Have pending calls to pretty_printer ... deferring shutdown\n");
213       return;
214   }
215
216   if (NULL != cls)
217   {
218       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
219                   "Test took too long to execute, timeout .... \n");
220   }
221
222   if (NULL != libname)
223   {
224     if (NULL != api)
225       GNUNET_PLUGIN_unload (libname, api);
226     GNUNET_free (libname);
227     libname = NULL;
228   }
229
230   while (NULL != head)
231   {
232       w = head;
233       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
234                   "Plugin did not remove address `%s'\n", w->addrstring);
235       GNUNET_CONTAINER_DLL_remove (head, tail, w);
236       c ++;
237       GNUNET_free (w->addr);
238       GNUNET_free (w->addrstring);
239       GNUNET_free (w);
240   }
241   if (c > 0)
242   {
243     GNUNET_break (0);
244     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
245                 "Plugin did not remove %u addresses\n", c);
246   }
247
248   if (NULL != stats)
249   {
250     GNUNET_STATISTICS_destroy (stats, GNUNET_NO);
251     stats = NULL;
252   }
253
254   if (NULL != suid_helper)
255   {
256     GNUNET_HELPER_stop (suid_helper, GNUNET_NO);
257     suid_helper = NULL;
258   }
259
260   ok = 1;
261 }
262
263
264 static void
265 wait_end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
266 {
267   timeout_wait = GNUNET_SCHEDULER_NO_TASK;
268   if (0 == addresses_reported)
269     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
270                 "Plugin did not report any addresses, could not check address conversion functions\n");
271   end ();
272 }
273
274
275 static void
276 end_badly_now ()
277 {
278   if (GNUNET_SCHEDULER_NO_TASK != timeout_wait)
279   {
280       GNUNET_SCHEDULER_cancel (timeout_wait);
281       timeout_wait = GNUNET_SCHEDULER_NO_TASK;
282   }
283   if (GNUNET_SCHEDULER_NO_TASK != timeout_endbadly)
284   {
285       GNUNET_SCHEDULER_cancel (timeout_endbadly);
286       timeout_endbadly = GNUNET_SCHEDULER_NO_TASK;
287   }
288   timeout_endbadly = GNUNET_SCHEDULER_add_now (&end_badly, NULL);
289 }
290
291
292 static struct GNUNET_TIME_Relative
293 env_receive (void *cls,
294             const struct GNUNET_PeerIdentity *peer,
295             const struct GNUNET_MessageHeader *message,
296             struct Session * session,
297             const char *sender_address,
298             uint16_t sender_address_len)
299 {
300   /* do nothing */
301   return GNUNET_TIME_relative_get_zero_();
302 }
303
304
305 static int got_reply;
306
307
308 /**
309  * Take the given address and append it to the set of results sent back to
310  * the client.
311  *
312  * @param cls the transmission context used ('struct GNUNET_SERVER_TransmitContext*')
313  * @param buf text to transmit
314  */
315 static void
316 address_pretty_printer_cb (void *cls, const char *buf)
317 {
318   if (NULL != buf)
319   {
320     got_reply = GNUNET_YES;
321     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
322                 "Pretty address : `%s'\n", buf);
323     pretty_printers_running --;
324   }
325   else
326   {
327       if (GNUNET_NO == got_reply)
328       {
329           pretty_printers_running --;
330           GNUNET_break (0);
331           end_badly_now ();
332       }
333   }
334 }
335
336
337 static void
338 env_notify_address (void *cls,
339                     int add_remove,
340                     const void *addr,
341                     size_t addrlen,
342                     const char *plugin)
343 {
344   struct AddressWrapper *w;
345   struct AddressWrapper *wtmp;
346   void *s2a;
347   size_t s2a_len;
348
349   if (GNUNET_YES == add_remove)
350   {
351       addresses_reported ++;
352       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
353                   "Adding address of length %u\n", addrlen);
354
355       for (wtmp = head; NULL != wtmp; wtmp = wtmp->next)
356       {
357         if ((addrlen == wtmp->addrlen) && (0 == memcmp (addr, wtmp->addr, addrlen)))
358         {
359                 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
360                       "Duplicate address notification .... \n");
361                         return;
362         }
363       }
364
365       w = GNUNET_new (struct AddressWrapper);
366       w->addr = GNUNET_malloc (addrlen);
367       w->addrlen = addrlen;
368       memcpy (w->addr, addr, addrlen);
369       GNUNET_CONTAINER_DLL_insert(head, tail, w);
370       got_reply = GNUNET_NO;
371       GNUNET_log (GNUNET_ERROR_TYPE_INFO,
372                   "Testing: address_to_string \n");
373       w->addrstring = strdup (api->address_to_string (api, w->addr, w->addrlen));
374       if (NULL == w->addrstring)
375       {
376           GNUNET_break (0);
377           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
378                       "Plugin cannot convert address to string!\n");
379           end_badly_now();
380           return;
381       }
382       else
383       {
384         GNUNET_log (GNUNET_ERROR_TYPE_INFO,
385                   "Plugin added address `%s'\n", w->addrstring);
386         GNUNET_log (GNUNET_ERROR_TYPE_INFO,
387                     "Testing address_to_string: OK\n");
388       }
389
390       GNUNET_log (GNUNET_ERROR_TYPE_INFO,
391                   "Testing: string_to_address \n");
392       s2a = NULL;
393       s2a_len = 0;
394       if ((GNUNET_OK != api->string_to_address (api, w->addrstring, strlen (w->addrstring)+1, &s2a, &s2a_len)) || (NULL == s2a))
395       {
396           GNUNET_break (0);
397           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
398                       "Plugin cannot convert string to address!\n");
399           end_badly_now();
400           return;
401       }
402
403       /*
404       GNUNET_log (GNUNET_ERROR_TYPE_INFO,
405                                                 "Plugin creates `%s' %u\n",api->address_to_string (api, s2a, s2a_len), s2a_len);
406
407       int c1;
408       for (c1 = 0; c1 < s2a_len; c1++ )
409         fprintf (stderr, "%u == %u\n", ((char *) s2a)[c1], ((char *) w->addr)[c1]);
410         */
411       if (s2a_len != w->addrlen)
412       {
413           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
414                       "Plugin creates different address length when converting address->string->address: %u != %u\n", w->addrlen, s2a_len);
415       }
416       else if (0 != memcmp (s2a, w->addr, s2a_len))
417       {
418             GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
419                         "Plugin creates different address length when converting back and forth %i!\n", memcmp (s2a, w->addr, s2a_len));
420       }
421       else
422       {
423         GNUNET_log (GNUNET_ERROR_TYPE_INFO,
424                     "Testing string_to_address: OK\n");
425       }
426       GNUNET_free (s2a);
427
428       pretty_printers_running ++;
429       api->address_pretty_printer (api->cls, plugin, addr, addrlen,
430                                     GNUNET_YES, GNUNET_TIME_UNIT_MINUTES,
431                                     &address_pretty_printer_cb,
432                                     w);
433
434       if (GNUNET_OK != api->check_address (api->cls, w->addr, w->addrlen))
435       {
436           GNUNET_break (0);
437           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
438                       "Plugin refuses added address!\n");
439           end_badly_now();
440           return;
441       }
442       if (GNUNET_SCHEDULER_NO_TASK != timeout_wait)
443       {
444           GNUNET_SCHEDULER_cancel (timeout_wait);
445           timeout_wait = GNUNET_SCHEDULER_NO_TASK;
446       }
447
448       timeout_wait = GNUNET_SCHEDULER_add_delayed (WAIT, &wait_end, NULL);
449
450   }
451   else if (GNUNET_NO == add_remove)
452   {
453       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
454                   "Removing address of length %u\n", addrlen);
455
456       w = head;
457       while (NULL != w)
458       {
459           if ((addrlen == w->addrlen) && (0 == memcmp (w->addr, addr, addrlen)))
460           {
461             break;
462           }
463           w = w->next;
464       }
465
466       if (w == NULL)
467       {
468           GNUNET_break (0);
469           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
470                       "Plugin removes address never added!\n");
471           end_badly_now();
472           return;
473       }
474
475       GNUNET_CONTAINER_DLL_remove (head, tail, w);
476       GNUNET_free (w->addr);
477       GNUNET_free (w->addrstring);
478       GNUNET_free (w);
479   }
480   else
481   {
482       GNUNET_break (0);
483       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
484                   "Invalid operation: %u\n", add_remove);
485       end_badly_now ();
486       return;
487   }
488 }
489
490
491 static struct GNUNET_ATS_Information
492 env_get_address_type (void *cls,
493                      const struct sockaddr *addr,
494                      size_t addrlen)
495 {
496   struct GNUNET_ATS_Information ats;
497   ats.type = htonl (GNUNET_ATS_NETWORK_TYPE);
498   ats.value = htonl (GNUNET_ATS_NET_LOOPBACK);
499   return ats;
500 }
501
502
503 static const struct GNUNET_MessageHeader *
504 env_get_our_hello ()
505 {
506   return (const struct GNUNET_MessageHeader *) hello;
507 }
508
509
510 static void 
511 env_session_end (void *cls,
512                  const struct GNUNET_PeerIdentity *peer,
513                  struct Session * session)
514 {
515 }
516
517
518 static void
519 env_update_metrics (void *cls,
520           const struct GNUNET_PeerIdentity *peer,
521           const void *address,
522           uint16_t address_len,
523           struct Session *session,
524           const struct GNUNET_ATS_Information *ats,
525           uint32_t ats_count)
526 {
527 }
528
529
530 static void
531 setup_plugin_environment ()
532 {
533   env.cfg = cfg;
534   env.cls = &env;
535   env.my_identity = &my_identity;
536   env.max_connections = max_connect_per_transport;
537   env.stats = stats;
538   env.receive = &env_receive;
539   env.notify_address = &env_notify_address;
540   env.get_address_type = &env_get_address_type;
541   env.update_address_metrics = &env_update_metrics;
542   env.get_our_hello = &env_get_our_hello;
543   env.session_end = &env_session_end;
544 }
545
546
547 static int
548 handle_helper_message (void *cls, void *client,
549                        const struct GNUNET_MessageHeader *hdr)
550 {
551   return GNUNET_OK;
552 }
553
554
555 /**
556  * Runs the test.
557  *
558  * @param cls closure
559  * @param c configuration to use
560  */
561 static void
562 run (void *cls, char *const *args, const char *cfgfile,
563      const struct GNUNET_CONFIGURATION_Handle *c)
564 {
565   char *const *argv = cls;
566   unsigned long long tneigh;
567   char *keyfile;
568   char *plugin;
569   char *sep;
570
571   timeout_endbadly = GNUNET_SCHEDULER_add_delayed (TIMEOUT, end_badly, &ok);
572
573   cfg = c;
574   /* parse configuration */
575   if ( (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (c,
576                                                             "TRANSPORT",
577                                                             "NEIGHBOUR_LIMIT",
578                                                             &tneigh)) ||
579        (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (c,
580                                                               "PEER", "PRIVATE_KEY",
581                                                               &keyfile)))
582   {
583     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
584                 "Transport service is lacking key configuration settings.  Exiting.\n");
585     return;
586   }
587
588   if (NULL == (stats = GNUNET_STATISTICS_create ("transport", cfg)))
589   {
590     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
591                 "Could not create statistics.  Exiting.\n");
592     end_badly_now ();
593     return;
594   }
595
596   if (GNUNET_OK != GNUNET_DISK_file_test (HOSTKEY_FILE))
597   {
598       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
599                   "Hostkey `%s' missing.  Exiting.\n",
600                   HOSTKEY_FILE);
601       GNUNET_free (keyfile);
602       end_badly_now ();
603       return;
604   }
605
606   if (GNUNET_OK != GNUNET_DISK_directory_create_for_file (keyfile))
607   {
608       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
609                   "Could not create a directory for hostkey `%s'.  Exiting.\n",
610                   keyfile);
611       GNUNET_free (keyfile);
612       end_badly_now ();
613       return;
614   }
615
616   if (GNUNET_OK !=  GNUNET_DISK_file_copy (HOSTKEY_FILE, keyfile))
617   {
618       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
619                   "Could not copy hostkey `%s' to destination `%s'.  Exiting.\n",
620                   HOSTKEY_FILE, keyfile);
621       GNUNET_free (keyfile);
622       end_badly_now ();
623       return;
624   }
625
626
627   max_connect_per_transport = (uint32_t) tneigh;
628   my_private_key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile);
629   GNUNET_free (keyfile);
630   if (NULL == my_private_key)
631   {
632     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
633                 "Could not access hostkey.  Exiting.\n");
634     end_badly_now ();
635     return;
636   }
637   GNUNET_CRYPTO_ecc_key_get_public (my_private_key, &my_public_key);
638   GNUNET_CRYPTO_hash (&my_public_key, sizeof (my_public_key),
639                       &my_identity.hashPubKey);
640
641
642   hello = GNUNET_HELLO_create(&my_public_key, NULL, NULL, GNUNET_NO);
643
644   /* load plugins... */
645   setup_plugin_environment ();
646
647   GNUNET_assert (strlen (argv[0]) > strlen ("test_plugin_"));
648   plugin = strstr(argv[0],"test_plugin_");
649   sep = strrchr(argv[0],'.');
650   if (NULL == plugin)
651   {
652       GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Not a valid test name\n");
653       end_badly_now ();
654       return;
655   }
656   plugin += strlen ("test_plugin_");
657   if (NULL != sep)
658       sep[0] = '\0';
659
660   /* Hack for WLAN: start a second helper */
661   if (0 == strcmp (plugin, "wlan"))
662   {
663     char * helper_argv[3];
664     helper_argv[0] = (char *) "gnunet-helper-transport-wlan-dummy";
665     helper_argv[1] = (char *) "2";
666     helper_argv[2] = NULL;
667     suid_helper = GNUNET_HELPER_start (GNUNET_NO,
668                                        "gnunet-helper-transport-wlan-dummy",
669                                        helper_argv,
670                                        &handle_helper_message,
671                                        NULL,
672                                        NULL);
673   }
674
675   /* Loading plugin */
676   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Loading transport plugin %s\n", plugin);
677   GNUNET_asprintf (&libname, "libgnunet_plugin_transport_%s", plugin);
678   api = GNUNET_PLUGIN_load (libname, &env);
679   if (api == NULL)
680   {
681     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
682                 "Failed to load transport plugin for %s\n", plugin);
683     end_badly_now ();
684     return;
685   }
686
687   timeout_wait = GNUNET_SCHEDULER_add_delayed (WAIT, &wait_end, NULL);
688
689   /* Check if all functions are implemented */
690   if (NULL == api->address_pretty_printer)
691   {
692       GNUNET_break (0);
693       end_badly_now ();
694       return;
695   }
696   if (NULL == api->address_to_string)
697   {
698       GNUNET_break (0);
699       end_badly_now ();
700       return;
701   }
702   GNUNET_assert (NULL != api->check_address);
703   if (NULL == api->check_address)
704   {
705       GNUNET_break (0);
706       end_badly_now ();
707       return;
708   }
709   GNUNET_assert (NULL != api->disconnect);
710   if (NULL == api->disconnect)
711   {
712       GNUNET_break (0);
713       end_badly_now ();
714       return;
715   }
716   GNUNET_assert (NULL != api->get_session);
717   if (NULL == api->get_session)
718   {
719       GNUNET_break (0);
720       end_badly_now ();
721       return;
722   }
723   if (NULL == api->address_pretty_printer)
724   {
725       GNUNET_break (0);
726       end_badly_now ();
727       return;
728   }
729   if (NULL == api->string_to_address)
730   {
731       GNUNET_break (0);
732       end_badly_now ();
733       return;
734   }
735
736 }
737
738
739 /**
740  * The main function for the test
741  *
742  * @param argc number of arguments from the command line
743  * @param argv command line arguments
744  * @return 0 ok, 1 on error
745  */
746 int
747 main (int argc, char *const *argv)
748 {
749   static struct GNUNET_GETOPT_CommandLineOption options[] = {
750     GNUNET_GETOPT_OPTION_END
751   };
752   int ret;
753
754   GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-plugin-transport");
755
756   char *const argv_prog[] = {
757     "test_plugin_transport",
758     "-c",
759     "test_plugin_transport_data.conf",
760     NULL
761   };
762   GNUNET_log_setup ("test-plugin-transport",
763                     "WARNING",
764                     NULL);
765   ok = 1;                       /* set to fail */
766   ret = (GNUNET_OK == GNUNET_PROGRAM_run (3,
767                                           argv_prog,
768                                           "test-plugin-transport",
769                                           "testcase",
770                                           options,
771                                           &run,
772                                           (void *) argv)) ? ok : 1;
773   GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-plugin-transport");
774   return ret;
775 }
776
777 /* end of test_plugin_transport.c */