gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: - fixed warning, raised log level for ud


From: gnunet
Subject: [gnunet] branch master updated: - fixed warning, raised log level for udp backchannel test
Date: Thu, 02 Dec 2021 10:49:34 +0100

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

t3sserakt pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 27e4f78f3 - fixed warning, raised log level for udp backchannel test
27e4f78f3 is described below

commit 27e4f78f34c79ed18645cb15fc2c5f731c137076
Author: t3sserakt <t3ss@posteo.de>
AuthorDate: Thu Dec 2 10:49:23 2021 +0100

    - fixed warning, raised log level for udp backchannel test
---
 src/include/gnunet_testing_netjail_lib.h           |  2 +-
 .../testing_api_cmd_netjail_start_testsystem.c     |  5 ++---
 .../testing_api_cmd_netjail_stop_testsystem.c      | 11 +++++++---
 src/testing/testing_api_loop.c                     |  4 ++--
 .../test_transport_plugin_cmd_simple_send.c        | 21 +++++++++---------
 .../test_transport_plugin_cmd_simple_send_dv.c     | 25 +++++++++++-----------
 .../test_transport_plugin_cmd_udp_backchannel.c    | 15 +++++++------
 src/transport/test_transport_udp_backchannel.sh    |  2 +-
 8 files changed, 46 insertions(+), 39 deletions(-)

diff --git a/src/include/gnunet_testing_netjail_lib.h 
b/src/include/gnunet_testing_netjail_lib.h
index 7ec6b294b..011db00f8 100644
--- a/src/include/gnunet_testing_netjail_lib.h
+++ b/src/include/gnunet_testing_netjail_lib.h
@@ -483,7 +483,7 @@ GNUNET_TESTING_cmd_local_test_prepared (const char *label,
 #define GNUNET_TESTING_SIMPLE_NETJAIL_TRAITS(op) \
   op (test_system, const struct GNUNET_TESTING_System) \
   op (async_context, const struct GNUNET_TESTING_AsyncContext) \
-  op (helper_handles, const void *) \
+  op (helper_handles, const struct GNUNET_HELPER_Handle *) \
   op (local_prepared_state, const struct LocalPreparedState) \
   op (block_state, const struct BlockState)
 
diff --git a/src/testing/testing_api_cmd_netjail_start_testsystem.c 
b/src/testing/testing_api_cmd_netjail_start_testsystem.c
index d24ad3d28..04d7eef44 100644
--- a/src/testing/testing_api_cmd_netjail_start_testsystem.c
+++ b/src/testing/testing_api_cmd_netjail_start_testsystem.c
@@ -222,7 +222,7 @@ netjail_exec_traits (void *cls,
 
 
   struct GNUNET_TESTING_Trait traits[] = {
-    GNUNET_TESTING_make_trait_helper_handles ((const void **) helper),
+    GNUNET_TESTING_make_trait_helper_handles (helper),
     GNUNET_TESTING_trait_end ()
   };
 
@@ -262,7 +262,6 @@ send_message_to_locals (
   struct GNUNET_MessageHeader *header
   )
 {
-  // unsigned int total_number = ns->local_m * ns->global_n + ns->known;
   const struct GNUNET_HELPER_Handle *helper;
   struct TestingSystemCount *tbc;
 
@@ -282,7 +281,7 @@ send_message_to_locals (
 
 
   struct GNUNET_HELPER_SendHandle *sh = GNUNET_HELPER_send (
-    helper,
+    (struct GNUNET_HELPER_Handle *) helper,
     header,
     GNUNET_NO,
     &clear_msg,
diff --git a/src/testing/testing_api_cmd_netjail_stop_testsystem.c 
b/src/testing/testing_api_cmd_netjail_stop_testsystem.c
index caf83ab0e..2e42056dc 100644
--- a/src/testing/testing_api_cmd_netjail_stop_testsystem.c
+++ b/src/testing/testing_api_cmd_netjail_stop_testsystem.c
@@ -100,8 +100,9 @@ stop_testing_system_run (void *cls,
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "i: %u\n",
                 i);
-    GNUNET_HELPER_stop (helper[i - 1],
-                        GNUNET_YES);
+    GNUNET_HELPER_stop (
+      (struct GNUNET_HELPER_Handle *) helper[i - 1],
+      GNUNET_YES);
   }
 
   for (int i = 1; i <= shs->global_n; i++)
@@ -112,7 +113,11 @@ stop_testing_system_run (void *cls,
                   "i: %u j: %u\n",
                   i,
                   j);
-      GNUNET_HELPER_stop (helper[(i - 1) * shs->local_m + j + shs->known - 1],
+      GNUNET_HELPER_stop ((struct GNUNET_HELPER_Handle *) helper[(i - 1)
+                                                                 * shs->local_m
+                                                                 + j
+                                                                 + shs->known
+                                                                 - 1],
                           GNUNET_YES);
     }
   }
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c
index 290311c59..36e9da220 100644
--- a/src/testing/testing_api_loop.c
+++ b/src/testing/testing_api_loop.c
@@ -123,9 +123,9 @@ get_command (struct GNUNET_TESTING_Interpreter *is,
     if (GNUNET_TESTING_cmd_is_batch_ (cmd))
     {
 #define BATCH_INDEX 1
-      struct GNUNET_TESTING_Command *batch;
+      const struct GNUNET_TESTING_Command *batch;
       struct GNUNET_TESTING_Command *current;
-      struct GNUNET_TESTING_Command *icmd;
+      const struct GNUNET_TESTING_Command *icmd;
       const struct GNUNET_TESTING_Command *match;
 
       current = GNUNET_TESTING_cmd_batch_get_current_ (cmd);
diff --git a/src/transport/test_transport_plugin_cmd_simple_send.c 
b/src/transport/test_transport_plugin_cmd_simple_send.c
index 6a6861d77..154c0abca 100644
--- a/src/transport/test_transport_plugin_cmd_simple_send.c
+++ b/src/transport/test_transport_plugin_cmd_simple_send.c
@@ -97,15 +97,15 @@ static void
 handle_test (void *cls,
              const struct GNUNET_TRANSPORT_TESTING_TestMessage *message)
 {
-  struct GNUNET_TESTING_AsyncContext *ac;
+  const struct GNUNET_TESTING_AsyncContext *ac;
 
   GNUNET_TESTING_get_trait_async_context (&block_receive,
                                           &ac);
   GNUNET_assert  (NULL != ac);
   if (NULL == ac->cont)
-    GNUNET_TESTING_async_fail (ac);
+    GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) ac);
   else
-    GNUNET_TESTING_async_finish (ac);
+    GNUNET_TESTING_async_finish ((struct GNUNET_TESTING_AsyncContext *) ac);
 }
 
 
@@ -116,15 +116,15 @@ handle_test (void *cls,
 static void
 all_peers_started ()
 {
-  struct GNUNET_TESTING_AsyncContext *ac;
+  const struct GNUNET_TESTING_AsyncContext *ac;
 
   GNUNET_TESTING_get_trait_async_context (&block_send,
                                           &ac);
   GNUNET_assert  (NULL != ac);
   if (NULL == ac->cont)
-    GNUNET_TESTING_async_fail (ac);
+    GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) ac);
   else
-    GNUNET_TESTING_async_finish (ac);
+    GNUNET_TESTING_async_finish ((struct GNUNET_TESTING_AsyncContext *) ac);
 }
 
 
@@ -167,7 +167,7 @@ static void *
 notify_connect (struct GNUNET_TESTING_Interpreter *is,
                 const struct GNUNET_PeerIdentity *peer)
 {
-  struct ConnectPeersState *cps;
+  const struct ConnectPeersState *cps;
   const struct GNUNET_TESTING_Command *cmd;
 
   cmd = GNUNET_TESTING_interpreter_lookup_command (is,
@@ -188,15 +188,16 @@ notify_connect (struct GNUNET_TESTING_Interpreter *is,
 static void
 all_local_tests_prepared ()
 {
-  struct LocalPreparedState *lfs;
+  const struct LocalPreparedState *lfs;
 
   GNUNET_TESTING_get_trait_local_prepared_state (&local_prepared,
                                                  &lfs);
   GNUNET_assert (NULL != &lfs->ac);
   if (NULL == lfs->ac.cont)
-    GNUNET_TESTING_async_fail (&lfs->ac);
+    GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) 
&lfs->ac);
   else
-    GNUNET_TESTING_async_finish (&lfs->ac);
+    GNUNET_TESTING_async_finish ((struct
+                                  GNUNET_TESTING_AsyncContext *) &lfs->ac);
 }
 
 
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 6a3492705..e73e5a0b2 100644
--- a/src/transport/test_transport_plugin_cmd_simple_send_dv.c
+++ b/src/transport/test_transport_plugin_cmd_simple_send_dv.c
@@ -96,7 +96,7 @@ static void
 handle_test (void *cls,
              const struct GNUNET_TRANSPORT_TESTING_TestMessage *message)
 {
-  struct GNUNET_TESTING_AsyncContext *ac;
+  const struct GNUNET_TESTING_AsyncContext *ac;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Received test message\n");
@@ -104,9 +104,9 @@ handle_test (void *cls,
                                           &ac);
   GNUNET_assert  (NULL != ac);
   if (NULL == ac->cont)
-    GNUNET_TESTING_async_fail (ac);
+    GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) ac);
   else
-    GNUNET_TESTING_async_finish (ac);
+    GNUNET_TESTING_async_finish ((struct GNUNET_TESTING_AsyncContext *) ac);
 }
 
 
@@ -117,7 +117,7 @@ handle_test (void *cls,
 static void
 all_peers_started ()
 {
-  struct GNUNET_TESTING_AsyncContext *ac;
+  const struct GNUNET_TESTING_AsyncContext *ac;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Received message\n");
@@ -125,9 +125,9 @@ all_peers_started ()
                                           &ac);
   GNUNET_assert  (NULL != ac);
   if (NULL == ac->cont)
-    GNUNET_TESTING_async_fail (ac);
+    GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) ac);
   else
-    GNUNET_TESTING_async_finish (ac);
+    GNUNET_TESTING_async_finish ((struct GNUNET_TESTING_AsyncContext *) ac);
 }
 
 
@@ -170,7 +170,7 @@ static void *
 notify_connect (struct GNUNET_TESTING_Interpreter *is,
                 const struct GNUNET_PeerIdentity *peer)
 {
-  struct ConnectPeersState *cps;
+  const struct ConnectPeersState *cps;
   const struct GNUNET_TESTING_Command *cmd;
   void *ret = NULL;
 
@@ -178,12 +178,12 @@ notify_connect (struct GNUNET_TESTING_Interpreter *is,
               "notify_connect peer %s\n",
               GNUNET_i2s (peer));
   cmd = GNUNET_TESTING_interpreter_lookup_command_all (is,
-                                                   "connect-peers");
+                                                       "connect-peers");
   GNUNET_TRANSPORT_get_trait_connect_peer_state (cmd,
                                                  &cps);
   cps->notify_connect (is,
                        peer);
-  
+
   return ret;
 }
 
@@ -194,15 +194,16 @@ notify_connect (struct GNUNET_TESTING_Interpreter *is,
 static void
 all_local_tests_prepared ()
 {
-  struct LocalPreparedState *lfs;
+  const struct LocalPreparedState *lfs;
 
   GNUNET_TESTING_get_trait_local_prepared_state (&local_prepared,
                                                  &lfs);
   GNUNET_assert (NULL != &lfs->ac);
   if (NULL == lfs->ac.cont)
-    GNUNET_TESTING_async_fail (&lfs->ac);
+    GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) 
&lfs->ac);
   else
-    GNUNET_TESTING_async_finish (&lfs->ac);
+    GNUNET_TESTING_async_finish ((struct
+                                  GNUNET_TESTING_AsyncContext *) &lfs->ac);
 }
 
 
diff --git a/src/transport/test_transport_plugin_cmd_udp_backchannel.c 
b/src/transport/test_transport_plugin_cmd_udp_backchannel.c
index b594049c9..537832e61 100644
--- a/src/transport/test_transport_plugin_cmd_udp_backchannel.c
+++ b/src/transport/test_transport_plugin_cmd_udp_backchannel.c
@@ -113,15 +113,15 @@ handle_test (void *cls,
 static void
 all_peers_started ()
 {
-  struct GNUNET_TESTING_AsyncContext *ac;
+  const struct GNUNET_TESTING_AsyncContext *ac;
 
   GNUNET_TESTING_get_trait_async_context (&block_send,
                                           &ac);
   GNUNET_assert  (NULL != ac);
   if ((NULL == ac->cont))
-    GNUNET_TESTING_async_fail (ac);
+    GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) ac);
   else
-    GNUNET_TESTING_async_finish (ac);
+    GNUNET_TESTING_async_finish ((struct GNUNET_TESTING_AsyncContext *) ac);
 }
 
 
@@ -163,7 +163,7 @@ static void *
 notify_connect (struct GNUNET_TESTING_Interpreter *is,
                 const struct GNUNET_PeerIdentity *peer)
 {
-  struct ConnectPeersState *cps;
+  const struct ConnectPeersState *cps;
 
   GNUNET_TRANSPORT_get_trait_connect_peer_state (&connect_peers,
                                                  &cps);
@@ -180,15 +180,16 @@ notify_connect (struct GNUNET_TESTING_Interpreter *is,
 static void
 all_local_tests_prepared ()
 {
-  struct LocalPreparedState *lfs;
+  const struct LocalPreparedState *lfs;
 
   GNUNET_TESTING_get_trait_local_prepared_state (&local_prepared,
                                                  &lfs);
   GNUNET_assert (NULL != &lfs->ac);
   if (NULL == lfs->ac.cont)
-    GNUNET_TESTING_async_fail (&lfs->ac);
+    GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) 
&lfs->ac);
   else
-    GNUNET_TESTING_async_finish (&lfs->ac);
+    GNUNET_TESTING_async_finish ((struct
+                                  GNUNET_TESTING_AsyncContext *) &lfs->ac);
 }
 
 /**
diff --git a/src/transport/test_transport_udp_backchannel.sh 
b/src/transport/test_transport_udp_backchannel.sh
index b42186307..1b0e283b5 100755
--- a/src/transport/test_transport_udp_backchannel.sh
+++ b/src/transport/test_transport_udp_backchannel.sh
@@ -4,7 +4,7 @@ if ! [ -d "/run/netns" ]; then
 fi
 if  [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" == 1 ]; then
 #exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; 
valgrind --leak-check=full --track-origins=yes --trace-children=yes 
--trace-children-skip=/usr/bin/awk,/usr/bin/cut,/usr/bin/seq,/sbin/ip 
./test_transport_start_with_config test_transport_udp_backchannel_topo.conf"
-exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; 
./test_transport_start_with_config test_transport_udp_backchannel_topo.conf"
+exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; 
GNUNET_FORCE_LOG='transport;;;;DEBUG' GNUNET_FORCE_LOGFILE='test.out' 
./test_transport_start_with_config test_transport_udp_backchannel_topo.conf"
 # exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs 
/run/netns; valgrind --leak-check=full --track-origins=yes 
./test_transport_start_with_config test_transport_udp_backchannel_topo.conf"
 else
     echo -e "Error during test setup: The kernel parameter 
kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n 
sysctl kernel.unprivileged_userns_clone=1\n"

-- 
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]