[Openvpn-devel] t_client.sh: do not require fping6
Commit Message
fping and fping6 were merged in version 4.0,
released in 2017. Many recent distributions do
not include the compatibility symlink anymore.
So if we find fping but not fping6 do not error
out but assume that fping is capable of IPv6.
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
---
tests/t_client.sh.in | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
Comments
Hi,
On 22/08/2022 16:18, Frank Lichtenheld wrote:
> fping and fping6 were merged in version 4.0,
> released in 2017. Many recent distributions do
> not include the compatibility symlink anymore.
>
> So if we find fping but not fping6 do not error
> out but assume that fping is capable of IPv6.
>
> Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Quickly checked the behaviour of fping on gentoo (fping v5.0) and I can
confirm what Frank said.
Also, on GH it is possible to read when the merge happened:
https://github.com/schweikert/fping/releases/tag/v4.0
Acked-by: Antonio Quartulli <a@unstable.cc>
On Mon, Aug 22, 2022 at 04:18:06PM +0200, Frank Lichtenheld wrote:
> fping and fping6 were merged in version 4.0,
> released in 2017. Many recent distributions do
> not include the compatibility symlink anymore.
>
> So if we find fping but not fping6 do not error
> out but assume that fping is capable of IPv6.
>
> Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
> ---
> tests/t_client.sh.in | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
Note: I think it would be good to apply this to release/2.5 as well
since that would allow us to remove the existing work-arounds from
the worker setup scripts.
There is a trivial conflict due to the TCLIENT_SKIP_RC change. If you
prefer a separate patch, let me know.
Regards,
Thanks for working on that ancient script :-) - so far I mostly just
fixed the buildslaves by adding wrapper scripts, but of course this
is nicer.
I have not actually *tested* this yet, but the change looks reasonable,
and the buildbots will tell us soon enough...
To avoid the conflict when pulling up to release/2.5, I've just
applied the "Allow to force FAIL on prerequisite fails" (79932b94)
to 2.5 as well... since we do want good testing for 2.5, that one
is useful, too.
Your patch has been applied to the master and release/2.5 branch.
commit fb06c9f026a78b879f264ab8e67de09d725b5540 (master)
commit 64cac790b9d64b3c07fa5222bf46754a04ea1659 (release/2.5)
Author: Frank Lichtenheld
Date: Mon Aug 22 16:18:06 2022 +0200
t_client.sh: do not require fping6
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Antonio Quartulli <a@unstable.cc>
Message-Id: <20220822141806.39406-1-frank@lichtenheld.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25058.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
@@ -9,7 +9,7 @@
# - writable current directory to create subdir for logs
# - t_client.rc in current directory OR source dir that specifies tests
# - for "ping4" checks: fping binary in $PATH
-# - for "ping6" checks: fping6 binary in $PATH
+# - for "ping6" checks: fping (4.0+) or fping6 binary in $PATH
#
# by changing this to 1 we can force automated builds to fail
@@ -29,6 +29,8 @@ else
fi
# Check for external dependencies
+FPING="fping"
+FPING6="fping6"
which fping > /dev/null
if [ $? -ne 0 ]; then
echo "$0: fping is not available in \$PATH" >&2
@@ -36,8 +38,9 @@ if [ $? -ne 0 ]; then
fi
which fping6 > /dev/null
if [ $? -ne 0 ]; then
- echo "$0: fping6 is not available in \$PATH" >&2
- exit "${TCLIENT_SKIP_RC}"
+ echo "$0: fping6 is not available in \$PATH, assuming fping 4.0 or later" >&2
+ FPING="fping -4"
+ FPING6="fping -6"
fi
KILL_EXEC=`which kill`
@@ -220,8 +223,8 @@ run_ping_tests()
if [ -z "$targetlist" ] ; then return ; fi
case $proto in
- 4) cmd=fping ;;
- 6) cmd=fping6 ;;
+ 4) cmd="$FPING" ;;
+ 6) cmd="$FPING6" ;;
*) echo "internal error in run_ping_tests arg 1: '$proto'" >&2
exit 1 ;;
esac