diff options
author | t3sserakt <t3ss@posteo.de> | 2021-12-02 10:49:23 +0100 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2021-12-02 10:49:23 +0100 |
commit | 27e4f78f34c79ed18645cb15fc2c5f731c137076 (patch) | |
tree | df9121b30b3c6efb4a5ba4ca2676ae55613078ca /src/transport | |
parent | 08226446145611d21bef57fdc77e4693309f3cc4 (diff) | |
download | gnunet-27e4f78f34c79ed18645cb15fc2c5f731c137076.tar.gz gnunet-27e4f78f34c79ed18645cb15fc2c5f731c137076.zip |
- fixed warning, raised log level for udp backchannel test0.15.x
Diffstat (limited to 'src/transport')
4 files changed, 33 insertions, 30 deletions
diff --git a/src/transport/test_transport_plugin_cmd_simple_send.c b/src/transport/test_transport_plugin_cmd_simple_send.c index 6a6861d77..154c0abca 100644 --- a/src/transport/test_transport_plugin_cmd_simple_send.c +++ b/src/transport/test_transport_plugin_cmd_simple_send.c | |||
@@ -97,15 +97,15 @@ static void | |||
97 | handle_test (void *cls, | 97 | handle_test (void *cls, |
98 | const struct GNUNET_TRANSPORT_TESTING_TestMessage *message) | 98 | const struct GNUNET_TRANSPORT_TESTING_TestMessage *message) |
99 | { | 99 | { |
100 | struct GNUNET_TESTING_AsyncContext *ac; | 100 | const struct GNUNET_TESTING_AsyncContext *ac; |
101 | 101 | ||
102 | GNUNET_TESTING_get_trait_async_context (&block_receive, | 102 | GNUNET_TESTING_get_trait_async_context (&block_receive, |
103 | &ac); | 103 | &ac); |
104 | GNUNET_assert (NULL != ac); | 104 | GNUNET_assert (NULL != ac); |
105 | if (NULL == ac->cont) | 105 | if (NULL == ac->cont) |
106 | GNUNET_TESTING_async_fail (ac); | 106 | GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) ac); |
107 | else | 107 | else |
108 | GNUNET_TESTING_async_finish (ac); | 108 | GNUNET_TESTING_async_finish ((struct GNUNET_TESTING_AsyncContext *) ac); |
109 | } | 109 | } |
110 | 110 | ||
111 | 111 | ||
@@ -116,15 +116,15 @@ handle_test (void *cls, | |||
116 | static void | 116 | static void |
117 | all_peers_started () | 117 | all_peers_started () |
118 | { | 118 | { |
119 | struct GNUNET_TESTING_AsyncContext *ac; | 119 | const struct GNUNET_TESTING_AsyncContext *ac; |
120 | 120 | ||
121 | GNUNET_TESTING_get_trait_async_context (&block_send, | 121 | GNUNET_TESTING_get_trait_async_context (&block_send, |
122 | &ac); | 122 | &ac); |
123 | GNUNET_assert (NULL != ac); | 123 | GNUNET_assert (NULL != ac); |
124 | if (NULL == ac->cont) | 124 | if (NULL == ac->cont) |
125 | GNUNET_TESTING_async_fail (ac); | 125 | GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) ac); |
126 | else | 126 | else |
127 | GNUNET_TESTING_async_finish (ac); | 127 | GNUNET_TESTING_async_finish ((struct GNUNET_TESTING_AsyncContext *) ac); |
128 | } | 128 | } |
129 | 129 | ||
130 | 130 | ||
@@ -167,7 +167,7 @@ static void * | |||
167 | notify_connect (struct GNUNET_TESTING_Interpreter *is, | 167 | notify_connect (struct GNUNET_TESTING_Interpreter *is, |
168 | const struct GNUNET_PeerIdentity *peer) | 168 | const struct GNUNET_PeerIdentity *peer) |
169 | { | 169 | { |
170 | struct ConnectPeersState *cps; | 170 | const struct ConnectPeersState *cps; |
171 | const struct GNUNET_TESTING_Command *cmd; | 171 | const struct GNUNET_TESTING_Command *cmd; |
172 | 172 | ||
173 | cmd = GNUNET_TESTING_interpreter_lookup_command (is, | 173 | cmd = GNUNET_TESTING_interpreter_lookup_command (is, |
@@ -188,15 +188,16 @@ notify_connect (struct GNUNET_TESTING_Interpreter *is, | |||
188 | static void | 188 | static void |
189 | all_local_tests_prepared () | 189 | all_local_tests_prepared () |
190 | { | 190 | { |
191 | struct LocalPreparedState *lfs; | 191 | const struct LocalPreparedState *lfs; |
192 | 192 | ||
193 | GNUNET_TESTING_get_trait_local_prepared_state (&local_prepared, | 193 | GNUNET_TESTING_get_trait_local_prepared_state (&local_prepared, |
194 | &lfs); | 194 | &lfs); |
195 | GNUNET_assert (NULL != &lfs->ac); | 195 | GNUNET_assert (NULL != &lfs->ac); |
196 | if (NULL == lfs->ac.cont) | 196 | if (NULL == lfs->ac.cont) |
197 | GNUNET_TESTING_async_fail (&lfs->ac); | 197 | GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) &lfs->ac); |
198 | else | 198 | else |
199 | GNUNET_TESTING_async_finish (&lfs->ac); | 199 | GNUNET_TESTING_async_finish ((struct |
200 | GNUNET_TESTING_AsyncContext *) &lfs->ac); | ||
200 | } | 201 | } |
201 | 202 | ||
202 | 203 | ||
diff --git a/src/transport/test_transport_plugin_cmd_simple_send_dv.c b/src/transport/test_transport_plugin_cmd_simple_send_dv.c index 6a3492705..e73e5a0b2 100644 --- a/src/transport/test_transport_plugin_cmd_simple_send_dv.c +++ b/src/transport/test_transport_plugin_cmd_simple_send_dv.c | |||
@@ -96,7 +96,7 @@ static void | |||
96 | handle_test (void *cls, | 96 | handle_test (void *cls, |
97 | const struct GNUNET_TRANSPORT_TESTING_TestMessage *message) | 97 | const struct GNUNET_TRANSPORT_TESTING_TestMessage *message) |
98 | { | 98 | { |
99 | struct GNUNET_TESTING_AsyncContext *ac; | 99 | const struct GNUNET_TESTING_AsyncContext *ac; |
100 | 100 | ||
101 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 101 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
102 | "Received test message\n"); | 102 | "Received test message\n"); |
@@ -104,9 +104,9 @@ handle_test (void *cls, | |||
104 | &ac); | 104 | &ac); |
105 | GNUNET_assert (NULL != ac); | 105 | GNUNET_assert (NULL != ac); |
106 | if (NULL == ac->cont) | 106 | if (NULL == ac->cont) |
107 | GNUNET_TESTING_async_fail (ac); | 107 | GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) ac); |
108 | else | 108 | else |
109 | GNUNET_TESTING_async_finish (ac); | 109 | GNUNET_TESTING_async_finish ((struct GNUNET_TESTING_AsyncContext *) ac); |
110 | } | 110 | } |
111 | 111 | ||
112 | 112 | ||
@@ -117,7 +117,7 @@ handle_test (void *cls, | |||
117 | static void | 117 | static void |
118 | all_peers_started () | 118 | all_peers_started () |
119 | { | 119 | { |
120 | struct GNUNET_TESTING_AsyncContext *ac; | 120 | const struct GNUNET_TESTING_AsyncContext *ac; |
121 | 121 | ||
122 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 122 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
123 | "Received message\n"); | 123 | "Received message\n"); |
@@ -125,9 +125,9 @@ all_peers_started () | |||
125 | &ac); | 125 | &ac); |
126 | GNUNET_assert (NULL != ac); | 126 | GNUNET_assert (NULL != ac); |
127 | if (NULL == ac->cont) | 127 | if (NULL == ac->cont) |
128 | GNUNET_TESTING_async_fail (ac); | 128 | GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) ac); |
129 | else | 129 | else |
130 | GNUNET_TESTING_async_finish (ac); | 130 | GNUNET_TESTING_async_finish ((struct GNUNET_TESTING_AsyncContext *) ac); |
131 | } | 131 | } |
132 | 132 | ||
133 | 133 | ||
@@ -170,7 +170,7 @@ static void * | |||
170 | notify_connect (struct GNUNET_TESTING_Interpreter *is, | 170 | notify_connect (struct GNUNET_TESTING_Interpreter *is, |
171 | const struct GNUNET_PeerIdentity *peer) | 171 | const struct GNUNET_PeerIdentity *peer) |
172 | { | 172 | { |
173 | struct ConnectPeersState *cps; | 173 | const struct ConnectPeersState *cps; |
174 | const struct GNUNET_TESTING_Command *cmd; | 174 | const struct GNUNET_TESTING_Command *cmd; |
175 | void *ret = NULL; | 175 | void *ret = NULL; |
176 | 176 | ||
@@ -178,12 +178,12 @@ notify_connect (struct GNUNET_TESTING_Interpreter *is, | |||
178 | "notify_connect peer %s\n", | 178 | "notify_connect peer %s\n", |
179 | GNUNET_i2s (peer)); | 179 | GNUNET_i2s (peer)); |
180 | cmd = GNUNET_TESTING_interpreter_lookup_command_all (is, | 180 | cmd = GNUNET_TESTING_interpreter_lookup_command_all (is, |
181 | "connect-peers"); | 181 | "connect-peers"); |
182 | GNUNET_TRANSPORT_get_trait_connect_peer_state (cmd, | 182 | GNUNET_TRANSPORT_get_trait_connect_peer_state (cmd, |
183 | &cps); | 183 | &cps); |
184 | cps->notify_connect (is, | 184 | cps->notify_connect (is, |
185 | peer); | 185 | peer); |
186 | 186 | ||
187 | return ret; | 187 | return ret; |
188 | } | 188 | } |
189 | 189 | ||
@@ -194,15 +194,16 @@ notify_connect (struct GNUNET_TESTING_Interpreter *is, | |||
194 | static void | 194 | static void |
195 | all_local_tests_prepared () | 195 | all_local_tests_prepared () |
196 | { | 196 | { |
197 | struct LocalPreparedState *lfs; | 197 | const struct LocalPreparedState *lfs; |
198 | 198 | ||
199 | GNUNET_TESTING_get_trait_local_prepared_state (&local_prepared, | 199 | GNUNET_TESTING_get_trait_local_prepared_state (&local_prepared, |
200 | &lfs); | 200 | &lfs); |
201 | GNUNET_assert (NULL != &lfs->ac); | 201 | GNUNET_assert (NULL != &lfs->ac); |
202 | if (NULL == lfs->ac.cont) | 202 | if (NULL == lfs->ac.cont) |
203 | GNUNET_TESTING_async_fail (&lfs->ac); | 203 | GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) &lfs->ac); |
204 | else | 204 | else |
205 | GNUNET_TESTING_async_finish (&lfs->ac); | 205 | GNUNET_TESTING_async_finish ((struct |
206 | GNUNET_TESTING_AsyncContext *) &lfs->ac); | ||
206 | } | 207 | } |
207 | 208 | ||
208 | 209 | ||
diff --git a/src/transport/test_transport_plugin_cmd_udp_backchannel.c b/src/transport/test_transport_plugin_cmd_udp_backchannel.c index b594049c9..537832e61 100644 --- a/src/transport/test_transport_plugin_cmd_udp_backchannel.c +++ b/src/transport/test_transport_plugin_cmd_udp_backchannel.c | |||
@@ -113,15 +113,15 @@ handle_test (void *cls, | |||
113 | static void | 113 | static void |
114 | all_peers_started () | 114 | all_peers_started () |
115 | { | 115 | { |
116 | struct GNUNET_TESTING_AsyncContext *ac; | 116 | const struct GNUNET_TESTING_AsyncContext *ac; |
117 | 117 | ||
118 | GNUNET_TESTING_get_trait_async_context (&block_send, | 118 | GNUNET_TESTING_get_trait_async_context (&block_send, |
119 | &ac); | 119 | &ac); |
120 | GNUNET_assert (NULL != ac); | 120 | GNUNET_assert (NULL != ac); |
121 | if ((NULL == ac->cont)) | 121 | if ((NULL == ac->cont)) |
122 | GNUNET_TESTING_async_fail (ac); | 122 | GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) ac); |
123 | else | 123 | else |
124 | GNUNET_TESTING_async_finish (ac); | 124 | GNUNET_TESTING_async_finish ((struct GNUNET_TESTING_AsyncContext *) ac); |
125 | } | 125 | } |
126 | 126 | ||
127 | 127 | ||
@@ -163,7 +163,7 @@ static void * | |||
163 | notify_connect (struct GNUNET_TESTING_Interpreter *is, | 163 | notify_connect (struct GNUNET_TESTING_Interpreter *is, |
164 | const struct GNUNET_PeerIdentity *peer) | 164 | const struct GNUNET_PeerIdentity *peer) |
165 | { | 165 | { |
166 | struct ConnectPeersState *cps; | 166 | const struct ConnectPeersState *cps; |
167 | 167 | ||
168 | GNUNET_TRANSPORT_get_trait_connect_peer_state (&connect_peers, | 168 | GNUNET_TRANSPORT_get_trait_connect_peer_state (&connect_peers, |
169 | &cps); | 169 | &cps); |
@@ -180,15 +180,16 @@ notify_connect (struct GNUNET_TESTING_Interpreter *is, | |||
180 | static void | 180 | static void |
181 | all_local_tests_prepared () | 181 | all_local_tests_prepared () |
182 | { | 182 | { |
183 | struct LocalPreparedState *lfs; | 183 | const struct LocalPreparedState *lfs; |
184 | 184 | ||
185 | GNUNET_TESTING_get_trait_local_prepared_state (&local_prepared, | 185 | GNUNET_TESTING_get_trait_local_prepared_state (&local_prepared, |
186 | &lfs); | 186 | &lfs); |
187 | GNUNET_assert (NULL != &lfs->ac); | 187 | GNUNET_assert (NULL != &lfs->ac); |
188 | if (NULL == lfs->ac.cont) | 188 | if (NULL == lfs->ac.cont) |
189 | GNUNET_TESTING_async_fail (&lfs->ac); | 189 | GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) &lfs->ac); |
190 | else | 190 | else |
191 | GNUNET_TESTING_async_finish (&lfs->ac); | 191 | GNUNET_TESTING_async_finish ((struct |
192 | GNUNET_TESTING_AsyncContext *) &lfs->ac); | ||
192 | } | 193 | } |
193 | 194 | ||
194 | /** | 195 | /** |
diff --git a/src/transport/test_transport_udp_backchannel.sh b/src/transport/test_transport_udp_backchannel.sh index b42186307..1b0e283b5 100755 --- a/src/transport/test_transport_udp_backchannel.sh +++ b/src/transport/test_transport_udp_backchannel.sh | |||
@@ -4,7 +4,7 @@ if ! [ -d "/run/netns" ]; then | |||
4 | fi | 4 | fi |
5 | if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" == 1 ]; then | 5 | if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" == 1 ]; then |
6 | #exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; valgrind --leak-check=full --track-origins=yes --trace-children=yes --trace-children-skip=/usr/bin/awk,/usr/bin/cut,/usr/bin/seq,/sbin/ip ./test_transport_start_with_config test_transport_udp_backchannel_topo.conf" | 6 | #exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; valgrind --leak-check=full --track-origins=yes --trace-children=yes --trace-children-skip=/usr/bin/awk,/usr/bin/cut,/usr/bin/seq,/sbin/ip ./test_transport_start_with_config test_transport_udp_backchannel_topo.conf" |
7 | exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config test_transport_udp_backchannel_topo.conf" | 7 | exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; GNUNET_FORCE_LOG='transport;;;;DEBUG' GNUNET_FORCE_LOGFILE='test.out' ./test_transport_start_with_config test_transport_udp_backchannel_topo.conf" |
8 | # exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; valgrind --leak-check=full --track-origins=yes ./test_transport_start_with_config test_transport_udp_backchannel_topo.conf" | 8 | # exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; valgrind --leak-check=full --track-origins=yes ./test_transport_start_with_config test_transport_udp_backchannel_topo.conf" |
9 | else | 9 | else |
10 | echo -e "Error during test setup: The kernel parameter kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n sysctl kernel.unprivileged_userns_clone=1\n" | 10 | echo -e "Error during test setup: The kernel parameter kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n sysctl kernel.unprivileged_userns_clone=1\n" |