gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated (0ee73591c -> 9ea923191)


From: gnunet
Subject: [gnunet] branch master updated (0ee73591c -> 9ea923191)
Date: Tue, 09 Jul 2024 17:19:20 +0200

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

julius-buenger pushed a change to branch master
in repository gnunet.

    from 0ee73591c CI: disable failing riscv jobs temporarily
     new dadaf7f85 testing: fix node index in script
     new c574280f3 testing: fix respect PATH in netjail scripts
     new e6ed05a9b testing: fix host - network conversion
     new 9ea923191 testing: fix barrier reached - add cmd to waiting before 
return

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 scripts/netjail/netjail_core.sh                             | 7 +++++--
 scripts/netjail/netjail_start.sh                            | 5 ++++-
 scripts/netjail/netjail_stop.sh                             | 5 ++++-
 src/lib/testing/gnunet-cmds-helper.c                        | 9 +++++----
 src/lib/testing/testing_api_cmd_barrier_reached.c           | 6 +++---
 src/lib/testing/testing_api_cmd_netjail_start_cmds_helper.c | 1 +
 6 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/scripts/netjail/netjail_core.sh b/scripts/netjail/netjail_core.sh
index 8a039cd2f..1e8600a78 100755
--- a/scripts/netjail/netjail_core.sh
+++ b/scripts/netjail/netjail_core.sh
@@ -9,10 +9,13 @@ PREFIX=${PPID:?must run from a parent process}
 # able running the actual commands as the
 # original user.
 
-export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+if [ -z ${PATH+x} ];
+then
+  export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+fi
 
 export RESULT=
-export NAMESPACE_NUM=0
+export NAMESPACE_NUM=1
 export INTERFACE_NUM=0
 
 IPT=iptables-nft
diff --git a/scripts/netjail/netjail_start.sh b/scripts/netjail/netjail_start.sh
index 45b7fdd74..ab10daecb 100755
--- a/scripts/netjail/netjail_start.sh
+++ b/scripts/netjail/netjail_start.sh
@@ -5,7 +5,10 @@
 set -eu
 set -x
 
-export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+if [ -z ${PATH+x} ];
+then
+  export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+fi
 
 filename=$1
 PREFIX=$PPID
diff --git a/scripts/netjail/netjail_stop.sh b/scripts/netjail/netjail_stop.sh
index c17a4d6ca..5da050952 100755
--- a/scripts/netjail/netjail_stop.sh
+++ b/scripts/netjail/netjail_stop.sh
@@ -5,7 +5,10 @@
 set -eu
 set -x
 
-export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+if [ -z ${PATH+x} ];
+then
+  export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+fi
 
 filename=$1
 PREFIX=$PPID
diff --git a/src/lib/testing/gnunet-cmds-helper.c 
b/src/lib/testing/gnunet-cmds-helper.c
index 93d4d96de..319830ef3 100644
--- a/src/lib/testing/gnunet-cmds-helper.c
+++ b/src/lib/testing/gnunet-cmds-helper.c
@@ -284,8 +284,8 @@ check_helper_init (
   void *cls,
   const struct GNUNET_TESTING_CommandHelperInit *msg)
 {
-  uint16_t msize = htons (msg->header.size);
-  uint32_t barrier_count = htonl (msg->barrier_count);
+  uint16_t msize = ntohs (msg->header.size);
+  uint32_t barrier_count = ntohl (msg->barrier_count);
   size_t bs = barrier_count * sizeof (struct GNUNET_ShortHashCode);
   size_t left = msize - bs - sizeof (*msg);
   const struct GNUNET_ShortHashCode *bd
@@ -311,8 +311,9 @@ handle_helper_init (
   void *cls,
   const struct GNUNET_TESTING_CommandHelperInit *msg)
 {
-  uint16_t msize = htons (msg->header.size);
-  uint32_t barrier_count = htonl (msg->barrier_count);
+  uint16_t msize = ntohs (msg->header.size);
+  //uint32_t barrier_count = GNUNET_ntohll (msg->barrier_count);
+  uint32_t barrier_count = ntohl (msg->barrier_count);
   size_t bs = barrier_count * sizeof (struct GNUNET_ShortHashCode);
   size_t left = msize - bs - sizeof (*msg);
   const struct GNUNET_ShortHashCode *bd
diff --git a/src/lib/testing/testing_api_cmd_barrier_reached.c 
b/src/lib/testing/testing_api_cmd_barrier_reached.c
index 35d3cbcd9..9fbabaca0 100644
--- a/src/lib/testing/testing_api_cmd_barrier_reached.c
+++ b/src/lib/testing/testing_api_cmd_barrier_reached.c
@@ -85,6 +85,9 @@ barrier_reached_run (void *cls,
     GNUNET_TESTING_async_finish (&brs->ac);
     return;
   }
+  GNUNET_array_append (barrier->waiting,
+                       barrier->cnt_waiting,
+                       &brs->ac);
   if (barrier->inherited)
   {
     struct GNUNET_TESTING_CommandBarrierReached cbr = {
@@ -122,9 +125,6 @@ barrier_reached_run (void *cls,
                        0);
     return;
   }
-  GNUNET_array_append (barrier->waiting,
-                       barrier->cnt_waiting,
-                       &brs->ac);
 }
 
 
diff --git a/src/lib/testing/testing_api_cmd_netjail_start_cmds_helper.c 
b/src/lib/testing/testing_api_cmd_netjail_start_cmds_helper.c
index 24cfd5815..799ff43f1 100644
--- a/src/lib/testing/testing_api_cmd_netjail_start_cmds_helper.c
+++ b/src/lib/testing/testing_api_cmd_netjail_start_cmds_helper.c
@@ -366,6 +366,7 @@ send_start_messages (struct NetJailState *ns,
   msg = GNUNET_malloc (msg_len);
   msg->header.size = htons ((uint16_t) msg_len);
   msg->header.type = htons (GNUNET_MESSAGE_TYPE_CMDS_HELPER_INIT);
+  msg->barrier_count = htonl (num_barriers);
   bar = (struct GNUNET_ShortHashCode *) &msg[1];
   bar_pos = bar;
   GNUNET_TESTING_barrier_iterate_ (ns->is,

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