From 9114113f5ebe7661078bfb1bf670b7923079af89 Mon Sep 17 00:00:00 2001 From: xrs Date: Mon, 2 Mar 2020 21:11:21 +0100 Subject: [PATCH] fix names and add comments --- src/cadet/test_cadeT.c | 4 +++- src/cadet/test_cadeT_util.c | 10 ++++++---- 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 () GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%s\n", __func__); /** - * Do testing here. + * This function is called after all testbed management is done and the + * testbed peers are ready for the actual test logic. + * Use struct test_peers[i] to control the peers. */ } 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 @@ /** * Testbed operation for connecting to the services. */ -static struct GNUNET_TESTBED_Operation *testbed_to_svc[2]; +static struct GNUNET_TESTBED_Operation *testbed_to_svc[REQUESTED_PEERS]; /** * Testbed operation for requesting peer information. */ -static struct GNUNET_TESTBED_Operation *testbed_info_req[2]; +static struct GNUNET_TESTBED_Operation *testbed_info_req[REQUESTED_PEERS]; /** * Port name kown by the two peers. @@ -85,7 +85,7 @@ struct TEST_PEERS */ struct GNUNET_CADET_Handle *cadet; -} test_peers[2]; +} test_peers[REQUESTED_PEERS]; /************************** TESBED MANAGEMENT *****************************/ @@ -198,6 +198,8 @@ check_test_readyness (void *cls, { GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%s\n", __func__); + // FIXME: check, if all peers are ready, then continue with the + // test logic. if (GNUNET_OK) run_test(); } @@ -247,7 +249,7 @@ connect_to_peers (void *cls, { GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%s\n", __func__); - GNUNET_assert (0 == links_failed); + GNUNET_assert (GNUNET_NO == links_failed); for (int i=0; i