gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r11076 - gnunet/src/testing
Date: Tue, 27 Apr 2010 12:48:50 +0200

Author: nevans
Date: 2010-04-27 12:48:50 +0200 (Tue, 27 Apr 2010)
New Revision: 11076

Modified:
   gnunet/src/testing/test_testing_connect.c
   gnunet/src/testing/test_testing_group.c
   gnunet/src/testing/test_testing_topology.c
Log:
less stressful testcases for slow machines (especially a certain sparc buildot)

Modified: gnunet/src/testing/test_testing_connect.c
===================================================================
--- gnunet/src/testing/test_testing_connect.c   2010-04-27 09:52:34 UTC (rev 
11075)
+++ gnunet/src/testing/test_testing_connect.c   2010-04-27 10:48:50 UTC (rev 
11076)
@@ -24,7 +24,7 @@
 #include "platform.h"
 #include "gnunet_testing_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_YES
 
 
 /**

Modified: gnunet/src/testing/test_testing_group.c
===================================================================
--- gnunet/src/testing/test_testing_group.c     2010-04-27 09:52:34 UTC (rev 
11075)
+++ gnunet/src/testing/test_testing_group.c     2010-04-27 10:48:50 UTC (rev 
11076)
@@ -24,13 +24,14 @@
 #include "platform.h"
 #include "gnunet_testing_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_YES
 
+#define NUM_PEERS 4
 
 /**
  * How long until we give up on connecting the peers?
  */
-#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
+#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 300)
 
 
 static int ok;
@@ -48,10 +49,17 @@
        const struct GNUNET_CONFIGURATION_Handle *cfg,
        struct GNUNET_TESTING_Daemon *d, const char *emsg)
 {
-  GNUNET_assert (id != NULL);
+  if (id == NULL)
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Start callback called with error 
(too long starting peers), aborting test!\n");
+      GNUNET_TESTING_daemons_stop (pg);
+      ok = 7;
+    }
   peers_left--;
   if (peers_left == 0)
     {
+      sleep(2); /* Give other services a chance to initialize before killing */
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All peers started successfully, 
ending test!\n");
       GNUNET_TESTING_daemons_stop (pg);
       ok = 0;
     }
@@ -69,7 +77,7 @@
 #if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting daemons.\n");
 #endif
-  peers_left = 8;
+  peers_left = NUM_PEERS;
   pg = GNUNET_TESTING_daemons_start (sched, cfg,
                                      peers_left,
                                      &my_cb, NULL, NULL, NULL, NULL);

Modified: gnunet/src/testing/test_testing_topology.c
===================================================================
--- gnunet/src/testing/test_testing_topology.c  2010-04-27 09:52:34 UTC (rev 
11075)
+++ gnunet/src/testing/test_testing_topology.c  2010-04-27 10:48:50 UTC (rev 
11076)
@@ -57,7 +57,7 @@
 
 static unsigned int expected_connections;
 
-static int peers_left;
+static unsigned long long peers_left;
 
 static struct GNUNET_TESTING_PeerGroup *pg;
 
@@ -524,7 +524,7 @@
 {
   GNUNET_assert (id != NULL);
 #if VERBOSE
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Started daemon %d out of %d\n",
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Started daemon %llu out of %llu\n",
               (num_peers - peers_left) + 1, num_peers);
 #endif
   peers_left--;





reply via email to

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