diff options
| author | Kristof Provost <kp@FreeBSD.org> | 2025-08-29 09:19:26 +0000 |
|---|---|---|
| committer | Kristof Provost <kp@FreeBSD.org> | 2025-09-03 10:10:21 +0000 |
| commit | 512d3c3a2c6391cee61ff41e3fe6304973346857 (patch) | |
| tree | 3500eeba5376b678a4fd83c57706d9a41ffb02ed | |
| parent | 245f2abf94889d3fd69360c4f49532074ff25fbf (diff) | |
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
| -rw-r--r-- | tests/sys/net/if_ovpn/if_ovpn.sh | 2 | ||||
| -rw-r--r-- | tests/sys/net/if_ovpn/utils.subr | 19 |
2 files changed, 21 insertions, 0 deletions
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` |
