Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Sep 2025 10:10:42 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 512d3c3a2c63 - main - if_ovpn tests: skip float and linklocal test on < 2.7
Message-ID:  <202509031010.583AAgDQ006727@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=512d3c3a2c6391cee61ff41e3fe6304973346857

commit 512d3c3a2c6391cee61ff41e3fe6304973346857
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2025-08-29 09:19:26 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2025-09-03 10:10:21 +0000

    if_ovpn tests: skip float and linklocal test on < 2.7
    
    Earlier versions (than 2.7.0) do not support float notifications or link-local
    addresses. Skip the relevant tests there.
    
    PR:             289150
    MFC after:      1 week
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    Differential Revision:  https://reviews.freebsd.org/D52234
---
 tests/sys/net/if_ovpn/if_ovpn.sh |  2 ++
 tests/sys/net/if_ovpn/utils.subr | 19 +++++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/tests/sys/net/if_ovpn/if_ovpn.sh b/tests/sys/net/if_ovpn/if_ovpn.sh
index 0281e7fc273d..9dafce2242d8 100644
--- a/tests/sys/net/if_ovpn/if_ovpn.sh
+++ b/tests/sys/net/if_ovpn/if_ovpn.sh
@@ -510,6 +510,7 @@ linklocal_head()
 linklocal_body()
 {
 	ovpn_init
+	ovpn_check_version 2.7.0
 
 	l=$(vnet_mkepair)
 
@@ -1399,6 +1400,7 @@ float_head()
 float_body()
 {
 	ovpn_init
+	ovpn_check_version 2.7.0
 
 	l=$(vnet_mkepair)
 
diff --git a/tests/sys/net/if_ovpn/utils.subr b/tests/sys/net/if_ovpn/utils.subr
index 0da35119b2bf..fbe7dc98630a 100644
--- a/tests/sys/net/if_ovpn/utils.subr
+++ b/tests/sys/net/if_ovpn/utils.subr
@@ -40,6 +40,25 @@ ovpn_init()
 	fi
 }
 
+ovpn_check_version()
+{
+	expected=$1
+
+	expected_minor=$(echo $expected |
+	    awk '{ split($1, ver, "\."); print(ver[2]); }')
+	actual_minor=$(openvpn --version 2>&1 |
+	    awk 'NR == 1 \
+	    { \
+	        split($2, ver, "\."); \
+	        split(ver[2], minor, "_"); \
+	        print(minor[1]); \
+	    }')
+
+	if [ ${actual_minor} -lt ${expected_minor} ]; then
+		atf_skip "OpenVPN version < ${expected}"
+	fi
+}
+
 ovpn_cleanup()
 {
 	for jail in `cat ovpn_jails.lst | sort -u`



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202509031010.583AAgDQ006727>