gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r12115 - in gnunet/src: . dht dv fragmentation fs testing


From: gnunet
Subject: [GNUnet-SVN] r12115 - in gnunet/src: . dht dv fragmentation fs testing
Date: Fri, 2 Jul 2010 15:49:05 +0200

Author: nevans
Date: 2010-07-02 15:49:05 +0200 (Fri, 02 Jul 2010)
New Revision: 12115

Modified:
   gnunet/src/Makefile.am
   gnunet/src/dht/dht_api.c
   gnunet/src/dv/dv.h
   gnunet/src/dv/test_transport_api_dv.c
   gnunet/src/dv/test_transport_dv_data.conf
   gnunet/src/fragmentation/fragmentation.c
   gnunet/src/fs/Makefile.am
   gnunet/src/testing/test_testing_data_topology_clique.conf
   gnunet/src/testing/test_testing_data_topology_none.conf
   gnunet/src/testing/test_testing_topology.c
Log:
added dv twice and dht never?

Modified: gnunet/src/Makefile.am
===================================================================
--- gnunet/src/Makefile.am      2010-07-02 13:45:46 UTC (rev 12114)
+++ gnunet/src/Makefile.am      2010-07-02 13:49:05 UTC (rev 12115)
@@ -25,8 +25,9 @@
   transport \
   peerinfo-tool \
   core \
+  dv \
   testing \
-  dv \
+  dht \
   hostlist \
   topology \
   $(NAT_DIR) \

Modified: gnunet/src/dht/dht_api.c
===================================================================
--- gnunet/src/dht/dht_api.c    2010-07-02 13:45:46 UTC (rev 12114)
+++ gnunet/src/dht/dht_api.c    2010-07-02 13:49:05 UTC (rev 12115)
@@ -574,7 +574,7 @@
           finish(handle, GNUNET_SYSERR); /* If there was a current message, 
kill it! */
         }
 #if RETRANSMIT
-      if (GNUNET_CONTAINER_multihashmap_iterate(handle->outstanding_requests, 
&retransmit_iterator, handle) > 0)
+      if ((handle->retransmit_stage != DHT_RETRANSMITTING) && 
(GNUNET_CONTAINER_multihashmap_iterate(handle->outstanding_requests, 
&retransmit_iterator, handle) > 0))
         {
           handle->retransmit_stage = DHT_RETRANSMITTING;
           handle->current = handle->retransmissions->message;

Modified: gnunet/src/dv/dv.h
===================================================================
--- gnunet/src/dv/dv.h  2010-07-02 13:45:46 UTC (rev 12114)
+++ gnunet/src/dv/dv.h  2010-07-02 13:49:05 UTC (rev 12115)
@@ -31,7 +31,7 @@
 #define DEBUG_DV_GOSSIP GNUNET_NO
 #define DEBUG_DV_GOSSIP_SEND GNUNET_NO
 #define DEBUG_DV_GOSSIP_RECEIPT GNUNET_NO
-#define DEBUG_DV_MESSAGES GNUNET_NO
+#define DEBUG_DV_MESSAGES GNUNET_YES
 #define DEBUG_DV GNUNET_NO
 #define DEBUG_DV_PEER_NUMBERS GNUNET_NO
 #define DEBUG_MESSAGE_DROP GNUNET_NO

Modified: gnunet/src/dv/test_transport_api_dv.c
===================================================================
--- gnunet/src/dv/test_transport_api_dv.c       2010-07-02 13:45:46 UTC (rev 
12114)
+++ gnunet/src/dv/test_transport_api_dv.c       2010-07-02 13:49:05 UTC (rev 
12115)
@@ -720,7 +720,7 @@
     {
 #if VERBOSE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                  "Created %d total connections, which is our target number!  
Calling send messages.\n",
+                  "Created %u total connections, which is our target number!  
Calling send messages.\n",
                   total_connections);
 #endif
 

Modified: gnunet/src/dv/test_transport_dv_data.conf
===================================================================
--- gnunet/src/dv/test_transport_dv_data.conf   2010-07-02 13:45:46 UTC (rev 
12114)
+++ gnunet/src/dv/test_transport_dv_data.conf   2010-07-02 13:49:05 UTC (rev 
12115)
@@ -6,7 +6,7 @@
 PORT = 2564
 
 [transport]
-DEBUG = NO
+DEBUG = YES
 PORT = 2565
 PLUGINS = tcp dv
 BLACKLIST_FILE = $SERVICEHOME/blacklist
@@ -45,7 +45,7 @@
 
 [dv]
 AUTOSTART = YES
-DEBUG = NO
+DEBUG = YES
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
 BINARY = gnunet-service-dv

Modified: gnunet/src/fragmentation/fragmentation.c
===================================================================
--- gnunet/src/fragmentation/fragmentation.c    2010-07-02 13:45:46 UTC (rev 
12114)
+++ gnunet/src/fragmentation/fragmentation.c    2010-07-02 13:49:05 UTC (rev 
12115)
@@ -35,10 +35,12 @@
 #include "gnunet_fragmentation_lib.h"
 #include "gnunet_protocols.h"
 #include "gnunet_util_lib.h"
+
 /**
  * Message fragment.  This header is followed
  * by the actual data of the fragment.
  */
+
 struct Fragment
 {
 
@@ -181,10 +183,16 @@
 GNUNET_FRAGMENT_context_destroy (struct GNUNET_FRAGMENT_Context *ctx)
 {
        struct GNUNET_FRAGEMENT_Ctxbuffer *buffer;
-       for(buffer = ctx->buffer; buffer!=NULL; buffer = buffer->next){
-               GNUNET_free(buffer->num);
-               GNUNET_free(buffer);
-       }
+       struct GNUNET_FRAGEMENT_Ctxbuffer *temp;
+       buffer = ctx->buffer;
+
+       while (buffer != NULL)
+         {
+            temp = buffer->next;
+            GNUNET_free(buffer->num);
+            GNUNET_free(buffer);
+            buffer = temp;
+          }
        GNUNET_free(ctx);
        GNUNET_assert (0);
 }

Modified: gnunet/src/fs/Makefile.am
===================================================================
--- gnunet/src/fs/Makefile.am   2010-07-02 13:45:46 UTC (rev 12114)
+++ gnunet/src/fs/Makefile.am   2010-07-02 13:49:05 UTC (rev 12115)
@@ -150,7 +150,6 @@
  test_fs_download \
  test_fs_download_indexed \
  test_fs_download_persistence \
- test_fs_file_information \
  test_fs_list_indexed \
  test_fs_namespace \
  test_fs_publish \
@@ -166,6 +165,7 @@
  test_gnunet_service_fs_p2p \
  $(check_SCRIPTS) 
 # $(check_PROGRAMS)
+# test_fs_file_information
 
 
 test_fs_collection_SOURCES = \

Modified: gnunet/src/testing/test_testing_data_topology_clique.conf
===================================================================
--- gnunet/src/testing/test_testing_data_topology_clique.conf   2010-07-02 
13:45:46 UTC (rev 12114)
+++ gnunet/src/testing/test_testing_data_topology_clique.conf   2010-07-02 
13:49:05 UTC (rev 12115)
@@ -41,7 +41,7 @@
 #DEBUG = YES
 
 [testing]
-NUM_PEERS = 4
+NUM_PEERS = 10
 WEAKRANDOM = YES
 TOPOLOGY = CLIQUE
 F2F = YES

Modified: gnunet/src/testing/test_testing_data_topology_none.conf
===================================================================
--- gnunet/src/testing/test_testing_data_topology_none.conf     2010-07-02 
13:45:46 UTC (rev 12114)
+++ gnunet/src/testing/test_testing_data_topology_none.conf     2010-07-02 
13:49:05 UTC (rev 12115)
@@ -3,16 +3,14 @@
 DEFAULTCONFIG = test_testing_data_topology_clique.conf
 
 [resolver]
+AUTOSTART = NO
 PORT = 0
 
 [transport]
 PORT = 0
 PLUGINS = tcp
-#PREFIX = xterm -e xterm -T transport -e gdb --args
 #BINARY = 
/home/mrwiggles/documents/research/gnunet/gnunet-ng/src/transport/.libs/gnunet-service-transport
-#PREFIX = valgrind --tool=memcheck --log-file=logs%p
-#PREFIX = valgrind --tool=callgrind --log-file=callgrind.%p
-#DEBUG = YES
+#PREFIX = valgrind --tool=massif
 
 [topology]
 PORT = 0
@@ -22,23 +20,18 @@
 DEFAULTSERVICES = 
 
 [statistics]
+AUTOSTART = NO
 PORT = 0
 
 [transport-tcp]
 PORT = 2568
+BINDTO = 127.0.0.1
 
 [peerinfo]
 PORT = 0
-#DEBUG = YES
-#PREFIX = xterm -e xterm -T peerinfo -e gdb --args
-#BINARY = 
/home/mrwiggles/documents/research/gnunet/gnunet-ng/src/peerinfo/.libs/gnunet-service-peerinfo
-#PREFIX = valgrind --tool=memcheck --log-file=peerinfo%p
 
 [core]
 PORT = 0
-#PREFIX = xterm -e xterm -T CORE -e gdb --args
-#PREFIX = valgrind --tool=memcheck --log-file=logs%p
-#DEBUG = YES
 
 [hostlist]
 PORT = 0
@@ -47,10 +40,14 @@
 PORT = 0
 
 [testing]
-NUM_PEERS = 200
+NUM_PEERS = 50
 WEAKRANDOM = YES
 TOPOLOGY = NONE
 F2F = NO
 BLACKLIST_TOPOLOGY = NONE
 CONNECT_TOPOLOGY = RING
+#CONNECT_TOPOLOGY = 2D_TORUS
+#CONNECT_TOPOLOGY = CLIQUE
+#CONNECT_TOPOLOGY_OPTION = CONNECT_DFS
+#CONNECT_TOPOLOGY_OPTION_MODIFIER = 20
 #DEBUG = YES

Modified: gnunet/src/testing/test_testing_topology.c
===================================================================
--- gnunet/src/testing/test_testing_topology.c  2010-07-02 13:45:46 UTC (rev 
12114)
+++ gnunet/src/testing/test_testing_topology.c  2010-07-02 13:49:05 UTC (rev 
12115)
@@ -24,9 +24,12 @@
 #include "platform.h"
 #include "gnunet_testing_lib.h"
 #include "gnunet_core_service.h"
+#include "gnunet_os_lib.h"
 
 #define VERBOSE GNUNET_YES
 
+#define DELAY_FOR_LOGGING GNUNET_YES
+
 /**
  * How long until we fail the whole testcase?
  */
@@ -167,6 +170,20 @@
     }
 }
 
+#if DELAY_FOR_LOGGING
+static void gather_log_data ()
+{
+  char *peer_number;
+  char *connect_number;
+  pid_t mem_process;
+  GNUNET_asprintf(&peer_number, "%llu", num_peers);
+  GNUNET_asprintf(&connect_number, "%llu", expected_connections);
+  mem_process = GNUNET_OS_start_process (NULL, NULL, "./memsize.pl",
+                           "memsize.pl", "totals.txt", peer_number, 
connect_number, NULL);
+  GNUNET_OS_process_wait(mem_process);
+}
+
+#endif
 static void
 finish_testing ()
 {
@@ -177,6 +194,7 @@
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Called finish testing, stopping daemons.\n");
 #endif
+
   int count;
   count = 0;
   pos = test_messages;
@@ -558,12 +576,22 @@
 #endif
       modnum = expected_messages / 4;
       dotnum = (expected_messages / 50) + 1;
+      GNUNET_SCHEDULER_cancel (sched, die_task);
+      die_task = GNUNET_SCHEDULER_NO_TASK;
+#if DELAY_FOR_LOGGING
+      fprintf(stdout, "Sending test messages in 10 seconds.\n");
+      GNUNET_SCHEDULER_add_delayed (sched,
+                                    GNUNET_TIME_relative_multiply
+                                    (GNUNET_TIME_UNIT_SECONDS, 10),
+                                    &send_test_messages, test_messages);
+      gather_log_data();
+#else
+      GNUNET_SCHEDULER_add_now (sched, &send_test_messages, test_messages);
+#endif
 #if VERBOSE
       fprintf(stdout, "Test message progress: [");
 #endif
-      GNUNET_SCHEDULER_cancel (sched, die_task);
-      die_task = GNUNET_SCHEDULER_NO_TASK;
-      GNUNET_SCHEDULER_add_now (sched, &send_test_messages, test_messages);
+
     }
   else if (total_connections + failed_connections == expected_connections)
     {
@@ -629,8 +657,8 @@
 #if VERBOSE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "Topology set up, now starting peers!\n");
+      fprintf(stdout, "Daemon start progress [");
 #endif
-      fprintf(stdout, "Daemon start progress [");
       GNUNET_TESTING_daemons_continue_startup(pg);
     }
   else
@@ -696,10 +724,18 @@
        * within a reasonable amount of time */
       die_task = GNUNET_SCHEDULER_add_delayed (sched,
                                                GNUNET_TIME_relative_multiply
-                                               (GNUNET_TIME_UNIT_MINUTES, 5),
+                                               (GNUNET_TIME_UNIT_MINUTES, 8),
                                                &end_badly, "from 
peers_started_callback");
-
+#if DELAY_FOR_LOGGING
+      fprintf(stdout, "Connecting topology in 10 seconds\n");
+      gather_log_data();
+      GNUNET_SCHEDULER_add_delayed (sched,
+                                    GNUNET_TIME_relative_multiply
+                                    (GNUNET_TIME_UNIT_SECONDS, 10),
+                                    &connect_topology, NULL);
+#else
       connect_topology ();
+#endif
       ok = 0;
     }
 }
@@ -861,7 +897,9 @@
   peers_left = num_peers;
   modnum = num_peers / 4;
   dotnum = (num_peers / 50) + 1;
+#if VERBOSE
   fprintf (stdout, "Hostkey generation progress: \[");
+#endif
   /* Set up a task to end testing if peer start fails */
   die_task = GNUNET_SCHEDULER_add_delayed (sched,
                                            
GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, SECONDS_PER_PEER_START 
* num_peers),




reply via email to

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