aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorxrs <xrs@mail36.net>2020-03-02 21:11:21 +0100
committerxrs <xrs@mail36.net>2020-05-21 22:46:48 +0200
commit9114113f5ebe7661078bfb1bf670b7923079af89 (patch)
tree56db1734e1c963b49cb33f7a64a4c476c903efca /src
parent4fa906387acd7e77d7521300602268927ddd9699 (diff)
downloadgnunet-9114113f5ebe7661078bfb1bf670b7923079af89.tar.gz
gnunet-9114113f5ebe7661078bfb1bf670b7923079af89.zip
fix names and add comments
Diffstat (limited to 'src')
-rw-r--r--src/cadet/test_cadeT.c4
-rw-r--r--src/cadet/test_cadeT_util.c10
2 files changed, 9 insertions, 5 deletions
diff --git a/src/cadet/test_cadeT.c b/src/cadet/test_cadeT.c
index 58b6db543..014c64ebd 100644
--- a/src/cadet/test_cadeT.c
+++ b/src/cadet/test_cadeT.c
@@ -65,7 +65,9 @@ run_test ()
65 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%s\n", __func__); 65 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%s\n", __func__);
66 66
67 /** 67 /**
68 * Do testing here. 68 * This function is called after all testbed management is done and the
69 * testbed peers are ready for the actual test logic.
70 * Use struct test_peers[i] to control the peers.
69 */ 71 */
70} 72}
71 73
diff --git a/src/cadet/test_cadeT_util.c b/src/cadet/test_cadeT_util.c
index 89fe2a5f0..2db619a38 100644
--- a/src/cadet/test_cadeT_util.c
+++ b/src/cadet/test_cadeT_util.c
@@ -28,12 +28,12 @@
28/** 28/**
29 * Testbed operation for connecting to the services. 29 * Testbed operation for connecting to the services.
30 */ 30 */
31static struct GNUNET_TESTBED_Operation *testbed_to_svc[2]; 31static struct GNUNET_TESTBED_Operation *testbed_to_svc[REQUESTED_PEERS];
32 32
33/** 33/**
34 * Testbed operation for requesting peer information. 34 * Testbed operation for requesting peer information.
35 */ 35 */
36static struct GNUNET_TESTBED_Operation *testbed_info_req[2]; 36static struct GNUNET_TESTBED_Operation *testbed_info_req[REQUESTED_PEERS];
37 37
38/** 38/**
39 * Port name kown by the two peers. 39 * Port name kown by the two peers.
@@ -85,7 +85,7 @@ struct TEST_PEERS
85 */ 85 */
86 struct GNUNET_CADET_Handle *cadet; 86 struct GNUNET_CADET_Handle *cadet;
87 87
88} test_peers[2]; 88} test_peers[REQUESTED_PEERS];
89 89
90/************************** TESBED MANAGEMENT *****************************/ 90/************************** TESBED MANAGEMENT *****************************/
91 91
@@ -198,6 +198,8 @@ check_test_readyness (void *cls,
198{ 198{
199 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%s\n", __func__); 199 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%s\n", __func__);
200 200
201 // FIXME: check, if all peers are ready, then continue with the
202 // test logic.
201 if (GNUNET_OK) 203 if (GNUNET_OK)
202 run_test(); 204 run_test();
203} 205}
@@ -247,7 +249,7 @@ connect_to_peers (void *cls,
247{ 249{
248 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%s\n", __func__); 250 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%s\n", __func__);
249 251
250 GNUNET_assert (0 == links_failed); 252 GNUNET_assert (GNUNET_NO == links_failed);
251 253
252 for (int i=0; i<num_peers; i++) 254 for (int i=0; i<num_peers; i++)
253 { 255 {