diff options
author | t3sserakt <t3ss@posteo.de> | 2021-11-09 17:38:47 +0100 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2021-11-09 17:43:25 +0100 |
commit | 8cd4dadfb9ebd4db232fda79d5c4353eacb15690 (patch) | |
tree | a063e52d71d1b6611371f6c129c6ae1b0215cf99 /src/transport/test_transport_simple_send_string.sh | |
parent | 6fb788ca2ec44837ea10a36be7fd0030fb08955b (diff) | |
download | gnunet-8cd4dadfb9ebd4db232fda79d5c4353eacb15690.tar.gz gnunet-8cd4dadfb9ebd4db232fda79d5c4353eacb15690.zip |
- moved global netjail methods to its own header file.dev/t3ss/tng
- 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.
Diffstat (limited to 'src/transport/test_transport_simple_send_string.sh')
-rwxr-xr-x | src/transport/test_transport_simple_send_string.sh | 16 |
1 files changed, 16 insertions, 0 deletions
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 @@ | |||
1 | #!/bin/bash | ||
2 | string=$(cat << EOF | ||
3 | M:2 | ||
4 | N:1 | ||
5 | X:0 | ||
6 | T:libgnunet_test_transport_plugin_cmd_simple_send | ||
7 | P:1:1|{connect:{P:1:2:tcp}} | ||
8 | P:1:2|{connect:{P:1:1:tcp}} | ||
9 | EOF | ||
10 | ) | ||
11 | if [ "$(sysctl -n kernel.unprivileged_userns_clone)" == 1 ]; then | ||
12 | exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config -s '$string'" | ||
13 | else | ||
14 | 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" | ||
15 | exit 78 | ||
16 | fi | ||