aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/tests
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-01-22 13:38:52 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-01-23 14:29:44 +0100
commitc870c7af53f44a37814dfc76ceb8ad88e290fcd8 (patch)
tree82f0ceef7f1bb33d63774be97f432ed9b99d9ec3 /src/tests
parentcontrib: introduce simple highlighter library (diff)
downloadwireguard-monolithic-historical-c870c7af53f44a37814dfc76ceb8ad88e290fcd8.tar.xz
wireguard-monolithic-historical-c870c7af53f44a37814dfc76ceb8ad88e290fcd8.zip
netlink: use __kernel_timespec for handshake time
Diffstat (limited to '')
-rwxr-xr-xsrc/tests/netns.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tests/netns.sh b/src/tests/netns.sh
index 6ef61a5..46c30e5 100755
--- a/src/tests/netns.sh
+++ b/src/tests/netns.sh
@@ -142,7 +142,7 @@ big_mtu=$(( 34816 - 1500 + $orig_mtu ))
# Test using IPv4 as outer transport
n1 wg set wg0 peer "$pub2" endpoint 127.0.0.1:2
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
+# Before calling tests, we first make sure that the stats counters and timestamper are working
n2 ping -c 10 -f -W 1 192.168.241.1
{ 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) ))
@@ -152,6 +152,8 @@ read _ rx_bytes tx_bytes < <(n2 wg show wg0 transfer)
(( rx_bytes == 1372 && (tx_bytes == 1428 || tx_bytes == 1460) ))
read _ rx_bytes tx_bytes < <(n1 wg show wg0 transfer)
(( tx_bytes == 1372 && (rx_bytes == 1428 || rx_bytes == 1460) ))
+read _ timestamp < <(n1 wg show wg0 latest-handshakes)
+(( timestamp != 0 ))
tests
ip1 link set wg0 mtu $big_mtu