- some tests did not clean up
authorMatthias Wachs <wachs@net.in.tum.de>
Thu, 19 Jul 2012 08:54:25 +0000 (08:54 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Thu, 19 Jul 2012 08:54:25 +0000 (08:54 +0000)
src/transport/test_transport_api_limited_sockets.c
src/transport/test_transport_startonly.c
src/transport/test_transport_testing.c

index c605a31822d83eed145cbe8cde54bf1a587110fb..e3c294a1c8ab6a58f811e3caa3a592138cef337d 100644 (file)
@@ -94,6 +94,8 @@ end ()
 
   GNUNET_TRANSPORT_TESTING_stop_peer (tth, p1);
   GNUNET_TRANSPORT_TESTING_stop_peer (tth, p2);
+  GNUNET_TRANSPORT_TESTING_done (tth);
+
 }
 
 static void
@@ -118,6 +120,9 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   if (p2 != NULL)
     GNUNET_TRANSPORT_TESTING_stop_peer (tth, p2);
 
+  if (NULL != th)
+    GNUNET_TRANSPORT_TESTING_done (tth);
+
   ok = GNUNET_SYSERR;
 }
 
index 0f3e88b1f0a8da127d7d979f16e0eaac214fc0e2..8a8fef161142b52b256d47cdec420d48b43f3b65 100644 (file)
@@ -59,6 +59,7 @@ end ()
     GNUNET_SCHEDULER_cancel (timeout_task);
     timeout_task = GNUNET_SCHEDULER_NO_TASK;
   }
+  GNUNET_TRANSPORT_TESTING_done (tth);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Exiting\n");
 }
 
@@ -73,7 +74,8 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
   if (p1 != NULL)
     GNUNET_TRANSPORT_TESTING_stop_peer (tth, p1);
-
+  if (NULL != tth)
+    GNUNET_TRANSPORT_TESTING_done (tth);
   ret = GNUNET_SYSERR;
 }
 
@@ -137,8 +139,6 @@ run (void *cls, char *const *args, const char *cfgfile,
       FPRINTF (stderr, "..%i", i);
   }
 
-  tth = GNUNET_TRANSPORT_TESTING_init ();
-
   FPRINTF (stderr, "%s",  "\n");
   end ();
 }
index 7875f1cfa191709382eb386b6529ba37e63eaa10..9db5913066b158915db13b0ba69e9b37465003ad 100644 (file)
@@ -78,7 +78,8 @@ end_badly ()
   if (p2 != NULL)
     GNUNET_TRANSPORT_TESTING_stop_peer (tth, p2);
 
-  GNUNET_TRANSPORT_TESTING_done (tth);
+  if (NULL != tth)
+    GNUNET_TRANSPORT_TESTING_done (tth);
 
   ret = GNUNET_SYSERR;
 }