aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/tests/netns.sh
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-23 18:12:43 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-09-23 18:50:45 +0200
commit193c75255729b0a9b0ef91b9c86de3823b4352e2 (patch)
tree8e3f47400ee9bdc6119d23724af0bf7f442492d8 /src/tests/netns.sh
parentchacha20-arm: switch to entirely Andy Polyakov's implementation (diff)
downloadwireguard-monolithic-historical-193c75255729b0a9b0ef91b9c86de3823b4352e2.tar.xz
wireguard-monolithic-historical-193c75255729b0a9b0ef91b9c86de3823b4352e2.zip
Real life sort of benchmarkjd/andy-is-best-maybe
Diffstat (limited to 'src/tests/netns.sh')
-rwxr-xr-xsrc/tests/netns.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tests/netns.sh b/src/tests/netns.sh
index 568612c..7ba498b 100755
--- a/src/tests/netns.sh
+++ b/src/tests/netns.sh
@@ -140,10 +140,11 @@ tests() {
big_mtu=$(( 34816 - 1500 + $orig_mtu ))
# Test using IPv4 as outer transport
-n1 wg set wg0 peer "$pub2" endpoint 127.0.0.1:2
+n1 wg set wg0 peer "$pub2" endpoint 127.0.0.1:2 persistent-keepalive 5
n2 wg set wg0 peer "$pub1" endpoint 127.0.0.1:1
-# Before calling tests, we first make sure that the stats counters are working
-n2 ping -c 10 -f -W 1 192.168.241.1
+n2 ncat -u 192.168.241.1 1234 < /dev/zero
+
+
{ read _; read _; read _; read rx_bytes _; read _; read tx_bytes _; } < <(ip2 -stats link show dev wg0)
(( rx_bytes == 1372 && (tx_bytes == 1428 || tx_bytes == 1460) ))
{ read _; read _; read _; read rx_bytes _; read _; read tx_bytes _; } < <(ip1 -stats link show dev wg0)