aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-03-07 20:16:28 +0100
committerMartin Schanzenbach <schanzen@gnunet.org>2022-03-07 20:16:28 +0100
commit13be8d080e44f6ad2c971de590e5217c9a9328b5 (patch)
tree8361b4f19bb13154d9178011abddfb7a7d22892d /src/transport
parentfd88ee22f383b42084acbb2a44c356e2d277e912 (diff)
downloadgnunet-13be8d080e44f6ad2c971de590e5217c9a9328b5.tar.gz
gnunet-13be8d080e44f6ad2c971de590e5217c9a9328b5.zip
-better handling of tng netns
Diffstat (limited to 'src/transport')
-rwxr-xr-xsrc/transport/test_transport_simple_send_broadcast.sh8
-rwxr-xr-xsrc/transport/test_transport_simple_send_dv.sh8
-rwxr-xr-xsrc/transport/test_transport_simple_send_dv_circle.sh9
-rwxr-xr-xsrc/transport/test_transport_simple_send_string.sh8
-rwxr-xr-xsrc/transport/test_transport_udp_backchannel.sh9
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 @@
2if ! [ -d "/run/netns" ]; then 2if ! [ -d "/run/netns" ]; then
3 echo You have to create the directory /run/netns. 3 echo You have to create the directory /run/netns.
4fi 4fi
5if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" == 1 ]; then 5if [ -f /proc/sys/kernel/unprivileged_userns_clone ]; then
6 # 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" 6 if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" != 1 ]; then
7 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"
8else
9 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" 7 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"
10 exit 78 8 exit 78
9 fi
11fi 10fi
11exec 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 @@
2if ! [ -d "/run/netns" ]; then 2if ! [ -d "/run/netns" ]; then
3 echo You have to create the directory /run/netns. 3 echo You have to create the directory /run/netns.
4fi 4fi
5if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" == 1 ]; then 5if [ -f /proc/sys/kernel/unprivileged_userns_clone ]; then
6 # 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" 6 if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" != 1 ]; then
7 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"
8else
9 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" 7 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"
10 exit 78 8 exit 78
9 fi
11fi 10fi
11exec 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 @@
2if ! [ -d "/run/netns" ]; then 2if ! [ -d "/run/netns" ]; then
3 echo You have to create the directory /run/netns. 3 echo You have to create the directory /run/netns.
4fi 4fi
5if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" == 1 ]; then 5if [ -f /proc/sys/kernel/unprivileged_userns_clone ]; then
6 # 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" 6 if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" != 1 ]; then
7 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"
8 #./test_transport_start_with_config test_transport_distance_vector_circle_topo.conf
9else
10 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" 7 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"
11 exit 78 8 exit 78
9 fi
12fi 10fi
11exec 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
11if ! [ -d "/run/netns" ]; then 11if ! [ -d "/run/netns" ]; then
12 echo You have to create the directory /run/netns. 12 echo You have to create the directory /run/netns.
13fi 13fi
14if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" == 1 ]; then 14if [ -f /proc/sys/kernel/unprivileged_userns_clone ]; then
15 exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config -s '$string'" 15 if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" != 1 ]; then
16else
17 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" 16 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"
18 exit 78 17 exit 78
18 fi
19fi 19fi
20
21exec 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
5if ! [ -d "/run/netns" ]; then 5if ! [ -d "/run/netns" ]; then
6 echo You have to create the directory /run/netns. 6 echo You have to create the directory /run/netns.
7fi 7fi
8if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" == 1 ]; then 8if [ -f /proc/sys/kernel/unprivileged_userns_clone ]; then
9#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" 9 if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" != 1 ]; then
10exec 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"
11# 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"
12else
13 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" 10 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"
14 exit 78 11 exit 78
12 fi
15fi 13fi
14exec 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"