gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r10717 - gnunet/src/testing


From: gnunet
Subject: [GNUnet-SVN] r10717 - gnunet/src/testing
Date: Tue, 30 Mar 2010 16:55:27 +0200

Author: nevans
Date: 2010-03-30 16:55:27 +0200 (Tue, 30 Mar 2010)
New Revision: 10717

Modified:
   gnunet/src/testing/testing.c
   gnunet/src/testing/testing_group.c
Log:
write control_host information to testing configs (for remote starting), hasn't 
been sufficiently tested

Modified: gnunet/src/testing/testing.c
===================================================================
--- gnunet/src/testing/testing.c        2010-03-30 11:17:58 UTC (rev 10716)
+++ gnunet/src/testing/testing.c        2010-03-30 14:55:27 UTC (rev 10717)
@@ -40,7 +40,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 +168,13 @@
       /* 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 +189,13 @@
             GNUNET_asprintf (&dst, "address@hidden", 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,
@@ -534,7 +548,7 @@
 #if DEBUG_TESTING
                                               "-L", "DEBUG",
 #endif
-                                              "-c", d->cfgfile, "-e", "-d", 
NULL);
+                                              "-c", d->cfgfile, "-e", NULL);
       /* Use -e to end arm, and -d to remove temp files */
 
       GNUNET_free (arg);

Modified: gnunet/src/testing/testing_group.c
===================================================================
--- gnunet/src/testing/testing_group.c  2010-03-30 11:17:58 UTC (rev 10716)
+++ gnunet/src/testing/testing_group.c  2010-03-30 14:55:27 UTC (rev 10717)
@@ -27,7 +27,7 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_testing_lib.h"
 
-#define VERBOSE_TESTING GNUNET_NO
+#define VERBOSE_TESTING GNUNET_YES
 
 /**
  * Lowest port used for GNUnet testing.  Should be high enough to not
@@ -44,7 +44,7 @@
  */
 #define HIGH_PORT 32000
 
-#define MAX_OUTSTANDING_CONNECTIONS 30
+#define MAX_OUTSTANDING_CONNECTIONS 50
 
 #define CONNECT_TIMEOUT GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_SECONDS, 180)
 
@@ -225,10 +225,13 @@
 {
   struct UpdateContext uc;
   uint16_t orig;
+  char *control_host;
+  char *allowed_hosts;
 
   orig = *port;
   uc.nport = *port;
   uc.ret = GNUNET_CONFIGURATION_create ();
+
   GNUNET_CONFIGURATION_iterate (cfg, &update_config, &uc);
   if (uc.nport >= HIGH_PORT)
     {
@@ -236,6 +239,15 @@
       GNUNET_CONFIGURATION_destroy (uc.ret);
       return NULL;
     }
+
+  if (GNUNET_CONFIGURATION_get_value_string(cfg, "testing", "control_host", 
&control_host) == GNUNET_OK)
+    {
+      GNUNET_asprintf(&allowed_hosts, "%s; 127.0.0.1;", control_host);
+      fprintf(stderr, "FOUND CONTROL_HOST OPTION %s, setting to %s\n", 
control_host, allowed_hosts);
+      GNUNET_CONFIGURATION_set_value_string(uc.ret, "core", "ACCEPT_FROM", 
allowed_hosts);
+      GNUNET_free(allowed_hosts);
+    }
+
   *port = (uint16_t) uc.nport;
   return uc.ret;
 }
@@ -1173,6 +1185,7 @@
       GNUNET_break (0);
       return NULL;
     }
+
   pg = GNUNET_malloc (sizeof (struct GNUNET_TESTING_PeerGroup));
   pg->sched = sched;
   pg->cfg = cfg;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]