gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: -better handling of tng netns


From: gnunet
Subject: [gnunet] branch master updated: -better handling of tng netns
Date: Mon, 07 Mar 2022 20:16:33 +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 13be8d080 -better handling of tng netns
13be8d080 is described below

commit 13be8d080e44f6ad2c971de590e5217c9a9328b5
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Mon Mar 7 20:16:28 2022 +0100

    -better handling of tng netns
---
 src/transport/test_transport_simple_send_broadcast.sh | 8 ++++----
 src/transport/test_transport_simple_send_dv.sh        | 8 ++++----
 src/transport/test_transport_simple_send_dv_circle.sh | 9 ++++-----
 src/transport/test_transport_simple_send_string.sh    | 8 +++++---
 src/transport/test_transport_udp_backchannel.sh       | 9 ++++-----
 5 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/src/transport/test_transport_simple_send_broadcast.sh 
b/src/transport/test_transport_simple_send_broadcast.sh
index f264b1203..a4801bf70 100755
--- a/src/transport/test_transport_simple_send_broadcast.sh
+++ b/src/transport/test_transport_simple_send_broadcast.sh
@@ -2,10 +2,10 @@
 if ! [ -d "/run/netns" ]; then
     echo You have to create the directory /run/netns.
 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/sed/bash  
./test_transport_start_with_config 
test_transport_simple_send_broadcast_topo.conf"
-    exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs 
/run/netns; ./test_transport_start_with_config 
test_transport_simple_send_broadcast_topo.conf"
-else
+if [ -f /proc/sys/kernel/unprivileged_userns_clone ]; then
+  if  [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" != 1 ]; then
     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"
     exit 78
+  fi
 fi
+exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; 
./test_transport_start_with_config 
test_transport_simple_send_broadcast_topo.conf"
diff --git a/src/transport/test_transport_simple_send_dv.sh 
b/src/transport/test_transport_simple_send_dv.sh
index fa127cfa4..b57ee0629 100755
--- a/src/transport/test_transport_simple_send_dv.sh
+++ b/src/transport/test_transport_simple_send_dv.sh
@@ -2,10 +2,10 @@
 if ! [ -d "/run/netns" ]; then
     echo You have to create the directory /run/netns.
 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/sed/bash  
./test_transport_start_with_config test_transport_distance_vector_topo.conf"
-    exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs 
/run/netns; ./test_transport_start_with_config 
test_transport_distance_vector_topo.conf"
-else
+if [ -f /proc/sys/kernel/unprivileged_userns_clone ]; then
+  if  [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" != 1 ]; then
     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"
     exit 78
+  fi
 fi
+exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; 
./test_transport_start_with_config test_transport_distance_vector_topo.conf"
diff --git a/src/transport/test_transport_simple_send_dv_circle.sh 
b/src/transport/test_transport_simple_send_dv_circle.sh
index de16df356..bd5f00abe 100755
--- a/src/transport/test_transport_simple_send_dv_circle.sh
+++ b/src/transport/test_transport_simple_send_dv_circle.sh
@@ -2,11 +2,10 @@
 if ! [ -d "/run/netns" ]; then
     echo You have to create the directory /run/netns.
 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/sed/bash  
./test_transport_start_with_config test_transport_distance_vector_topo.conf"
-    exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs 
/run/netns; ./test_transport_start_with_config 
test_transport_distance_vector_circle_topo.conf"
-    #./test_transport_start_with_config 
test_transport_distance_vector_circle_topo.conf
-else
+if [ -f /proc/sys/kernel/unprivileged_userns_clone ]; then
+  if  [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" != 1 ]; then
     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"
     exit 78
+  fi
 fi
+exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; 
./test_transport_start_with_config 
test_transport_distance_vector_circle_topo.conf"
diff --git a/src/transport/test_transport_simple_send_string.sh 
b/src/transport/test_transport_simple_send_string.sh
index b2bd05d5f..211abb494 100755
--- a/src/transport/test_transport_simple_send_string.sh
+++ b/src/transport/test_transport_simple_send_string.sh
@@ -11,9 +11,11 @@ EOF
 if ! [ -d "/run/netns" ]; then
     echo You have to create the directory /run/netns.
 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; ./test_transport_start_with_config -s '$string'"
-else
+if [ -f /proc/sys/kernel/unprivileged_userns_clone ]; then
+  if  [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" != 1 ]; then
     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"
     exit 78
+  fi
 fi
+
+exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; 
./test_transport_start_with_config -s '$string'"
diff --git a/src/transport/test_transport_udp_backchannel.sh 
b/src/transport/test_transport_udp_backchannel.sh
index c52734a55..1a7c83385 100755
--- a/src/transport/test_transport_udp_backchannel.sh
+++ b/src/transport/test_transport_udp_backchannel.sh
@@ -5,11 +5,10 @@ fi
 if ! [ -d "/run/netns" ]; then
     echo You have to create the directory /run/netns.
 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; 
GNUNET_FORCE_LOG=';;;;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
+if [ -f /proc/sys/kernel/unprivileged_userns_clone ]; then
+  if  [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" != 1 ]; then
     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"
     exit 78
+  fi
 fi
+exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; 
GNUNET_FORCE_LOG=';;;;DEBUG' GNUNET_FORCE_LOGFILE='test.out' 
./test_transport_start_with_config test_transport_udp_backchannel_topo.conf"

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