fix names and add comments
authorxrs <xrs@mail36.net>
Mon, 2 Mar 2020 20:11:21 +0000 (21:11 +0100)
committerxrs <xrs@mail36.net>
Mon, 2 Mar 2020 20:11:21 +0000 (21:11 +0100)
src/cadet/test_cadeT.c
src/cadet/test_cadeT_util.c

index 58b6db5431bdb931c9984dbf920ec530ac38f2eb..014c64ebd7639110fc7e760acf80c9effb86acf0 100644 (file)
@@ -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.
    */
 }
 
index 89fe2a5f087410ef0e5ac4ba360f180ed281d0ca..2db619a389c89b1c118c433f3d41d6ad0cebfd90 100644 (file)
 /**
  * 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<num_peers; i++)
   {