[Swan-dev] testing: removed 25% packet loss

Andrew Cagney andrew.cagney at gmail.com
Sat Apr 24 15:18:40 UTC 2021


FYI,

I've cleaned up the tests that were relying on ping where:

- packet 1 triggering OE
- packet 2 flowing because OE finished in under a second

For instance:

 east #
- # trigger OE
 east #
- ping -n -q -c 4 -I 192.1.2.23 192.1.3.209
-PING 192.1.3.209 (192.1.3.209) from 192.1.2.23 : 56(84) bytes of data.
---- 192.1.3.209 ping statistics ---
-4 packets transmitted, 3 received, 25% packet loss, time XXXX
-rtt min/avg/max/mdev = 0.XXX/0.XXX/0.XXX/0.XXX ms

If you were lucky, they worked.  But the odds were not in your favour.
Instead the code uses wait-for.sh to keep things in sync with pluto vis:

+ ../../guestbin/ping-once.sh --forget -I 192.1.2.23 192.1.3.209
+fired and forgotten
 east #
+ ../../guestbin/wait-for.sh --match private-or-clear -- ipsec trafficstatus
+006 #2: "private-or-clear#192.1.3.0/24"[1] ...192.1.3.209, type=ESP,
add_time=1234567890, inBytes=0, outBytes=0, ...
 east #
+ ../../guestbin/ping-once.sh --up -I 192.1.2.23 192.1.3.209
+up
+east #
  ipsec trafficstatus
 006 #2: "private-or-clear#192.1.3.0/24"[1] ...192.1.3.209, type=ESP,
add_time=1234567890, inBytes=84, outBytes=84, ...

when adding new tests please don't use the old method.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libreswan.org/pipermail/swan-dev/attachments/20210424/9fd462fa/attachment.html>


More information about the Swan-dev mailing list