From 8cd4dadfb9ebd4db232fda79d5c4353eacb15690 Mon Sep 17 00:00:00 2001 From: t3sserakt Date: Tue, 9 Nov 2021 17:38:47 +0100 Subject: - moved global netjail methods to its own header file. - added configuration by string in test skript instead of config file. - moved netjail scripts to contrib/netjail and install them into the share/gnunet directory. --- src/transport/test_transport_simple_send_string.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 src/transport/test_transport_simple_send_string.sh (limited to 'src/transport/test_transport_simple_send_string.sh') diff --git a/src/transport/test_transport_simple_send_string.sh b/src/transport/test_transport_simple_send_string.sh new file mode 100755 index 000000000..018ea55e8 --- /dev/null +++ b/src/transport/test_transport_simple_send_string.sh @@ -0,0 +1,16 @@ +#!/bin/bash +string=$(cat << EOF +M:2 +N:1 +X:0 +T:libgnunet_test_transport_plugin_cmd_simple_send +P:1:1|{connect:{P:1:2:tcp}} +P:1:2|{connect:{P:1:1:tcp}} +EOF +) +if [ "$(sysctl -n 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 + 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 -- cgit v1.2.3