gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated: -TestState can become private


From: gnunet
Subject: [gnunet] branch master updated: -TestState can become private
Date: Wed, 14 Dec 2022 06:50:37 +0100

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 4b6bd62e3 -TestState can become private
4b6bd62e3 is described below

commit 4b6bd62e33a875531e5f21428d38af21e223ee0d
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Wed Dec 14 14:50:30 2022 +0900

    -TestState can become private
---
 src/include/gnunet_testing_netjail_lib.h           | 33 ----------------------
 src/transport/test_transport_plugin_cmd_nat_upnp.c |  4 +--
 .../test_transport_plugin_cmd_simple_send.c        |  4 +--
 ...st_transport_plugin_cmd_simple_send_broadcast.c |  4 +--
 .../test_transport_plugin_cmd_simple_send_dv.c     |  4 +--
 .../test_transport_plugin_cmd_udp_backchannel.c    |  4 +--
 src/transport/transport-testing-cmds.h             | 33 +++++++++++++++++++++-
 7 files changed, 42 insertions(+), 44 deletions(-)

diff --git a/src/include/gnunet_testing_netjail_lib.h 
b/src/include/gnunet_testing_netjail_lib.h
index ada8b4754..a2f2e056a 100644
--- a/src/include/gnunet_testing_netjail_lib.h
+++ b/src/include/gnunet_testing_netjail_lib.h
@@ -344,39 +344,6 @@ GNUNET_TESTING_calculate_num (struct
                               GNUNET_TESTING_NodeConnection *node_connection,
                               struct GNUNET_TESTING_NetjailTopology *topology);
 
-// FIXME this was not namespaced. Is this correct here? Why are the cmd_helpers
-// defined in _plugin??
-struct GNUNET_TESTING_TestState
-{
-  /**
-   * Callback to write messages to the master loop.
-   *
-   */
-  GNUNET_TESTING_cmd_helper_write_cb write_message;
-
-  /**
-   * Callback to notify the helper test case has finished.
-   */
-  GNUNET_TESTING_cmd_helper_finish_cb finished_cb;
-
-  /**
-   * The name for a specific test environment directory.
-   *
-   */
-  char *testdir;
-
-  /**
-   * The name for the configuration file of the specific node.
-   *
-   */
-  char *cfgname;
-
-  /**
-   * The complete topology information.
-   */
-  struct GNUNET_TESTING_NetjailTopology *topology;
-};
-
 /**
  * FIXME: This was also not namespaces.
  * Struct with information for callbacks.
diff --git a/src/transport/test_transport_plugin_cmd_nat_upnp.c 
b/src/transport/test_transport_plugin_cmd_nat_upnp.c
index b02673d04..91255a9fe 100644
--- a/src/transport/test_transport_plugin_cmd_nat_upnp.c
+++ b/src/transport/test_transport_plugin_cmd_nat_upnp.c
@@ -140,7 +140,7 @@ static void
 handle_result (void *cls,
                enum GNUNET_GenericReturnValue rv)
 {
-  struct GNUNET_TESTING_TestState *ts = cls;
+  struct TestState *ts = cls;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Local test exits with status %d\n",
@@ -222,7 +222,7 @@ start_testcase (GNUNET_TESTING_cmd_helper_write_cb 
write_message,
   unsigned int m_int;
   unsigned int local_m_int;
   unsigned int num;
-  struct GNUNET_TESTING_TestState *ts = GNUNET_new (struct 
GNUNET_TESTING_TestState);
+  struct TestState *ts = GNUNET_new (struct TestState);
   struct GNUNET_TESTING_NetjailTopology *topology;
   unsigned int sscanf_ret = 0;
 
diff --git a/src/transport/test_transport_plugin_cmd_simple_send.c 
b/src/transport/test_transport_plugin_cmd_simple_send.c
index 83f9d62b8..632c522c9 100644
--- a/src/transport/test_transport_plugin_cmd_simple_send.c
+++ b/src/transport/test_transport_plugin_cmd_simple_send.c
@@ -124,7 +124,7 @@ static void
 handle_result (void *cls,
                enum GNUNET_GenericReturnValue rv)
 {
-  struct GNUNET_TESTING_TestState *ts = cls;
+  struct TestState *ts = cls;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Local test exits with status %d\n",
@@ -206,7 +206,7 @@ start_testcase (GNUNET_TESTING_cmd_helper_write_cb 
write_message,
   unsigned int m_int;
   unsigned int local_m_int;
   unsigned int num;
-  struct GNUNET_TESTING_TestState *ts = GNUNET_new (struct 
GNUNET_TESTING_TestState);
+  struct TestState *ts = GNUNET_new (struct TestState);
   struct GNUNET_TESTING_NetjailTopology *topology;
   unsigned int sscanf_ret = 0;
 
diff --git a/src/transport/test_transport_plugin_cmd_simple_send_broadcast.c 
b/src/transport/test_transport_plugin_cmd_simple_send_broadcast.c
index 9f028e260..2f84b8213 100644
--- a/src/transport/test_transport_plugin_cmd_simple_send_broadcast.c
+++ b/src/transport/test_transport_plugin_cmd_simple_send_broadcast.c
@@ -126,7 +126,7 @@ static void
 handle_result (void *cls,
                enum GNUNET_GenericReturnValue rv)
 {
-  struct GNUNET_TESTING_TestState *ts = cls;
+  struct TestState *ts = cls;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Local test exits with status %d\n",
@@ -238,7 +238,7 @@ start_testcase (GNUNET_TESTING_cmd_helper_write_cb 
write_message,
   unsigned int m_int;
   unsigned int local_m_int;
   unsigned int num;
-  struct GNUNET_TESTING_TestState *ts = GNUNET_new (struct 
GNUNET_TESTING_TestState);
+  struct TestState *ts = GNUNET_new (struct TestState);
   struct GNUNET_TESTING_NetjailTopology *topology;
   unsigned int sscanf_ret = 0;
 
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 3f4ae735c..4da03d155 100644
--- a/src/transport/test_transport_plugin_cmd_simple_send_dv.c
+++ b/src/transport/test_transport_plugin_cmd_simple_send_dv.c
@@ -178,7 +178,7 @@ static void
 handle_result (void *cls,
                enum GNUNET_GenericReturnValue rv)
 {
-  struct GNUNET_TESTING_TestState *ts = cls;
+  struct TestState *ts = cls;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Local test exits with status %d\n",
@@ -261,7 +261,7 @@ start_testcase (GNUNET_TESTING_cmd_helper_write_cb 
write_message,
   unsigned int m_int;
   unsigned int local_m_int;
   unsigned int num;
-  struct GNUNET_TESTING_TestState *ts = GNUNET_new (struct 
GNUNET_TESTING_TestState);
+  struct TestState *ts = GNUNET_new (struct TestState);
   struct GNUNET_TESTING_NetjailTopology *topology;
   struct GNUNET_MQ_MessageHandler handlers[] = {
     GNUNET_MQ_hd_var_size (test,
diff --git a/src/transport/test_transport_plugin_cmd_udp_backchannel.c 
b/src/transport/test_transport_plugin_cmd_udp_backchannel.c
index 524250590..7a26a89d8 100644
--- a/src/transport/test_transport_plugin_cmd_udp_backchannel.c
+++ b/src/transport/test_transport_plugin_cmd_udp_backchannel.c
@@ -122,7 +122,7 @@ static void
 handle_result (void *cls,
                enum GNUNET_GenericReturnValue rv)
 {
-  struct GNUNET_TESTING_TestState *ts = cls;
+  struct TestState *ts = cls;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Local test exits with status %d\n",
@@ -199,7 +199,7 @@ start_testcase (GNUNET_TESTING_cmd_helper_write_cb 
write_message,
   unsigned int m_int;
   unsigned int local_m_int;
   unsigned int num;
-  struct GNUNET_TESTING_TestState *ts = GNUNET_new (struct 
GNUNET_TESTING_TestState);
+  struct TestState *ts = GNUNET_new (struct TestState);
   struct GNUNET_TESTING_NetjailTopology *topology;
   unsigned int sscanf_ret = 0;
 
diff --git a/src/transport/transport-testing-cmds.h 
b/src/transport/transport-testing-cmds.h
index 26933a575..1088f2e5b 100644
--- a/src/transport/transport-testing-cmds.h
+++ b/src/transport/transport-testing-cmds.h
@@ -27,7 +27,7 @@
 #ifndef TRANSPORT_TESTING_CMDS_H
 #define TRANSPORT_TESTING_CMDS_H
 #include "gnunet_testing_ng_lib.h"
-
+#include "gnunet_testing_plugin.h"
 
 typedef void *
 (*GNUNET_TRANSPORT_notify_connect_cb) (struct GNUNET_TESTING_Interpreter *is,
@@ -193,6 +193,37 @@ struct StartPeerState
   enum GNUNET_GenericReturnValue broadcast;
 };
 
+struct TestState
+{
+  /**
+   * Callback to write messages to the master loop.
+   *
+   */
+  GNUNET_TESTING_cmd_helper_write_cb write_message;
+
+  /**
+   * Callback to notify the helper test case has finished.
+   */
+  GNUNET_TESTING_cmd_helper_finish_cb finished_cb;
+
+  /**
+   * The name for a specific test environment directory.
+   *
+   */
+  char *testdir;
+
+  /**
+   * The name for the configuration file of the specific node.
+   *
+   */
+  char *cfgname;
+
+  /**
+   * The complete topology information.
+   */
+  struct GNUNET_TESTING_NetjailTopology *topology;
+};
+
 
 /**
  * Create command.

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]