aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2022-10-05 13:35:00 +0200
committert3sserakt <t3ss@posteo.de>2022-10-05 13:35:00 +0200
commit8e4312d5e44a83e2baeb3fc15465b5e70919e6cf (patch)
treee4fe3388c0c18d9fa025c95820089d4ec5a801d4 /src/testing
parent247230d737e3e4709392148bfabbde25871b6914 (diff)
parent95fd039097d261626916cfc260a06a29d3d4fc15 (diff)
downloadgnunet-8e4312d5e44a83e2baeb3fc15465b5e70919e6cf.tar.gz
gnunet-8e4312d5e44a83e2baeb3fc15465b5e70919e6cf.zip
Merge branch 'master' of ssh://git.gnunet.org/gnunet
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/.gitignore1
-rw-r--r--src/testing/testing.c18
-rw-r--r--src/testing/testing_api_loop.c9
3 files changed, 8 insertions, 20 deletions
diff --git a/src/testing/.gitignore b/src/testing/.gitignore
index f350da1f2..d75315c79 100644
--- a/src/testing/.gitignore
+++ b/src/testing/.gitignore
@@ -5,3 +5,4 @@ test_testing_peerstartup2
5test_testing_portreservation 5test_testing_portreservation
6test_testing_servicestartup 6test_testing_servicestartup
7test_testing_sharedservices 7test_testing_sharedservices
8gnunet-cmds-helper
diff --git a/src/testing/testing.c b/src/testing/testing.c
index f2482e6f3..4f0b8eaa9 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -1319,7 +1319,7 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system,
1319 peer->nports = nports; 1319 peer->nports = nports;
1320 return peer; 1320 return peer;
1321 1321
1322 err_ret: 1322err_ret:
1323 GNUNET_free (ss_instances); 1323 GNUNET_free (ss_instances);
1324 GNUNET_free (ports); 1324 GNUNET_free (ports);
1325 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s", emsg_); 1325 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s", emsg_);
@@ -2293,17 +2293,11 @@ GNUNET_TESTING_free_topology (struct GNUNET_TESTING_NetjailTopology *topology)
2293 GNUNET_free (topology); 2293 GNUNET_free (topology);
2294} 2294}
2295 2295
2296/** 2296
2297 * Calculate the unique id identifying a node from a given connction.
2298 *
2299 * @param node_connection The connection we calculate the id from.
2300 * @param topology The topology we get all needed information from.
2301 * @return The unique id of the node from the connection.
2302 */
2303unsigned int 2297unsigned int
2304GNUNET_TESTING_calculate_num (struct 2298GNUNET_TESTING_calculate_num (
2305 GNUNET_TESTING_NodeConnection *node_connection, 2299 struct GNUNET_TESTING_NodeConnection *node_connection,
2306 struct GNUNET_TESTING_NetjailTopology *topology) 2300 struct GNUNET_TESTING_NetjailTopology *topology)
2307{ 2301{
2308 unsigned int n, m, num; 2302 unsigned int n, m, num;
2309 2303
@@ -2751,7 +2745,7 @@ GNUNET_TESTING_get_topo_from_file (const char *filename)
2751 } 2745 }
2752 2746
2753 LOG (GNUNET_ERROR_TYPE_DEBUG, 2747 LOG (GNUNET_ERROR_TYPE_DEBUG,
2754 "file lenght %lu\n", 2748 "file length %lu\n",
2755 fs); 2749 fs);
2756 data[fs] = '\0'; 2750 data[fs] = '\0';
2757 2751
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c
index 95d6b88e6..283284f26 100644
--- a/src/testing/testing_api_loop.c
+++ b/src/testing/testing_api_loop.c
@@ -189,14 +189,6 @@ GNUNET_TESTING_interpreter_lookup_command (
189} 189}
190 190
191 191
192/**
193 * Lookup command by label.
194 * All commands, first into the past, then into the furture are looked up.
195 *
196 * @param is interpreter to lookup command in
197 * @param label label of the command to lookup.
198 * @return the command, if it is found, or NULL.
199 */
200const struct GNUNET_TESTING_Command * 192const struct GNUNET_TESTING_Command *
201GNUNET_TESTING_interpreter_lookup_command_all ( 193GNUNET_TESTING_interpreter_lookup_command_all (
202 struct GNUNET_TESTING_Interpreter *is, 194 struct GNUNET_TESTING_Interpreter *is,
@@ -351,6 +343,7 @@ GNUNET_TESTING_interpreter_get_current_command (
351 return &is->commands[is->ip]; 343 return &is->commands[is->ip];
352} 344}
353 345
346
354const char * 347const char *
355GNUNET_TESTING_interpreter_get_current_label ( 348GNUNET_TESTING_interpreter_get_current_label (
356 struct GNUNET_TESTING_Interpreter *is) 349 struct GNUNET_TESTING_Interpreter *is)