Skip to contentSkip to conversation

t_client.sh: Check for fping/fping6 availability

PATCH NAK David Sommerseth 3 participants 4 messages Nov 15, 2013 – Nov 16, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 t_client.sh: Check for fping/fping6 availability

From: David Sommerseth <[email protected]...>

Check if fping and fping6 is available before running the real tests, to avoid misleading test failures.

---
 tests/t_client.sh.in | 12 ++++++++++++
 1 file changed, 12 insertions(+)
tests/t_client.sh.in +12 -0
index 189eecc..69278ee 100755
@@ -24,6 +24,18 @@ else
     exit 77
 fi
 
+# Check for external dependencies
+which fping > /dev/null
+if [ $? -ne 0 ]; then
+    echo "$0: fping is not available in \$PATH"
+    exit 77
+fi
+which fping6 > /dev/null
+if [ $? -ne 0 ]; then
+    echo "$0: fping6 is not available \$PATH"
+    exit 77
+fi
+
 if [ ! -x "${top_builddir}/src/openvpn/openvpn" ]
 then
     echo "no (executable) openvpn binary in current build tree. FAIL." >&2
Signature · 1 line
1.8.3.1
#1 lore raw

Am 15.11.2013 18:12, schrieb David Sommerseth:

Quoted 15 lines

From: David Sommerseth <[email protected]...>

Check if fping and fping6 is available before running the real tests, to avoid misleading test failures.

---
 tests/t_client.sh.in | 12 ++++++++++++
 1 file changed, 12 insertions(+)
tests/t_client.sh.in +0 -0
index 189eecc..69278ee 100755

tests/t_client.sh.in else · line 28

Quoted 5 lines
tests/t_client.sh.in +2 -0
@@ -24,6 +24,18 @@ else
     exit 77
 fi
 
+# Check for external dependencies
+which fping > /dev/null

...

NAK.
which is not a POSIX command,
so you may introduce false skips here.

#2 lore raw

Hi,

Quoted 7 lines · Matthias Andree

tests/t_client.sh.in else · line 28

Quoted 2 lines
tests/t_client.sh.in +2 -0
+# Check for external dependencies
+which fping > /dev/null

...

NAK.
which is not a POSIX command,
so you may introduce false skips here.

Which platform is it missing? My spot check found it on all BSDs, MacOS X, OpenSolaris and Linux (Gentoo, CentOS and Debian), and that's pretty much everything where we expect this to run.

It might be missing on "Oracle Solaris", but I'm not sure how much relevance this has a test/development platform for us, as none of the active developers has a Solaris machine that is turned on most of the time... (I do tests on OpenSolaris, but my old Solaris/Sparc64 systems are off most of the time).

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#3 lore raw
In reply to David Sommerseth

ACK.

Your patch has been applied to the master branch.

commit f0892e6590cb247ef1012b0fe89f80eee2d56cc4 (master)

Author: David Sommerseth
Date:   Fri Nov 15 18:12:04 2013 +0100
     t_client.sh: Check for fping/fping6 availability

     Signed-off-by: David Sommerseth <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: http://article.gmane.org/gmane.network.openvpn.devel/7981
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering