diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-07-02 13:49:05 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-07-02 13:49:05 +0000 |
commit | 76aac1b58af3a2c8488875d0f3d0e994563d80ca (patch) | |
tree | d912c773ff03732e5e1717aeb9df63cd10ac70ea | |
parent | ec2d856c3d790a042f6edf7ad0487bc4024d15c4 (diff) | |
download | gnunet-76aac1b58af3a2c8488875d0f3d0e994563d80ca.tar.gz gnunet-76aac1b58af3a2c8488875d0f3d0e994563d80ca.zip |
added dv twice and dht never?
-rw-r--r-- | src/Makefile.am | 3 | ||||
-rw-r--r-- | src/dht/dht_api.c | 2 | ||||
-rw-r--r-- | src/dv/dv.h | 2 | ||||
-rw-r--r-- | src/dv/test_transport_api_dv.c | 2 | ||||
-rw-r--r-- | src/dv/test_transport_dv_data.conf | 4 | ||||
-rw-r--r-- | src/fragmentation/fragmentation.c | 16 | ||||
-rw-r--r-- | src/fs/Makefile.am | 2 | ||||
-rw-r--r-- | src/testing/test_testing_data_topology_clique.conf | 2 | ||||
-rw-r--r-- | src/testing/test_testing_data_topology_none.conf | 21 | ||||
-rw-r--r-- | src/testing/test_testing_topology.c | 50 |
10 files changed, 74 insertions, 30 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index aa68c8537..46189da71 100644 --- a/src/Makefile.am +++ b/src/Makefile.am | |||
@@ -25,8 +25,9 @@ SUBDIRS = \ | |||
25 | transport \ | 25 | transport \ |
26 | peerinfo-tool \ | 26 | peerinfo-tool \ |
27 | core \ | 27 | core \ |
28 | testing \ | ||
29 | dv \ | 28 | dv \ |
29 | testing \ | ||
30 | dht \ | ||
30 | hostlist \ | 31 | hostlist \ |
31 | topology \ | 32 | topology \ |
32 | $(NAT_DIR) \ | 33 | $(NAT_DIR) \ |
diff --git a/src/dht/dht_api.c b/src/dht/dht_api.c index 4a19422a8..7095eeb6d 100644 --- a/src/dht/dht_api.c +++ b/src/dht/dht_api.c | |||
@@ -574,7 +574,7 @@ service_message_handler (void *cls, | |||
574 | finish(handle, GNUNET_SYSERR); /* If there was a current message, kill it! */ | 574 | finish(handle, GNUNET_SYSERR); /* If there was a current message, kill it! */ |
575 | } | 575 | } |
576 | #if RETRANSMIT | 576 | #if RETRANSMIT |
577 | if (GNUNET_CONTAINER_multihashmap_iterate(handle->outstanding_requests, &retransmit_iterator, handle) > 0) | 577 | if ((handle->retransmit_stage != DHT_RETRANSMITTING) && (GNUNET_CONTAINER_multihashmap_iterate(handle->outstanding_requests, &retransmit_iterator, handle) > 0)) |
578 | { | 578 | { |
579 | handle->retransmit_stage = DHT_RETRANSMITTING; | 579 | handle->retransmit_stage = DHT_RETRANSMITTING; |
580 | handle->current = handle->retransmissions->message; | 580 | handle->current = handle->retransmissions->message; |
diff --git a/src/dv/dv.h b/src/dv/dv.h index e744c30d0..bb63bc004 100644 --- a/src/dv/dv.h +++ b/src/dv/dv.h | |||
@@ -31,7 +31,7 @@ | |||
31 | #define DEBUG_DV_GOSSIP GNUNET_NO | 31 | #define DEBUG_DV_GOSSIP GNUNET_NO |
32 | #define DEBUG_DV_GOSSIP_SEND GNUNET_NO | 32 | #define DEBUG_DV_GOSSIP_SEND GNUNET_NO |
33 | #define DEBUG_DV_GOSSIP_RECEIPT GNUNET_NO | 33 | #define DEBUG_DV_GOSSIP_RECEIPT GNUNET_NO |
34 | #define DEBUG_DV_MESSAGES GNUNET_NO | 34 | #define DEBUG_DV_MESSAGES GNUNET_YES |
35 | #define DEBUG_DV GNUNET_NO | 35 | #define DEBUG_DV GNUNET_NO |
36 | #define DEBUG_DV_PEER_NUMBERS GNUNET_NO | 36 | #define DEBUG_DV_PEER_NUMBERS GNUNET_NO |
37 | #define DEBUG_MESSAGE_DROP GNUNET_NO | 37 | #define DEBUG_MESSAGE_DROP GNUNET_NO |
diff --git a/src/dv/test_transport_api_dv.c b/src/dv/test_transport_api_dv.c index 48db86cdc..709ef8e97 100644 --- a/src/dv/test_transport_api_dv.c +++ b/src/dv/test_transport_api_dv.c | |||
@@ -720,7 +720,7 @@ topology_callback (void *cls, | |||
720 | { | 720 | { |
721 | #if VERBOSE | 721 | #if VERBOSE |
722 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 722 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
723 | "Created %d total connections, which is our target number! Calling send messages.\n", | 723 | "Created %u total connections, which is our target number! Calling send messages.\n", |
724 | total_connections); | 724 | total_connections); |
725 | #endif | 725 | #endif |
726 | 726 | ||
diff --git a/src/dv/test_transport_dv_data.conf b/src/dv/test_transport_dv_data.conf index f993603c0..8cb1ffb06 100644 --- a/src/dv/test_transport_dv_data.conf +++ b/src/dv/test_transport_dv_data.conf | |||
@@ -6,7 +6,7 @@ DEFAULTCONFIG = test_transport_dv_data.conf | |||
6 | PORT = 2564 | 6 | PORT = 2564 |
7 | 7 | ||
8 | [transport] | 8 | [transport] |
9 | DEBUG = NO | 9 | DEBUG = YES |
10 | PORT = 2565 | 10 | PORT = 2565 |
11 | PLUGINS = tcp dv | 11 | PLUGINS = tcp dv |
12 | BLACKLIST_FILE = $SERVICEHOME/blacklist | 12 | BLACKLIST_FILE = $SERVICEHOME/blacklist |
@@ -45,7 +45,7 @@ PORT = 2570 | |||
45 | 45 | ||
46 | [dv] | 46 | [dv] |
47 | AUTOSTART = YES | 47 | AUTOSTART = YES |
48 | DEBUG = NO | 48 | DEBUG = YES |
49 | ACCEPT_FROM6 = ::1; | 49 | ACCEPT_FROM6 = ::1; |
50 | ACCEPT_FROM = 127.0.0.1; | 50 | ACCEPT_FROM = 127.0.0.1; |
51 | BINARY = gnunet-service-dv | 51 | BINARY = gnunet-service-dv |
diff --git a/src/fragmentation/fragmentation.c b/src/fragmentation/fragmentation.c index 58fcd834a..ecd82b2c4 100644 --- a/src/fragmentation/fragmentation.c +++ b/src/fragmentation/fragmentation.c | |||
@@ -35,10 +35,12 @@ | |||
35 | #include "gnunet_fragmentation_lib.h" | 35 | #include "gnunet_fragmentation_lib.h" |
36 | #include "gnunet_protocols.h" | 36 | #include "gnunet_protocols.h" |
37 | #include "gnunet_util_lib.h" | 37 | #include "gnunet_util_lib.h" |
38 | |||
38 | /** | 39 | /** |
39 | * Message fragment. This header is followed | 40 | * Message fragment. This header is followed |
40 | * by the actual data of the fragment. | 41 | * by the actual data of the fragment. |
41 | */ | 42 | */ |
43 | |||
42 | struct Fragment | 44 | struct Fragment |
43 | { | 45 | { |
44 | 46 | ||
@@ -181,10 +183,16 @@ void | |||
181 | GNUNET_FRAGMENT_context_destroy (struct GNUNET_FRAGMENT_Context *ctx) | 183 | GNUNET_FRAGMENT_context_destroy (struct GNUNET_FRAGMENT_Context *ctx) |
182 | { | 184 | { |
183 | struct GNUNET_FRAGEMENT_Ctxbuffer *buffer; | 185 | struct GNUNET_FRAGEMENT_Ctxbuffer *buffer; |
184 | for(buffer = ctx->buffer; buffer!=NULL; buffer = buffer->next){ | 186 | struct GNUNET_FRAGEMENT_Ctxbuffer *temp; |
185 | GNUNET_free(buffer->num); | 187 | buffer = ctx->buffer; |
186 | GNUNET_free(buffer); | 188 | |
187 | } | 189 | while (buffer != NULL) |
190 | { | ||
191 | temp = buffer->next; | ||
192 | GNUNET_free(buffer->num); | ||
193 | GNUNET_free(buffer); | ||
194 | buffer = temp; | ||
195 | } | ||
188 | GNUNET_free(ctx); | 196 | GNUNET_free(ctx); |
189 | GNUNET_assert (0); | 197 | GNUNET_assert (0); |
190 | } | 198 | } |
diff --git a/src/fs/Makefile.am b/src/fs/Makefile.am index f5e834d4e..9fcdd351b 100644 --- a/src/fs/Makefile.am +++ b/src/fs/Makefile.am | |||
@@ -150,7 +150,6 @@ TESTS = \ | |||
150 | test_fs_download \ | 150 | test_fs_download \ |
151 | test_fs_download_indexed \ | 151 | test_fs_download_indexed \ |
152 | test_fs_download_persistence \ | 152 | test_fs_download_persistence \ |
153 | test_fs_file_information \ | ||
154 | test_fs_list_indexed \ | 153 | test_fs_list_indexed \ |
155 | test_fs_namespace \ | 154 | test_fs_namespace \ |
156 | test_fs_publish \ | 155 | test_fs_publish \ |
@@ -166,6 +165,7 @@ TESTS = \ | |||
166 | test_gnunet_service_fs_p2p \ | 165 | test_gnunet_service_fs_p2p \ |
167 | $(check_SCRIPTS) | 166 | $(check_SCRIPTS) |
168 | # $(check_PROGRAMS) | 167 | # $(check_PROGRAMS) |
168 | # test_fs_file_information | ||
169 | 169 | ||
170 | 170 | ||
171 | test_fs_collection_SOURCES = \ | 171 | test_fs_collection_SOURCES = \ |
diff --git a/src/testing/test_testing_data_topology_clique.conf b/src/testing/test_testing_data_topology_clique.conf index 114364da2..abe6f586a 100644 --- a/src/testing/test_testing_data_topology_clique.conf +++ b/src/testing/test_testing_data_topology_clique.conf | |||
@@ -41,7 +41,7 @@ PORT = 2570 | |||
41 | #DEBUG = YES | 41 | #DEBUG = YES |
42 | 42 | ||
43 | [testing] | 43 | [testing] |
44 | NUM_PEERS = 4 | 44 | NUM_PEERS = 10 |
45 | WEAKRANDOM = YES | 45 | WEAKRANDOM = YES |
46 | TOPOLOGY = CLIQUE | 46 | TOPOLOGY = CLIQUE |
47 | F2F = YES | 47 | F2F = YES |
diff --git a/src/testing/test_testing_data_topology_none.conf b/src/testing/test_testing_data_topology_none.conf index 9ff8ca390..f03633d56 100644 --- a/src/testing/test_testing_data_topology_none.conf +++ b/src/testing/test_testing_data_topology_none.conf | |||
@@ -3,16 +3,14 @@ SERVICEHOME = /tmp/test-gnunet-testing/ | |||
3 | DEFAULTCONFIG = test_testing_data_topology_clique.conf | 3 | DEFAULTCONFIG = test_testing_data_topology_clique.conf |
4 | 4 | ||
5 | [resolver] | 5 | [resolver] |
6 | AUTOSTART = NO | ||
6 | PORT = 0 | 7 | PORT = 0 |
7 | 8 | ||
8 | [transport] | 9 | [transport] |
9 | PORT = 0 | 10 | PORT = 0 |
10 | PLUGINS = tcp | 11 | PLUGINS = tcp |
11 | #PREFIX = xterm -e xterm -T transport -e gdb --args | ||
12 | #BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/transport/.libs/gnunet-service-transport | 12 | #BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/transport/.libs/gnunet-service-transport |
13 | #PREFIX = valgrind --tool=memcheck --log-file=logs%p | 13 | #PREFIX = valgrind --tool=massif |
14 | #PREFIX = valgrind --tool=callgrind --log-file=callgrind.%p | ||
15 | #DEBUG = YES | ||
16 | 14 | ||
17 | [topology] | 15 | [topology] |
18 | PORT = 0 | 16 | PORT = 0 |
@@ -22,23 +20,18 @@ PORT = 0 | |||
22 | DEFAULTSERVICES = | 20 | DEFAULTSERVICES = |
23 | 21 | ||
24 | [statistics] | 22 | [statistics] |
23 | AUTOSTART = NO | ||
25 | PORT = 0 | 24 | PORT = 0 |
26 | 25 | ||
27 | [transport-tcp] | 26 | [transport-tcp] |
28 | PORT = 2568 | 27 | PORT = 2568 |
28 | BINDTO = 127.0.0.1 | ||
29 | 29 | ||
30 | [peerinfo] | 30 | [peerinfo] |
31 | PORT = 0 | 31 | PORT = 0 |
32 | #DEBUG = YES | ||
33 | #PREFIX = xterm -e xterm -T peerinfo -e gdb --args | ||
34 | #BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/peerinfo/.libs/gnunet-service-peerinfo | ||
35 | #PREFIX = valgrind --tool=memcheck --log-file=peerinfo%p | ||
36 | 32 | ||
37 | [core] | 33 | [core] |
38 | PORT = 0 | 34 | PORT = 0 |
39 | #PREFIX = xterm -e xterm -T CORE -e gdb --args | ||
40 | #PREFIX = valgrind --tool=memcheck --log-file=logs%p | ||
41 | #DEBUG = YES | ||
42 | 35 | ||
43 | [hostlist] | 36 | [hostlist] |
44 | PORT = 0 | 37 | PORT = 0 |
@@ -47,10 +40,14 @@ PORT = 0 | |||
47 | PORT = 0 | 40 | PORT = 0 |
48 | 41 | ||
49 | [testing] | 42 | [testing] |
50 | NUM_PEERS = 200 | 43 | NUM_PEERS = 50 |
51 | WEAKRANDOM = YES | 44 | WEAKRANDOM = YES |
52 | TOPOLOGY = NONE | 45 | TOPOLOGY = NONE |
53 | F2F = NO | 46 | F2F = NO |
54 | BLACKLIST_TOPOLOGY = NONE | 47 | BLACKLIST_TOPOLOGY = NONE |
55 | CONNECT_TOPOLOGY = RING | 48 | CONNECT_TOPOLOGY = RING |
49 | #CONNECT_TOPOLOGY = 2D_TORUS | ||
50 | #CONNECT_TOPOLOGY = CLIQUE | ||
51 | #CONNECT_TOPOLOGY_OPTION = CONNECT_DFS | ||
52 | #CONNECT_TOPOLOGY_OPTION_MODIFIER = 20 | ||
56 | #DEBUG = YES | 53 | #DEBUG = YES |
diff --git a/src/testing/test_testing_topology.c b/src/testing/test_testing_topology.c index eb13c8eef..23cb3716a 100644 --- a/src/testing/test_testing_topology.c +++ b/src/testing/test_testing_topology.c | |||
@@ -24,9 +24,12 @@ | |||
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_testing_lib.h" | 25 | #include "gnunet_testing_lib.h" |
26 | #include "gnunet_core_service.h" | 26 | #include "gnunet_core_service.h" |
27 | #include "gnunet_os_lib.h" | ||
27 | 28 | ||
28 | #define VERBOSE GNUNET_YES | 29 | #define VERBOSE GNUNET_YES |
29 | 30 | ||
31 | #define DELAY_FOR_LOGGING GNUNET_YES | ||
32 | |||
30 | /** | 33 | /** |
31 | * How long until we fail the whole testcase? | 34 | * How long until we fail the whole testcase? |
32 | */ | 35 | */ |
@@ -167,6 +170,20 @@ void shutdown_callback (void *cls, | |||
167 | } | 170 | } |
168 | } | 171 | } |
169 | 172 | ||
173 | #if DELAY_FOR_LOGGING | ||
174 | static void gather_log_data () | ||
175 | { | ||
176 | char *peer_number; | ||
177 | char *connect_number; | ||
178 | pid_t mem_process; | ||
179 | GNUNET_asprintf(&peer_number, "%llu", num_peers); | ||
180 | GNUNET_asprintf(&connect_number, "%llu", expected_connections); | ||
181 | mem_process = GNUNET_OS_start_process (NULL, NULL, "./memsize.pl", | ||
182 | "memsize.pl", "totals.txt", peer_number, connect_number, NULL); | ||
183 | GNUNET_OS_process_wait(mem_process); | ||
184 | } | ||
185 | |||
186 | #endif | ||
170 | static void | 187 | static void |
171 | finish_testing () | 188 | finish_testing () |
172 | { | 189 | { |
@@ -177,6 +194,7 @@ finish_testing () | |||
177 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 194 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
178 | "Called finish testing, stopping daemons.\n"); | 195 | "Called finish testing, stopping daemons.\n"); |
179 | #endif | 196 | #endif |
197 | |||
180 | int count; | 198 | int count; |
181 | count = 0; | 199 | count = 0; |
182 | pos = test_messages; | 200 | pos = test_messages; |
@@ -558,12 +576,22 @@ topology_callback (void *cls, | |||
558 | #endif | 576 | #endif |
559 | modnum = expected_messages / 4; | 577 | modnum = expected_messages / 4; |
560 | dotnum = (expected_messages / 50) + 1; | 578 | dotnum = (expected_messages / 50) + 1; |
561 | #if VERBOSE | ||
562 | fprintf(stdout, "Test message progress: ["); | ||
563 | #endif | ||
564 | GNUNET_SCHEDULER_cancel (sched, die_task); | 579 | GNUNET_SCHEDULER_cancel (sched, die_task); |
565 | die_task = GNUNET_SCHEDULER_NO_TASK; | 580 | die_task = GNUNET_SCHEDULER_NO_TASK; |
581 | #if DELAY_FOR_LOGGING | ||
582 | fprintf(stdout, "Sending test messages in 10 seconds.\n"); | ||
583 | GNUNET_SCHEDULER_add_delayed (sched, | ||
584 | GNUNET_TIME_relative_multiply | ||
585 | (GNUNET_TIME_UNIT_SECONDS, 10), | ||
586 | &send_test_messages, test_messages); | ||
587 | gather_log_data(); | ||
588 | #else | ||
566 | GNUNET_SCHEDULER_add_now (sched, &send_test_messages, test_messages); | 589 | GNUNET_SCHEDULER_add_now (sched, &send_test_messages, test_messages); |
590 | #endif | ||
591 | #if VERBOSE | ||
592 | fprintf(stdout, "Test message progress: ["); | ||
593 | #endif | ||
594 | |||
567 | } | 595 | } |
568 | else if (total_connections + failed_connections == expected_connections) | 596 | else if (total_connections + failed_connections == expected_connections) |
569 | { | 597 | { |
@@ -629,8 +657,8 @@ create_topology () | |||
629 | #if VERBOSE | 657 | #if VERBOSE |
630 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 658 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
631 | "Topology set up, now starting peers!\n"); | 659 | "Topology set up, now starting peers!\n"); |
632 | #endif | ||
633 | fprintf(stdout, "Daemon start progress ["); | 660 | fprintf(stdout, "Daemon start progress ["); |
661 | #endif | ||
634 | GNUNET_TESTING_daemons_continue_startup(pg); | 662 | GNUNET_TESTING_daemons_continue_startup(pg); |
635 | } | 663 | } |
636 | else | 664 | else |
@@ -696,10 +724,18 @@ peers_started_callback (void *cls, | |||
696 | * within a reasonable amount of time */ | 724 | * within a reasonable amount of time */ |
697 | die_task = GNUNET_SCHEDULER_add_delayed (sched, | 725 | die_task = GNUNET_SCHEDULER_add_delayed (sched, |
698 | GNUNET_TIME_relative_multiply | 726 | GNUNET_TIME_relative_multiply |
699 | (GNUNET_TIME_UNIT_MINUTES, 5), | 727 | (GNUNET_TIME_UNIT_MINUTES, 8), |
700 | &end_badly, "from peers_started_callback"); | 728 | &end_badly, "from peers_started_callback"); |
701 | 729 | #if DELAY_FOR_LOGGING | |
730 | fprintf(stdout, "Connecting topology in 10 seconds\n"); | ||
731 | gather_log_data(); | ||
732 | GNUNET_SCHEDULER_add_delayed (sched, | ||
733 | GNUNET_TIME_relative_multiply | ||
734 | (GNUNET_TIME_UNIT_SECONDS, 10), | ||
735 | &connect_topology, NULL); | ||
736 | #else | ||
702 | connect_topology (); | 737 | connect_topology (); |
738 | #endif | ||
703 | ok = 0; | 739 | ok = 0; |
704 | } | 740 | } |
705 | } | 741 | } |
@@ -861,7 +897,9 @@ run (void *cls, | |||
861 | peers_left = num_peers; | 897 | peers_left = num_peers; |
862 | modnum = num_peers / 4; | 898 | modnum = num_peers / 4; |
863 | dotnum = (num_peers / 50) + 1; | 899 | dotnum = (num_peers / 50) + 1; |
900 | #if VERBOSE | ||
864 | fprintf (stdout, "Hostkey generation progress: \["); | 901 | fprintf (stdout, "Hostkey generation progress: \["); |
902 | #endif | ||
865 | /* Set up a task to end testing if peer start fails */ | 903 | /* Set up a task to end testing if peer start fails */ |
866 | die_task = GNUNET_SCHEDULER_add_delayed (sched, | 904 | die_task = GNUNET_SCHEDULER_add_delayed (sched, |
867 | GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, SECONDS_PER_PEER_START * num_peers), | 905 | GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, SECONDS_PER_PEER_START * num_peers), |