diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-12-21 13:12:03 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-12-21 13:12:03 +0000 |
commit | 6084aa2ec9cbd2c2460e49fc8b1145ccecdc0e84 (patch) | |
tree | 0893eef47c5280f64904aaad6d2141f056c0f515 /src/stream | |
parent | 4b5c027b621db681ecaa87d6ee262e2b54500a7c (diff) | |
download | gnunet-6084aa2ec9cbd2c2460e49fc8b1145ccecdc0e84.tar.gz gnunet-6084aa2ec9cbd2c2460e49fc8b1145ccecdc0e84.zip |
- no more explicit overlay linking
Diffstat (limited to 'src/stream')
-rw-r--r-- | src/stream/perf_stream_api.c | 19 | ||||
-rw-r--r-- | src/stream/test_stream_2peers.c | 22 | ||||
-rw-r--r-- | src/stream/test_stream_2peers_halfclose.c | 20 | ||||
-rw-r--r-- | src/stream/test_stream_local.conf | 8 |
4 files changed, 17 insertions, 52 deletions
diff --git a/src/stream/perf_stream_api.c b/src/stream/perf_stream_api.c index 9150ca6e9..63244cc58 100644 --- a/src/stream/perf_stream_api.c +++ b/src/stream/perf_stream_api.c | |||
@@ -243,7 +243,7 @@ static uint32_t data[DATA_SIZE / 4]; | |||
243 | * Payload sizes to test each major test with | 243 | * Payload sizes to test each major test with |
244 | */ | 244 | */ |
245 | static uint16_t payload_size[] = | 245 | static uint16_t payload_size[] = |
246 | { 20, 500, 2000, 7000, 13000, 25000, 50000};//, 60000, 63000, 64000 }; | 246 | { 20, 500, 2000, 7000, 13000, 25000, 30000};//, 50000, 60000, 63000, 64000 }; |
247 | 247 | ||
248 | /** | 248 | /** |
249 | * Current step of testing | 249 | * Current step of testing |
@@ -939,14 +939,6 @@ controller_event_cb (void *cls, | |||
939 | GNUNET_assert (0); | 939 | GNUNET_assert (0); |
940 | } | 940 | } |
941 | break; | 941 | break; |
942 | case GNUNET_TESTBED_ET_CONNECT: | ||
943 | GNUNET_TESTBED_operation_done (common_op); | ||
944 | /* Get the peer identity and configuration of peers */ | ||
945 | common_op = | ||
946 | GNUNET_TESTBED_peer_get_information (peer_data[0].peer, | ||
947 | GNUNET_TESTBED_PIT_IDENTITY, | ||
948 | &peerinfo_cb, &peer_data[0]); | ||
949 | break; | ||
950 | default: | 942 | default: |
951 | GNUNET_assert (0); | 943 | GNUNET_assert (0); |
952 | } | 944 | } |
@@ -971,9 +963,11 @@ test_master (void *cls, unsigned int num_peers_, | |||
971 | peer_data[0].peer = peers[0]; | 963 | peer_data[0].peer = peers[0]; |
972 | peer_data[1].peer = peers[1]; | 964 | peer_data[1].peer = peers[1]; |
973 | if (2 == num_peers) | 965 | if (2 == num_peers) |
974 | common_op = GNUNET_TESTBED_overlay_connect (NULL, NULL, NULL, | 966 | /* Get the peer identity and configuration of peers */ |
975 | peer_data[0].peer, | 967 | common_op = |
976 | peer_data[1].peer); | 968 | GNUNET_TESTBED_peer_get_information (peer_data[0].peer, |
969 | GNUNET_TESTBED_PIT_IDENTITY, | ||
970 | &peerinfo_cb, &peer_data[0]); | ||
977 | else | 971 | else |
978 | GNUNET_break (0); | 972 | GNUNET_break (0); |
979 | abort_task = | 973 | abort_task = |
@@ -1021,7 +1015,6 @@ int main (int argc, char **argv) | |||
1021 | test_step = TEST_STEP_2_HOP; | 1015 | test_step = TEST_STEP_2_HOP; |
1022 | num_peers = 2; | 1016 | num_peers = 2; |
1023 | event_mask = 0; | 1017 | event_mask = 0; |
1024 | event_mask |= (1LL << GNUNET_TESTBED_ET_CONNECT); | ||
1025 | event_mask |= (1LL << GNUNET_TESTBED_ET_OPERATION_FINISHED); | 1018 | event_mask |= (1LL << GNUNET_TESTBED_ET_OPERATION_FINISHED); |
1026 | for (payload_size_index = 0; | 1019 | for (payload_size_index = 0; |
1027 | payload_size_index < (sizeof (payload_size) / sizeof (uint16_t)); | 1020 | payload_size_index < (sizeof (payload_size) / sizeof (uint16_t)); |
diff --git a/src/stream/test_stream_2peers.c b/src/stream/test_stream_2peers.c index 9eff08af4..012643980 100644 --- a/src/stream/test_stream_2peers.c +++ b/src/stream/test_stream_2peers.c | |||
@@ -101,11 +101,6 @@ struct PeerData | |||
101 | enum SetupState | 101 | enum SetupState |
102 | { | 102 | { |
103 | /** | 103 | /** |
104 | * The initial state | ||
105 | */ | ||
106 | INIT, | ||
107 | |||
108 | /** | ||
109 | * Get the identity of peer 1 | 104 | * Get the identity of peer 1 |
110 | */ | 105 | */ |
111 | PEER1_GET_IDENTITY, | 106 | PEER1_GET_IDENTITY, |
@@ -600,15 +595,6 @@ controller_event_cb (void *cls, | |||
600 | { | 595 | { |
601 | switch (event->type) | 596 | switch (event->type) |
602 | { | 597 | { |
603 | case GNUNET_TESTBED_ET_CONNECT: | ||
604 | GNUNET_assert (INIT == setup_state); | ||
605 | GNUNET_TESTBED_operation_done (op); | ||
606 | /* Get the peer identity and configuration of peers */ | ||
607 | op = GNUNET_TESTBED_peer_get_information (peer1.peer, | ||
608 | GNUNET_TESTBED_PIT_IDENTITY, | ||
609 | &peerinfo_cb, NULL); | ||
610 | setup_state = PEER1_GET_IDENTITY; | ||
611 | break; | ||
612 | case GNUNET_TESTBED_ET_OPERATION_FINISHED: | 598 | case GNUNET_TESTBED_ET_OPERATION_FINISHED: |
613 | switch (setup_state) | 599 | switch (setup_state) |
614 | { | 600 | { |
@@ -642,8 +628,11 @@ test_master (void *cls, unsigned int num_peers, | |||
642 | GNUNET_assert (NULL != peers[1]); | 628 | GNUNET_assert (NULL != peers[1]); |
643 | peer1.peer = peers[0]; | 629 | peer1.peer = peers[0]; |
644 | peer2.peer = peers[1]; | 630 | peer2.peer = peers[1]; |
645 | op = GNUNET_TESTBED_overlay_connect (NULL, NULL, NULL, peer2.peer, peer1.peer); | 631 | /* Get the peer identity and configuration of peers */ |
646 | setup_state = INIT; | 632 | op = GNUNET_TESTBED_peer_get_information (peer1.peer, |
633 | GNUNET_TESTBED_PIT_IDENTITY, | ||
634 | &peerinfo_cb, NULL); | ||
635 | setup_state = PEER1_GET_IDENTITY; | ||
647 | abort_task = | 636 | abort_task = |
648 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 637 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
649 | (GNUNET_TIME_UNIT_SECONDS, 40), &do_abort, | 638 | (GNUNET_TIME_UNIT_SECONDS, 40), &do_abort, |
@@ -660,7 +649,6 @@ int main (int argc, char **argv) | |||
660 | 649 | ||
661 | result = GNUNET_NO; | 650 | result = GNUNET_NO; |
662 | event_mask = 0; | 651 | event_mask = 0; |
663 | event_mask |= (1LL << GNUNET_TESTBED_ET_CONNECT); | ||
664 | event_mask |= (1LL << GNUNET_TESTBED_ET_OPERATION_FINISHED); | 652 | event_mask |= (1LL << GNUNET_TESTBED_ET_OPERATION_FINISHED); |
665 | (void) GNUNET_TESTBED_test_run ("test_stream_2peers", | 653 | (void) GNUNET_TESTBED_test_run ("test_stream_2peers", |
666 | "test_stream_local.conf", | 654 | "test_stream_local.conf", |
diff --git a/src/stream/test_stream_2peers_halfclose.c b/src/stream/test_stream_2peers_halfclose.c index fa7b8194e..95f5aa9fa 100644 --- a/src/stream/test_stream_2peers_halfclose.c +++ b/src/stream/test_stream_2peers_halfclose.c | |||
@@ -143,11 +143,6 @@ enum Test | |||
143 | enum SetupState | 143 | enum SetupState |
144 | { | 144 | { |
145 | /** | 145 | /** |
146 | * The initial state | ||
147 | */ | ||
148 | INIT, | ||
149 | |||
150 | /** | ||
151 | * Get the identity of peer 1 | 146 | * Get the identity of peer 1 |
152 | */ | 147 | */ |
153 | PEER1_GET_IDENTITY, | 148 | PEER1_GET_IDENTITY, |
@@ -824,14 +819,6 @@ controller_event_cb (void *cls, | |||
824 | { | 819 | { |
825 | switch (event->type) | 820 | switch (event->type) |
826 | { | 821 | { |
827 | case GNUNET_TESTBED_ET_CONNECT: | ||
828 | GNUNET_assert (INIT == setup_state); | ||
829 | GNUNET_TESTBED_operation_done (op); | ||
830 | op = GNUNET_TESTBED_peer_get_information (peer1.peer, | ||
831 | GNUNET_TESTBED_PIT_IDENTITY, | ||
832 | &peerinfo_cb, NULL); | ||
833 | setup_state = PEER1_GET_IDENTITY; | ||
834 | break; | ||
835 | case GNUNET_TESTBED_ET_OPERATION_FINISHED: | 822 | case GNUNET_TESTBED_ET_OPERATION_FINISHED: |
836 | switch (setup_state) | 823 | switch (setup_state) |
837 | { | 824 | { |
@@ -865,8 +852,10 @@ test_master (void *cls, unsigned int num_peers, | |||
865 | GNUNET_assert (NULL != peers[1]); | 852 | GNUNET_assert (NULL != peers[1]); |
866 | peer1.peer = peers[0]; | 853 | peer1.peer = peers[0]; |
867 | peer2.peer = peers[1]; | 854 | peer2.peer = peers[1]; |
868 | op = GNUNET_TESTBED_overlay_connect (NULL, NULL, NULL, peer2.peer, peer1.peer); | 855 | op = GNUNET_TESTBED_peer_get_information (peer1.peer, |
869 | setup_state = INIT; | 856 | GNUNET_TESTBED_PIT_IDENTITY, |
857 | &peerinfo_cb, NULL); | ||
858 | setup_state = PEER1_GET_IDENTITY; | ||
870 | abort_task = | 859 | abort_task = |
871 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 860 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
872 | (GNUNET_TIME_UNIT_SECONDS, 1000), &do_abort, | 861 | (GNUNET_TIME_UNIT_SECONDS, 1000), &do_abort, |
@@ -883,7 +872,6 @@ int main (int argc, char **argv) | |||
883 | 872 | ||
884 | result = GNUNET_NO; | 873 | result = GNUNET_NO; |
885 | event_mask = 0; | 874 | event_mask = 0; |
886 | event_mask |= (1LL << GNUNET_TESTBED_ET_CONNECT); | ||
887 | event_mask |= (1LL << GNUNET_TESTBED_ET_OPERATION_FINISHED); | 875 | event_mask |= (1LL << GNUNET_TESTBED_ET_OPERATION_FINISHED); |
888 | (void) GNUNET_TESTBED_test_run ("test_stream_2peers_halfclose", | 876 | (void) GNUNET_TESTBED_test_run ("test_stream_2peers_halfclose", |
889 | "test_stream_local.conf", NUM_PEERS, | 877 | "test_stream_local.conf", NUM_PEERS, |
diff --git a/src/stream/test_stream_local.conf b/src/stream/test_stream_local.conf index 910df8de2..35da4b474 100644 --- a/src/stream/test_stream_local.conf +++ b/src/stream/test_stream_local.conf | |||
@@ -62,12 +62,8 @@ PORT = 12368 | |||
62 | [TESTING] | 62 | [TESTING] |
63 | WEAKRANDOM = YES | 63 | WEAKRANDOM = YES |
64 | 64 | ||
65 | [testing_old] | 65 | [testbed] |
66 | NUM_PEERS = 5 | 66 | OVERLAY_TOPOLOGY = LINE |
67 | HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat | ||
68 | MAX_CONCURRENT_SSH = 10 | ||
69 | USE_PROGRESSBARS = YES | ||
70 | PEERGROUP_TIMEOUT = 2400 s | ||
71 | 67 | ||
72 | [gnunetd] | 68 | [gnunetd] |
73 | HOSTKEY = $SERVICEHOME/.hostkey | 69 | HOSTKEY = $SERVICEHOME/.hostkey |