[ovs-dev] [PATCH 1/3] system-userspace-macros: Check the exit code of ethtool.

Daniele Di Proietto diproiettod at vmware.com
Fri Aug 5 01:40:57 UTC 2016


If the ethtool command is not available on the system we should fail,
since the userspace testsuite cannot work properly without disabling
offloads.

Also, add ethtool to the list of installed packages on Vagrantfile.

Fixes: ddcf96d2dcc1 ("system-tests: Disable offloads in userspace tests.")
Reported-by: Joe Stringer <joe at ovn.org>
Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
---
 Vagrantfile                      | 2 +-
 tests/system-userspace-macros.at | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Vagrantfile b/Vagrantfile
index fb06b42..843d88c 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -11,7 +11,7 @@ dnf -y install autoconf automake openssl-devel libtool \
                python-twisted-core python-zope-interface \
                desktop-file-utils groff graphviz rpmdevtools nc \
                wget python-six pyftpdlib checkpolicy selinux-policy-devel \
-               libcap-ng-devel kernel-devel-`uname -r`
+               libcap-ng-devel kernel-devel-`uname -r` ethtool
 echo "search extra update built-in" >/etc/depmod.d/search_path.conf
 cd /vagrant
 ./boot.sh
diff --git a/tests/system-userspace-macros.at b/tests/system-userspace-macros.at
index 213425f..7e10b6c 100644
--- a/tests/system-userspace-macros.at
+++ b/tests/system-userspace-macros.at
@@ -55,7 +55,7 @@ m4_define([OVS_TRAFFIC_VSWITCHD_STOP],
 # This is a workaround, and should be removed when offloads are properly
 # supported in netdev-linux.
 m4_define([CONFIGURE_VETH_OFFLOADS],
-    [ethtool -K $1 tx off]
+    [AT_CHECK([ethtool -K $1 tx off], [0], [ignore])]
 )
 
 # CHECK_CONNTRACK()
-- 
2.8.1




More information about the dev mailing list