The "established conns survive new additions" tests occasionally fail
if the SA numbers climb above 9 due to reconciliation process or other
logic inside pluto.  This is because 10 ends up the first in the list.
Use natural (version) sorting, so the large values end up at the end
of the list where they belong.

Fixes: f1f214e5c3a2 ("ipsec: libreswan: Fix detection of loaded IPv6 
connections.")
Signed-off-by: Ilya Maximets <[email protected]>
---
 tests/system-ipsec.at | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/system-ipsec.at b/tests/system-ipsec.at
index b0c77a8e4..6aebe40ac 100644
--- a/tests/system-ipsec.at
+++ b/tests/system-ipsec.at
@@ -137,7 +137,7 @@ dnl
 dnl Get numbers of all the currently active SAs.
 m4_define([IPSEC_SA_LIST], [
     AT_CHECK([ipsec --rundir $ovs_base/$1 status > $2.status])
-    AT_CHECK([grep -oE '#[0-9]+:' $2.status | sort -u], [0], [stdout])
+    AT_CHECK([grep -oE '#[0-9]+:' $2.status | sort -uV], [0], [stdout])
     AT_CHECK([mv stdout $2])
 ])
 
-- 
2.52.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to