towards fixing blacklisting APIs and implementation
[oweals/gnunet.git] / src / testing / testing.c
index a1bbb4f70a6714d1b25d7949503c6c1f40e97a2f..eae5076e093d1dda7b4414678ddd3573f8cd4c54 100644 (file)
  *        ONLY for writing testcases!
  * @author Christian Grothoff
  *
- * TODO:
- * - modify configuration to allow 2087-connections from
- *   controlling host (otherwise shutdown won't work)
- *
  */
 #include "platform.h"
 #include "gnunet_arm_service.h"
@@ -40,7 +36,7 @@
 #include "gnunet_testing_lib.h"
 #include "gnunet_transport_service.h"
 
-#define DEBUG_TESTING GNUNET_NO
+#define DEBUG_TESTING GNUNET_YES
 
 /**
  * How long do we wait after starting gnunet-service-arm
@@ -168,6 +164,13 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
       /* start GNUnet on remote host */
       if (NULL == d->hostname)
         {
+#if DEBUG_TESTING
+          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                      "Starting `%s', with command `%s %s %s %s %s %s'.\n",
+                      "gnunet-arm", "gnunet-arm", "-c", d->cfgfile,
+                      "-L", "DEBUG",
+                      "-s");
+#endif
           d->pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-arm",
                                             "gnunet-arm",
                                             "-c", d->cfgfile,
@@ -182,6 +185,13 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
             GNUNET_asprintf (&dst, "%s@%s", d->username, d->hostname);
           else
             dst = GNUNET_strdup (d->hostname);
+
+#if DEBUG_TESTING
+          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                      "Starting `%s', with command `%s %s %s %s %s %s %s %s'.\n",
+                      "gnunet-arm", "ssh", dst, "gnunet-arm", "-c", d->cfgfile,
+                      "-L", "DEBUG", "-s");
+#endif
           d->pid = GNUNET_OS_start_process (NULL, NULL, "ssh",
                                             "ssh",
                                             dst,
@@ -255,7 +265,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                                        ARM_START_WAIT,
                                        d,
                                        &testing_init,
-                                       NULL, NULL, NULL,
+                                       NULL, NULL,
                                        NULL, GNUNET_NO,
                                        NULL, GNUNET_NO, no_handlers);
       break;
@@ -521,7 +531,7 @@ GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d,
     {
 #if DEBUG_TESTING
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                  "Stopping gnunet-arm on with config `%s' on host `%s'.\n", d->cfgfile, d->hostname);
+                  "Stopping gnunet-arm with config `%s' on host `%s'.\n", d->cfgfile, d->hostname);
 #endif
 
       if (d->username != NULL)
@@ -894,7 +904,7 @@ GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1,
                                      timeout,
                                      ctx,
                                      NULL,
-                                     NULL, &connect_notify, NULL,
+                                     &connect_notify, NULL,
                                      NULL, GNUNET_NO,
                                      NULL, GNUNET_NO, no_handlers);
   if (ctx->d1core == NULL)