diff options
author | t3sserakt <t3ss@posteo.de> | 2021-09-14 14:19:31 +0200 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2021-09-14 14:19:31 +0200 |
commit | 9bdaa1f9b21b324963fe0f41311ae6d9c0948946 (patch) | |
tree | 79704a93b827d97497cc1665302fb3f1768f1b74 /src/transport | |
parent | c01e846f9af440e6ee57531715e6fc6c383ad374 (diff) | |
download | gnunet-9bdaa1f9b21b324963fe0f41311ae6d9c0948946.tar.gz gnunet-9bdaa1f9b21b324963fe0f41311ae6d9c0948946.zip |
- fixed wrong dependencies to tng version of libs, added missing block after sending
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/Makefile.am | 12 | ||||
-rw-r--r-- | src/transport/test_transport_plugin_cmd_simple_send.c | 8 | ||||
-rw-r--r-- | src/transport/test_transport_plugin_cmd_simple_send_v2.c | 44 |
3 files changed, 22 insertions, 42 deletions
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index 8bd35b5a3..561ac5e60 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am | |||
@@ -401,7 +401,7 @@ libgnunet_test_transport_plugin_cmd_simple_send_la_SOURCES = \ | |||
401 | libgnunet_test_transport_plugin_cmd_simple_send_la_LIBADD = \ | 401 | libgnunet_test_transport_plugin_cmd_simple_send_la_LIBADD = \ |
402 | libgnunettransporttesting2.la \ | 402 | libgnunettransporttesting2.la \ |
403 | libgnunettransportapplication.la \ | 403 | libgnunettransportapplication.la \ |
404 | libgnunettransport.la \ | 404 | libgnunettransportcore.la \ |
405 | $(top_builddir)/src/testing/libgnunettesting.la \ | 405 | $(top_builddir)/src/testing/libgnunettesting.la \ |
406 | $(top_builddir)/src/peerstore/libgnunetpeerstore.la \ | 406 | $(top_builddir)/src/peerstore/libgnunetpeerstore.la \ |
407 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ | 407 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ |
@@ -418,7 +418,7 @@ libgnunet_test_transport_plugin_cmd_simple_send_v2_la_SOURCES = \ | |||
418 | libgnunet_test_transport_plugin_cmd_simple_send_v2_la_LIBADD = \ | 418 | libgnunet_test_transport_plugin_cmd_simple_send_v2_la_LIBADD = \ |
419 | libgnunettransporttesting2.la \ | 419 | libgnunettransporttesting2.la \ |
420 | libgnunettransportapplication.la \ | 420 | libgnunettransportapplication.la \ |
421 | libgnunettransport.la \ | 421 | libgnunettransportcore.la \ |
422 | $(top_builddir)/src/testing/libgnunettesting.la \ | 422 | $(top_builddir)/src/testing/libgnunettesting.la \ |
423 | $(top_builddir)/src/peerstore/libgnunetpeerstore.la \ | 423 | $(top_builddir)/src/peerstore/libgnunetpeerstore.la \ |
424 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ | 424 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ |
@@ -756,8 +756,8 @@ test_transport_simple_send_LDADD = \ | |||
756 | $(top_builddir)/src/util/libgnunetutil.la \ | 756 | $(top_builddir)/src/util/libgnunetutil.la \ |
757 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | 757 | $(top_builddir)/src/testbed/libgnunettestbed.la \ |
758 | $(top_builddir)/src/hello/libgnunethello.la \ | 758 | $(top_builddir)/src/hello/libgnunethello.la \ |
759 | libgnunettransport.la \ | 759 | libgnunettransportcore.la \ |
760 | libgnunettransporttesting.la | 760 | libgnunettransporttesting2.la |
761 | 761 | ||
762 | test_transport_simple_send_v2_SOURCES = \ | 762 | test_transport_simple_send_v2_SOURCES = \ |
763 | test_transport_simple_send_v2.c | 763 | test_transport_simple_send_v2.c |
@@ -766,8 +766,8 @@ test_transport_simple_send_v2_LDADD = \ | |||
766 | $(top_builddir)/src/util/libgnunetutil.la \ | 766 | $(top_builddir)/src/util/libgnunetutil.la \ |
767 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | 767 | $(top_builddir)/src/testbed/libgnunettestbed.la \ |
768 | $(top_builddir)/src/hello/libgnunethello.la \ | 768 | $(top_builddir)/src/hello/libgnunethello.la \ |
769 | libgnunettransport.la \ | 769 | libgnunettransportcore.la \ |
770 | libgnunettransporttesting.la | 770 | libgnunettransporttesting2.la |
771 | 771 | ||
772 | test_transport_testing_startstop_SOURCES = \ | 772 | test_transport_testing_startstop_SOURCES = \ |
773 | test_transport_testing_startstop.c | 773 | test_transport_testing_startstop.c |
diff --git a/src/transport/test_transport_plugin_cmd_simple_send.c b/src/transport/test_transport_plugin_cmd_simple_send.c index 1dc44c945..35aa07ecd 100644 --- a/src/transport/test_transport_plugin_cmd_simple_send.c +++ b/src/transport/test_transport_plugin_cmd_simple_send.c | |||
@@ -55,6 +55,11 @@ char *cfgname; | |||
55 | */ | 55 | */ |
56 | unsigned int are_all_peers_started; | 56 | unsigned int are_all_peers_started; |
57 | 57 | ||
58 | /** | ||
59 | * Flag indicating a received message. | ||
60 | */ | ||
61 | unsigned int message_received; | ||
62 | |||
58 | 63 | ||
59 | /** | 64 | /** |
60 | * Function called to check a message of type GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE being | 65 | * Function called to check a message of type GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE being |
@@ -80,6 +85,7 @@ handle_test (void *cls, | |||
80 | { | 85 | { |
81 | LOG (GNUNET_ERROR_TYPE_ERROR, | 86 | LOG (GNUNET_ERROR_TYPE_ERROR, |
82 | "message received\n"); | 87 | "message received\n"); |
88 | message_received = GNUNET_YES; | ||
83 | } | 89 | } |
84 | 90 | ||
85 | 91 | ||
@@ -203,6 +209,8 @@ start_testcase (TESTING_CMD_HELPER_write_cb write_message, char *router_ip, | |||
203 | (atoi (n) - 1) * atoi (local_m) + atoi ( | 209 | (atoi (n) - 1) * atoi (local_m) + atoi ( |
204 | m), | 210 | m), |
205 | "start-peer"), | 211 | "start-peer"), |
212 | GNUNET_TESTING_cmd_block_until_external_trigger ("block-receive", | ||
213 | &message_received), | ||
206 | GNUNET_TRANSPORT_cmd_stop_peer ("stop-peer", | 214 | GNUNET_TRANSPORT_cmd_stop_peer ("stop-peer", |
207 | "start-peer"), | 215 | "start-peer"), |
208 | GNUNET_TESTING_cmd_system_destroy ("system-destroy", | 216 | GNUNET_TESTING_cmd_system_destroy ("system-destroy", |
diff --git a/src/transport/test_transport_plugin_cmd_simple_send_v2.c b/src/transport/test_transport_plugin_cmd_simple_send_v2.c index ce1245296..c79b5c7e2 100644 --- a/src/transport/test_transport_plugin_cmd_simple_send_v2.c +++ b/src/transport/test_transport_plugin_cmd_simple_send_v2.c | |||
@@ -57,6 +57,11 @@ char *cfgname; | |||
57 | */ | 57 | */ |
58 | unsigned int are_all_peers_started; | 58 | unsigned int are_all_peers_started; |
59 | 59 | ||
60 | /** | ||
61 | * Flag indicating a received message. | ||
62 | */ | ||
63 | unsigned int message_received; | ||
64 | |||
60 | 65 | ||
61 | /** | 66 | /** |
62 | * Function called to check a message of type GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE being | 67 | * Function called to check a message of type GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE being |
@@ -80,35 +85,7 @@ static void | |||
80 | handle_test (void *cls, | 85 | handle_test (void *cls, |
81 | const struct GNUNET_TRANSPORT_TESTING_TestMessage *message) | 86 | const struct GNUNET_TRANSPORT_TESTING_TestMessage *message) |
82 | { | 87 | { |
83 | LOG (GNUNET_ERROR_TYPE_ERROR, | 88 | message_received = GNUNET_YES; |
84 | "message received\n"); | ||
85 | } | ||
86 | |||
87 | |||
88 | /** | ||
89 | * Function called to check a message of type GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE2 | ||
90 | * being received. | ||
91 | * | ||
92 | */ | ||
93 | static int | ||
94 | check_test2 (void *cls, | ||
95 | const struct GNUNET_TRANSPORT_TESTING_TestMessage *message) | ||
96 | { | ||
97 | return GNUNET_OK; | ||
98 | } | ||
99 | |||
100 | |||
101 | /** | ||
102 | * Function called to handle a message of type GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE2 | ||
103 | * being received. | ||
104 | * | ||
105 | */ | ||
106 | static void | ||
107 | handle_test2 (void *cls, | ||
108 | const struct GNUNET_TRANSPORT_TESTING_TestMessage *message) | ||
109 | { | ||
110 | LOG (GNUNET_ERROR_TYPE_ERROR, | ||
111 | "message received\n"); | ||
112 | } | 89 | } |
113 | 90 | ||
114 | 91 | ||
@@ -120,9 +97,6 @@ static void | |||
120 | all_peers_started () | 97 | all_peers_started () |
121 | { | 98 | { |
122 | are_all_peers_started = GNUNET_YES; | 99 | are_all_peers_started = GNUNET_YES; |
123 | LOG (GNUNET_ERROR_TYPE_ERROR, | ||
124 | "setting are_all_peers_started: %d\n", | ||
125 | are_all_peers_started); | ||
126 | } | 100 | } |
127 | 101 | ||
128 | 102 | ||
@@ -181,10 +155,6 @@ start_testcase (TESTING_CMD_HELPER_write_cb write_message, char *router_ip, | |||
181 | GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE, | 155 | GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE, |
182 | struct GNUNET_TRANSPORT_TESTING_TestMessage, | 156 | struct GNUNET_TRANSPORT_TESTING_TestMessage, |
183 | NULL), | 157 | NULL), |
184 | GNUNET_MQ_hd_var_size (test2, | ||
185 | GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE2, | ||
186 | struct GNUNET_TRANSPORT_TESTING_TestMessage, | ||
187 | NULL), | ||
188 | GNUNET_MQ_handler_end () | 158 | GNUNET_MQ_handler_end () |
189 | }; | 159 | }; |
190 | 160 | ||
@@ -208,6 +178,8 @@ start_testcase (TESTING_CMD_HELPER_write_cb write_message, char *router_ip, | |||
208 | GNUNET_TRANSPORT_cmd_send_simple_v2 ("send-simple", | 178 | GNUNET_TRANSPORT_cmd_send_simple_v2 ("send-simple", |
209 | "start-peer", | 179 | "start-peer", |
210 | num), | 180 | num), |
181 | GNUNET_TESTING_cmd_block_until_external_trigger ("block-receive", | ||
182 | &message_received), | ||
211 | GNUNET_TRANSPORT_cmd_stop_peer ("stop-peer", | 183 | GNUNET_TRANSPORT_cmd_stop_peer ("stop-peer", |
212 | "start-peer"), | 184 | "start-peer"), |
213 | GNUNET_TESTING_cmd_system_destroy ("system-destroy", | 185 | GNUNET_TESTING_cmd_system_destroy ("system-destroy", |