diff options
Diffstat (limited to 'src/service/vpn/tests/test-helper-icmp.sh')
-rwxr-xr-x | src/service/vpn/tests/test-helper-icmp.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/service/vpn/tests/test-helper-icmp.sh b/src/service/vpn/tests/test-helper-icmp.sh new file mode 100755 index 000000000..2d0c8425a --- /dev/null +++ b/src/service/vpn/tests/test-helper-icmp.sh | |||
@@ -0,0 +1,17 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | /opt/gnunet/bin/gnunet-helper-vpn < ping > result 2>/dev/null & | ||
4 | |||
5 | PID=$! | ||
6 | |||
7 | sleep 1 | ||
8 | |||
9 | kill $PID | ||
10 | |||
11 | if cmp result expected; then | ||
12 | echo OK | ||
13 | exit 0 | ||
14 | else | ||
15 | echo FAILED: ICMP-Reply | ||
16 | exit 1 | ||
17 | fi | ||