[PATCH] Netperf: add option udp_size This option set UDP datagram size for netperf test on client. If this option is not explicitly specified, default value from netperf is used.
by Kamil Jerabek
The option accepts integer value describing datagram size, it should be also concatenated with G/M/K/g/m/k.
In this commit I also added this option to regression_test: simple_netperf test.
---
recipes/regression_tests/phase1/simple_netperf.py | 10 ++++++++--
test_modules/Netperf.py | 11 +++++++++++
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/recipes/regression_tests/phase1/simple_netperf.py b/recipes/regression_tests/phase1/simple_netperf.py
index fe9d96b..d68d10c 100644
--- a/recipes/regression_tests/phase1/simple_netperf.py
+++ b/recipes/regression_tests/phase1/simple_netperf.py
@@ -43,6 +43,7 @@ nperf_mode = ctl.get_alias("nperf_mode")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
nperf_debug = ctl.get_alias("nperf_debug")
nperf_max_dev = ctl.get_alias("nperf_max_dev")
+nperf_udp_size = ctl.get_alias("nperf_udp_size")
pr_user_comment = ctl.get_alias("perfrepo_comment")
pr_comment = generate_perfrepo_comment([m1, m2], pr_user_comment)
@@ -107,7 +108,8 @@ netperf_cli_udp = ctl.get_module("Netperf",
"runs" : nperf_max_runs,
"netperf_opts" : p_opts,
"debug" : nperf_debug,
- "max_deviation" : nperf_max_dev
+ "max_deviation" : nperf_max_dev,
+ "udp_size" : nperf_udp_size
})
netperf_cli_udp6 = ctl.get_module("Netperf",
@@ -121,7 +123,8 @@ netperf_cli_udp6 = ctl.get_module("Netperf",
"runs" : nperf_max_runs,
"netperf_opts" : p_opts6,
"debug" : nperf_debug,
- "max_deviation" : nperf_max_dev
+ "max_deviation" : nperf_max_dev,
+ "udp_size" : nperf_udp_size
})
netperf_srv = ctl.get_module("Netperf",
@@ -198,6 +201,9 @@ for setting in offload_settings:
for offload in setting:
result_udp.set_parameter(offload[0], offload[1])
+ if nperf_udp_size is not None:
+ result_udp.set_parameter("nperf_udp_size", nperf_udp_size)
+
result_udp.add_tag(product_name)
if nperf_mode == "multi":
result_udp.add_tag("multithreaded")
diff --git a/test_modules/Netperf.py b/test_modules/Netperf.py
index d09bdfc..e6c68ad 100644
--- a/test_modules/Netperf.py
+++ b/test_modules/Netperf.py
@@ -39,6 +39,7 @@ class Netperf(TestGeneric):
self._cpu_util = self.get_opt("cpu_util")
self._num_parallel = int(self.get_opt("num_parallel", default=1))
self._runs = self.get_opt("runs", default=1)
+ self._udp_size = self.get_opt("udp_size")
self._debug = int_it(self.get_opt("debug", default=0))
self._threshold = self._parse_threshold(self.get_opt("threshold"))
@@ -141,6 +142,16 @@ class Netperf(TestGeneric):
else:
cmd += " -- %s" % self._testoptions
+ if self._udp_size is not None:
+ """
+ udp packets will have this size
+ """
+ if self._is_omni() or self._testoptions:
+ cmd += " -m %s" % self._udp_size
+ else:
+ cms += " -- -m %s" % self._udp_size
+
+
elif self._role == "server":
cmd = "netserver -D"
if self._bind is not None:
--
2.5.5
7 years, 9 months
[patch lnst v2 1/2] Slave: add devlink port info gathering and expose it to controller
by Jiri Pirko
From: Jiri Pirko <jiri(a)mellanox.com>
Use pyroute2 to get list of devlink ports.
Signed-off-by: Jiri Pirko <jiri(a)mellanox.com>
---
v1->v2:
- Fixed self._devices loop
- Added devlink info update to handle_netlink_msgs
---
lnst/Slave/DevlinkManager.py | 63 ++++++++++++++++++++++++++++++++++++++++++
lnst/Slave/InterfaceManager.py | 20 +++++++++++++-
2 files changed, 82 insertions(+), 1 deletion(-)
create mode 100644 lnst/Slave/DevlinkManager.py
diff --git a/lnst/Slave/DevlinkManager.py b/lnst/Slave/DevlinkManager.py
new file mode 100644
index 0000000..13662bc
--- /dev/null
+++ b/lnst/Slave/DevlinkManager.py
@@ -0,0 +1,63 @@
+"""
+This module defines the DevlinkManager class that contains a database of
+the available devlink devices, handles netlink messages updating these devices.
+
+Copyright 2016 Mellanox Technologies. All rights reserved.
+Licensed under the GNU General Public License, version 2 as
+published by the Free Software Foundation; see COPYING for details.
+"""
+
+__author__ = """
+jiri(a)mellanox.com (Jiri Pirko)
+"""
+
+try:
+ from pyroute2 import DL
+ from pyroute2.netlink.exceptions import NetlinkError
+
+ def dl_open():
+ try:
+ return DL()
+ except NetlinkError:
+ return None
+
+except ImportError:
+ class DL(object):
+ def port_list(self):
+ return []
+
+ def close(self):
+ return
+
+ def dl_open():
+ return DL()
+
+class DevlinkManager(object):
+ def __init__(self):
+ self.rescan_ports()
+
+ def rescan_ports(self):
+ self._ports = []
+
+ dl = dl_open()
+ if not dl:
+ return
+
+ try:
+ for q in dl.port_list():
+ dl_port = {}
+ dl_port["bus_name"] = q.get_attr('DEVLINK_ATTR_BUS_NAME')
+ dl_port["dev_name"] = q.get_attr('DEVLINK_ATTR_DEV_NAME')
+ dl_port["port_index"] = q.get_attr('DEVLINK_ATTR_PORT_INDEX')
+ dl_port["port_netdev_name"] = q.get_attr('DEVLINK_ATTR_PORT_NETDEV_NAME')
+ self._ports.append(dl_port)
+ except:
+ raise
+ finally:
+ dl.close()
+
+ def get_port(self, ifname):
+ for dl_port in self._ports:
+ if dl_port["port_netdev_name"] == ifname:
+ return dl_port
+ return None
diff --git a/lnst/Slave/InterfaceManager.py b/lnst/Slave/InterfaceManager.py
index 5852254..4fb0919 100644
--- a/lnst/Slave/InterfaceManager.py
+++ b/lnst/Slave/InterfaceManager.py
@@ -21,6 +21,7 @@ from lnst.Common.NetUtils import normalize_hwaddr
from lnst.Common.NetUtils import scan_netdevs
from lnst.Common.ExecCmd import exec_cmd
from lnst.Common.ConnectionHandler import recv_data
+from lnst.Slave.DevlinkManager import DevlinkManager
from pyroute2 import IPRSocket
from pyroute2.netlink.rtnl import RTNLGRP_IPV4_IFADDR
from pyroute2.netlink.rtnl import RTNLGRP_IPV6_IFADDR
@@ -50,6 +51,8 @@ class InterfaceManager(object):
self._nl_socket = IPRSocket()
self._nl_socket.bind(groups=NL_GROUPS)
+ self._dl_manager = DevlinkManager()
+
self.rescan_devices()
self._server_handler = server_handler
@@ -129,9 +132,19 @@ class InterfaceManager(object):
self._server_handler.send_data_to_ctl(del_msg)
del self._devices[i]
+ self._dl_manager.rescan_ports()
+ for device in self._devices.values():
+ dl_port = self._dl_manager.get_port(device.get_name())
+ device.set_devlink(dl_port)
+
def handle_netlink_msgs(self, msgs):
for msg in msgs:
self._handle_netlink_msg(msg)
+
+ self._dl_manager.rescan_ports()
+ for device in self._devices.values():
+ dl_port = self._dl_manager.get_port(device.get_name())
+ device.set_devlink(dl_port)
def _handle_netlink_msg(self, msg):
if msg['header']['type'] in [RTM_NEWLINK, RTM_NEWADDR, RTM_DELADDR]:
@@ -354,9 +367,13 @@ class Device(object):
self._peer = None
self._mtu = None
self._driver = None
+ self._devlink = None
self._if_manager = if_manager
+ def set_devlink(self, devlink_port_data):
+ self._devlink = devlink_port_data
+
def init_netlink(self, nl_msg):
self._if_index = nl_msg['index']
self._ifi_type = nl_msg['ifi_type']
@@ -672,7 +689,8 @@ class Device(object):
"netns": self._netns,
"peer": self._peer.get_if_index() if self._peer else None,
"mtu": self._mtu,
- "driver": self._driver}
+ "driver": self._driver,
+ "devlink": self._devlink}
return if_data
def set_speed(self, speed):
--
2.5.5
7 years, 9 months
[PATCH] Config: replace subprocess.check_output with python2.6 compatible equivalent
by Jiri Prochazka
Method check_output used for getting hash of HEAD in git repo was
introduced in Python2.7 and it does not work for Python2.6 which is
default Python version for RHEL6.x.
This patch replaces method check_output with Popen which is available in
both 2.6 and 2.7.
Fixes #174
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
lnst/Common/Config.py | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/lnst/Common/Config.py b/lnst/Common/Config.py
index 5362da1..29c2f16 100644
--- a/lnst/Common/Config.py
+++ b/lnst/Common/Config.py
@@ -34,19 +34,20 @@ class Config():
def _get_version(self):
# Check if I'm in git
- try:
- cwd = os.getcwd()
- abspath = os.path.abspath(__file__)
- dname = os.path.dirname(abspath)
- os.chdir(dname)
- with open(os.devnull, 'w') as null:
- head = subprocess.check_output(['git', 'rev-parse', 'HEAD'],
- stderr=null).strip()
- return head
- except subprocess.CalledProcessError:
- return LNSTMajorVersion
- finally:
- os.chdir(cwd)
+ cwd = os.getcwd()
+ abspath = os.path.abspath(__file__)
+ dname = os.path.dirname(abspath)
+ os.chdir(dname)
+ with open(os.devnull, 'w') as null:
+ proc = subprocess.Popen(['git', 'rev-parse', 'HEAD'],
+ stdout=subprocess.PIPE,
+ stderr=null).communicate()
+ if proc[0] != '':
+ version = proc[0].strip()
+ else:
+ version = LNSTMajorVersion
+ os.chdir(cwd)
+ return version
def controller_init(self):
self._options['environment'] = dict()
--
2.4.11
7 years, 9 months
[PATCH v2] Config: replace subprocess.check_output with python2.6 compatible equivalent
by Jiri Prochazka
Method check_output used for getting hash of HEAD in git repo was
introduced in Python2.7 and it does not work for Python2.6 which is
default Python version for RHEL6.x.
This patch replaces method check_output with Popen which is available in
both 2.6 and 2.7.
Fixes #174
---
changes in v2:
prettier code
---
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
lnst/Common/Config.py | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/lnst/Common/Config.py b/lnst/Common/Config.py
index 5362da1..e20e566 100644
--- a/lnst/Common/Config.py
+++ b/lnst/Common/Config.py
@@ -34,19 +34,22 @@ class Config():
def _get_version(self):
# Check if I'm in git
- try:
- cwd = os.getcwd()
- abspath = os.path.abspath(__file__)
- dname = os.path.dirname(abspath)
- os.chdir(dname)
- with open(os.devnull, 'w') as null:
- head = subprocess.check_output(['git', 'rev-parse', 'HEAD'],
- stderr=null).strip()
- return head
- except subprocess.CalledProcessError:
- return LNSTMajorVersion
- finally:
- os.chdir(cwd)
+ cwd = os.getcwd()
+ abspath = os.path.abspath(__file__)
+ dname = os.path.dirname(abspath)
+ os.chdir(dname)
+ with open(os.devnull, 'w') as null:
+ cmd = ['git', 'rev-parse', 'HEAD']
+ proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=null)
+ data = proc.communicate()
+ # git command passed
+ if data[0] != '':
+ version = data[0].strip()
+ # git command failed
+ else:
+ version = LNSTMajorVersion
+ os.chdir(cwd)
+ return version
def controller_init(self):
self._options['environment'] = dict()
--
2.4.11
7 years, 9 months
[PATCH] regression_tests: phase3: add machine_type param to virt tests
by Ondrej Lichtner
From: Ondrej Lichtner <olichtne(a)redhat.com>
Adding the machine_type=baremetal parameter to the recipes that involve
virt machines just in case we see the same issues as with previous phase
recipes that were matching to wrong machines.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
recipes/regression_tests/phase3/2_virt_ovs_vxlan.xml | 6 ++++++
recipes/regression_tests/phase3/vxlan_multicast.xml | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/recipes/regression_tests/phase3/2_virt_ovs_vxlan.xml b/recipes/regression_tests/phase3/2_virt_ovs_vxlan.xml
index e2e7ee7..009d648 100644
--- a/recipes/regression_tests/phase3/2_virt_ovs_vxlan.xml
+++ b/recipes/regression_tests/phase3/2_virt_ovs_vxlan.xml
@@ -16,6 +16,9 @@
</define>
<network>
<host id="h1">
+ <params>
+ <param name="machine_type" value="baremetal"/>
+ </params>
<interfaces>
<eth id="if1" label="n1">
<addresses>
@@ -75,6 +78,9 @@
</interfaces>
</host>
<host id="h2">
+ <params>
+ <param name="machine_type" value="baremetal"/>
+ </params>
<interfaces>
<eth id="if1" label="n1">
<addresses>
diff --git a/recipes/regression_tests/phase3/vxlan_multicast.xml b/recipes/regression_tests/phase3/vxlan_multicast.xml
index 38b150f..734c854 100644
--- a/recipes/regression_tests/phase3/vxlan_multicast.xml
+++ b/recipes/regression_tests/phase3/vxlan_multicast.xml
@@ -16,6 +16,9 @@
</define>
<network>
<host id="testmachine1">
+ <params>
+ <param name="machine_type" value="baremetal"/>
+ </params>
<interfaces>
<eth id="eth1" label="tnet"/>
<eth id="tap1" label="to_guest1"/>
@@ -66,6 +69,9 @@
</interfaces>
</host>
<host id="testmachine2">
+ <params>
+ <param name="machine_type" value="baremetal"/>
+ </params>
<interfaces>
<eth id="eth1" label="tnet">
<addresses>
--
2.9.0
7 years, 9 months
[patch lnst 1/2] Slave: add devlink port info gathering and expose it to controller
by Jiri Pirko
From: Jiri Pirko <jiri(a)mellanox.com>
Use pyroute2 to get list of devlink ports.
Signed-off-by: Jiri Pirko <jiri(a)mellanox.com>
---
lnst/Slave/DevlinkManager.py | 63 ++++++++++++++++++++++++++++++++++++++++++
lnst/Slave/InterfaceManager.py | 16 ++++++++++-
2 files changed, 78 insertions(+), 1 deletion(-)
create mode 100644 lnst/Slave/DevlinkManager.py
diff --git a/lnst/Slave/DevlinkManager.py b/lnst/Slave/DevlinkManager.py
new file mode 100644
index 0000000..13662bc
--- /dev/null
+++ b/lnst/Slave/DevlinkManager.py
@@ -0,0 +1,63 @@
+"""
+This module defines the DevlinkManager class that contains a database of
+the available devlink devices, handles netlink messages updating these devices.
+
+Copyright 2016 Mellanox Technologies. All rights reserved.
+Licensed under the GNU General Public License, version 2 as
+published by the Free Software Foundation; see COPYING for details.
+"""
+
+__author__ = """
+jiri(a)mellanox.com (Jiri Pirko)
+"""
+
+try:
+ from pyroute2 import DL
+ from pyroute2.netlink.exceptions import NetlinkError
+
+ def dl_open():
+ try:
+ return DL()
+ except NetlinkError:
+ return None
+
+except ImportError:
+ class DL(object):
+ def port_list(self):
+ return []
+
+ def close(self):
+ return
+
+ def dl_open():
+ return DL()
+
+class DevlinkManager(object):
+ def __init__(self):
+ self.rescan_ports()
+
+ def rescan_ports(self):
+ self._ports = []
+
+ dl = dl_open()
+ if not dl:
+ return
+
+ try:
+ for q in dl.port_list():
+ dl_port = {}
+ dl_port["bus_name"] = q.get_attr('DEVLINK_ATTR_BUS_NAME')
+ dl_port["dev_name"] = q.get_attr('DEVLINK_ATTR_DEV_NAME')
+ dl_port["port_index"] = q.get_attr('DEVLINK_ATTR_PORT_INDEX')
+ dl_port["port_netdev_name"] = q.get_attr('DEVLINK_ATTR_PORT_NETDEV_NAME')
+ self._ports.append(dl_port)
+ except:
+ raise
+ finally:
+ dl.close()
+
+ def get_port(self, ifname):
+ for dl_port in self._ports:
+ if dl_port["port_netdev_name"] == ifname:
+ return dl_port
+ return None
diff --git a/lnst/Slave/InterfaceManager.py b/lnst/Slave/InterfaceManager.py
index 5852254..d3e903b 100644
--- a/lnst/Slave/InterfaceManager.py
+++ b/lnst/Slave/InterfaceManager.py
@@ -21,6 +21,7 @@ from lnst.Common.NetUtils import normalize_hwaddr
from lnst.Common.NetUtils import scan_netdevs
from lnst.Common.ExecCmd import exec_cmd
from lnst.Common.ConnectionHandler import recv_data
+from lnst.Slave.DevlinkManager import DevlinkManager
from pyroute2 import IPRSocket
from pyroute2.netlink.rtnl import RTNLGRP_IPV4_IFADDR
from pyroute2.netlink.rtnl import RTNLGRP_IPV6_IFADDR
@@ -50,6 +51,8 @@ class InterfaceManager(object):
self._nl_socket = IPRSocket()
self._nl_socket.bind(groups=NL_GROUPS)
+ self._dl_manager = DevlinkManager()
+
self.rescan_devices()
self._server_handler = server_handler
@@ -129,6 +132,12 @@ class InterfaceManager(object):
self._server_handler.send_data_to_ctl(del_msg)
del self._devices[i]
+ self._dl_manager.rescan_ports()
+ for key in self._devices:
+ device = self._devices[key]
+ dl_port = self._dl_manager.get_port(device.get_name())
+ device.set_devlink(dl_port)
+
def handle_netlink_msgs(self, msgs):
for msg in msgs:
self._handle_netlink_msg(msg)
@@ -354,9 +363,13 @@ class Device(object):
self._peer = None
self._mtu = None
self._driver = None
+ self._devlink = None
self._if_manager = if_manager
+ def set_devlink(self, devlink_port_data):
+ self._devlink = devlink_port_data
+
def init_netlink(self, nl_msg):
self._if_index = nl_msg['index']
self._ifi_type = nl_msg['ifi_type']
@@ -672,7 +685,8 @@ class Device(object):
"netns": self._netns,
"peer": self._peer.get_if_index() if self._peer else None,
"mtu": self._mtu,
- "driver": self._driver}
+ "driver": self._driver,
+ "devlink": self._devlink}
return if_data
def set_speed(self, speed):
--
2.5.5
7 years, 9 months
[PATCH] recipes: update virtual_bridge_2_vlans_over_bond test
by Jiri Prochazka
offload setting gro on gso on tso on tx on rx off was missing,
this patch adds it
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
.../phase1/virtual_bridge_2_vlans_over_bond.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
index e2a9449..59a2dad 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
+++ b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
@@ -32,11 +32,12 @@ g4.sync_resources(modules=["IcmpPing", "Icmp6Ping", "Netperf"])
# TESTS
# ------
-offloads = ["gro", "gso", "tso", "tx"]
-offload_settings = [ [("gro", "on"), ("gso", "on"), ("tso", "on"), ("tx", "on")],
- [("gro", "off"), ("gso", "on"), ("tso", "on"), ("tx", "on")],
- [("gro", "on"), ("gso", "off"), ("tso", "off"), ("tx", "on")],
- [("gro", "on"), ("gso", "on"), ("tso", "off"), ("tx", "off")]]
+offloads = ["gro", "gso", "tso", "tx", "rx"]
+offload_settings = [ [("gro", "on"), ("gso", "on"), ("tso", "on"), ("tx", "on"), ("rx", "on")],
+ [("gro", "off"), ("gso", "on"), ("tso", "on"), ("tx", "on"), ("rx", "on")],
+ [("gro", "on"), ("gso", "off"), ("tso", "off"), ("tx", "on"), ("rx", "on")],
+ [("gro", "on"), ("gso", "on"), ("tso", "off"), ("tx", "off"), ("rx", "on")],
+ [("gro", "on"), ("gso", "on"), ("tso", "on"), ("tx", "on"), ("rx", "off")]]
ipv = ctl.get_alias("ipv")
netperf_duration = int(ctl.get_alias("netperf_duration"))
--
2.4.11
7 years, 9 months
[PATCH v2 0/7] fixing phase3, extending Netperf and some Version bugfixes
by Ondrej Lichtner
From: Ondrej Lichtner <olichtne(a)redhat.com>
I still forgot some stuff in the "fix hash related errors" commit so I'm
sending a v2.
The extension to Netperf (and the modifications to regression_tests recipes)
was confirmed to be working in beaker jobs, so this can definitely be pushed.
And during testing I've also found a two issues with the new feature of
checking versions. I've added the fixes to this patchset.
Ondrej Lichtner (7):
regression_tests: vxlan_multicast: fix name of mapping file
regression_tests: phase3: fix hash related errors
Netperf: add option max_deviation
Netperf: check errors before the measured results
regression_tests: add max_deviation to netperf tests
Common: create Version.py
Config: redirect git stderr to /dev/null
lnst/Common/Config.py | 7 ++-
lnst/Common/Version.py | 14 +++++
recipes/regression_tests/phase1/3_vlans.py | 13 +++--
recipes/regression_tests/phase1/3_vlans.xml | 1 +
.../phase1/3_vlans_over_active_backup_bond.xml | 1 +
.../regression_tests/phase1/3_vlans_over_bond.py | 13 +++--
.../phase1/3_vlans_over_round_robin_bond.xml | 1 +
.../regression_tests/phase1/active_backup_bond.xml | 1 +
.../phase1/active_backup_double_bond.xml | 1 +
recipes/regression_tests/phase1/bonding_test.py | 13 +++--
.../regression_tests/phase1/round_robin_bond.xml | 1 +
.../phase1/round_robin_double_bond.xml | 1 +
recipes/regression_tests/phase1/simple_netperf.py | 13 +++--
recipes/regression_tests/phase1/simple_netperf.xml | 1 +
...tual_bridge_2_vlans_over_active_backup_bond.xml | 1 +
.../phase1/virtual_bridge_2_vlans_over_bond.py | 13 +++--
.../phase1/virtual_bridge_vlan_in_guest.py | 13 +++--
.../phase1/virtual_bridge_vlan_in_guest.xml | 1 +
.../phase1/virtual_bridge_vlan_in_host.py | 13 +++--
.../phase1/virtual_bridge_vlan_in_host.xml | 1 +
.../phase2/3_vlans_over_active_backup_team.xml | 1 +
.../phase2/3_vlans_over_round_robin_team.xml | 1 +
.../regression_tests/phase2/3_vlans_over_team.py | 13 +++--
.../phase2/active_backup_double_team.xml | 1 +
.../regression_tests/phase2/active_backup_team.xml | 1 +
.../active_backup_team_vs_active_backup_bond.xml | 1 +
.../active_backup_team_vs_round_robin_bond.xml | 1 +
.../phase2/round_robin_double_team.xml | 1 +
.../regression_tests/phase2/round_robin_team.xml | 1 +
.../round_robin_team_vs_active_backup_bond.xml | 1 +
.../round_robin_team_vs_round_robin_bond.xml | 1 +
recipes/regression_tests/phase2/team_test.py | 13 +++--
...l_ovs_bridge_2_vlans_over_active_backup_bond.py | 13 +++--
..._ovs_bridge_2_vlans_over_active_backup_bond.xml | 1 +
.../phase2/virtual_ovs_bridge_vlan_in_guest.py | 13 +++--
.../phase2/virtual_ovs_bridge_vlan_in_guest.xml | 1 +
.../phase2/virtual_ovs_bridge_vlan_in_host.py | 13 +++--
.../phase2/virtual_ovs_bridge_vlan_in_host.xml | 1 +
.../regression_tests/phase3/2_virt_ovs_vxlan.py | 49 ++++++++++++----
.../regression_tests/phase3/2_virt_ovs_vxlan.xml | 17 +++---
.../regression_tests/phase3/novirt_ovs_vxlan.py | 25 +++++---
.../regression_tests/phase3/novirt_ovs_vxlan.xml | 1 +
recipes/regression_tests/phase3/vxlan_multicast.py | 39 ++++++++++---
.../regression_tests/phase3/vxlan_multicast.xml | 7 ++-
recipes/regression_tests/phase3/vxlan_remote.py | 25 +++++---
recipes/regression_tests/phase3/vxlan_remote.xml | 1 +
setup.py | 2 +-
test_modules/Netperf.py | 66 ++++++++++++++++++----
48 files changed, 322 insertions(+), 111 deletions(-)
create mode 100644 lnst/Common/Version.py
--
2.9.0
7 years, 9 months
[PATCH v2 7/7] Config: redirect git stderr to /dev/null
by Ondrej Lichtner
From: Ondrej Lichtner <olichtne(a)redhat.com>
When trying to get the git revision fails it prints out a 'fatal: ...'
error message to stderr. Since we don't care about how the git command
fails we can redirect the error to /dev/null so that it's not mixed in
with normal lnst output.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Common/Config.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lnst/Common/Config.py b/lnst/Common/Config.py
index 0b8b03e..5362da1 100644
--- a/lnst/Common/Config.py
+++ b/lnst/Common/Config.py
@@ -39,7 +39,9 @@ class Config():
abspath = os.path.abspath(__file__)
dname = os.path.dirname(abspath)
os.chdir(dname)
- head = subprocess.check_output(['git', 'rev-parse', 'HEAD']).strip()
+ with open(os.devnull, 'w') as null:
+ head = subprocess.check_output(['git', 'rev-parse', 'HEAD'],
+ stderr=null).strip()
return head
except subprocess.CalledProcessError:
return LNSTMajorVersion
--
2.9.0
7 years, 9 months
[PATCH v2 2/7] regression_tests: phase3: fix hash related errors
by Ondrej Lichtner
From: Ondrej Lichtner <olichtne(a)redhat.com>
This commit adds regex patterns that should be ignored during hash
generation so that the hashes are stable between beaker runs. I also
changed the ids of interfaces connecting guests in the
2_virt_ovs_vxlan.xml recipe to be consistent with the other virt
recipes.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
.../regression_tests/phase3/2_virt_ovs_vxlan.py | 36 +++++++++++++++++-----
.../regression_tests/phase3/2_virt_ovs_vxlan.xml | 16 +++++-----
.../regression_tests/phase3/novirt_ovs_vxlan.py | 20 +++++++-----
recipes/regression_tests/phase3/vxlan_multicast.py | 34 ++++++++++++++------
.../regression_tests/phase3/vxlan_multicast.xml | 4 +--
recipes/regression_tests/phase3/vxlan_remote.py | 20 +++++++-----
6 files changed, 87 insertions(+), 43 deletions(-)
diff --git a/recipes/regression_tests/phase3/2_virt_ovs_vxlan.py b/recipes/regression_tests/phase3/2_virt_ovs_vxlan.py
index 45b5873..57f1373 100644
--- a/recipes/regression_tests/phase3/2_virt_ovs_vxlan.py
+++ b/recipes/regression_tests/phase3/2_virt_ovs_vxlan.py
@@ -129,8 +129,13 @@ if ipv in [ 'ipv4', 'both' ]:
result_tcp = perf_api.new_result("tcp_ipv4_id",
"tcp_ipv4_result",
hash_ignore=[
- 'kernel_release',
- 'redhat_release'])
+ r'kernel_release',
+ r'redhat_release',
+ r'test_host\d+\.hostname',
+ r'test_host\d+\..*hwaddr',
+ r'machine_h\d+\..*ovs\d*\.hwaddr',
+ r'machine_h\d+\..*tap\d*\.hwaddr',
+ r'machine_h\d+\..*tap\d*\.devname'])
result_tcp.add_tag(product_name)
if nperf_num_parallel > 1:
result_tcp.add_tag("multithreaded")
@@ -159,8 +164,13 @@ if ipv in [ 'ipv4', 'both' ]:
result_udp = perf_api.new_result("udp_ipv4_id",
"udp_ipv4_result",
hash_ignore=[
- 'kernel_release',
- 'redhat_release'])
+ r'kernel_release',
+ r'redhat_release',
+ r'test_host\d+\.hostname',
+ r'test_host\d+\..*hwaddr',
+ r'machine_h\d+\..*ovs\d*\.hwaddr',
+ r'machine_h\d+\..*tap\d*\.hwaddr',
+ r'machine_h\d+\..*tap\d*\.devname'])
result_udp.add_tag(product_name)
if nperf_num_parallel > 1:
result_udp.add_tag("multithreaded")
@@ -189,8 +199,13 @@ if ipv in [ 'ipv6', 'both' ]:
result_tcp = perf_api.new_result("tcp_ipv6_id",
"tcp_ipv6_result",
hash_ignore=[
- 'kernel_release',
- 'redhat_release'])
+ r'kernel_release',
+ r'redhat_release',
+ r'test_host\d+\.hostname',
+ r'test_host\d+\..*hwaddr',
+ r'machine_h\d+\..*ovs\d*\.hwaddr',
+ r'machine_h\d+\..*tap\d*\.hwaddr',
+ r'machine_h\d+\..*tap\d*\.devname'])
result_tcp.add_tag(product_name)
if nperf_num_parallel > 1:
result_tcp.add_tag("multithreaded")
@@ -219,8 +234,13 @@ if ipv in [ 'ipv6', 'both' ]:
result_udp = perf_api.new_result("udp_ipv6_id",
"udp_ipv6_result",
hash_ignore=[
- 'kernel_release',
- 'redhat_release'])
+ r'kernel_release',
+ r'redhat_release',
+ r'test_host\d+\.hostname',
+ r'test_host\d+\..*hwaddr',
+ r'machine_h\d+\..*ovs\d*\.hwaddr',
+ r'machine_h\d+\..*tap\d*\.hwaddr',
+ r'machine_h\d+\..*tap\d*\.devname'])
result_udp.add_tag(product_name)
if nperf_num_parallel > 1:
result_udp.add_tag("multithreaded")
diff --git a/recipes/regression_tests/phase3/2_virt_ovs_vxlan.xml b/recipes/regression_tests/phase3/2_virt_ovs_vxlan.xml
index f16f9bc..a9c97d1 100644
--- a/recipes/regression_tests/phase3/2_virt_ovs_vxlan.xml
+++ b/recipes/regression_tests/phase3/2_virt_ovs_vxlan.xml
@@ -21,16 +21,16 @@
<address value="{$net}.1/24"/>
</addresses>
</eth>
- <eth id="if2" label="to_guest1"/>
- <eth id="if3" label="to_guest2"/>
+ <eth id="tap1" label="to_guest1"/>
+ <eth id="tap2" label="to_guest2"/>
<ovs_bridge id="ovs1">
<slaves>
- <slave id="if2">
+ <slave id="tap1">
<options>
<option name="ofport_request" value="5"/>
</options>
</slave>
- <slave id="if3">
+ <slave id="tap2">
<options>
<option name="ofport_request" value="6"/>
</options>
@@ -80,16 +80,16 @@
<address value="{$net}.2/24"/>
</addresses>
</eth>
- <eth id="if2" label="to_guest3"/>
- <eth id="if3" label="to_guest4"/>
+ <eth id="tap1" label="to_guest3"/>
+ <eth id="tap2" label="to_guest4"/>
<ovs_bridge id="ovs2">
<slaves>
- <slave id="if2">
+ <slave id="tap1">
<options>
<option name="ofport_request" value="5"/>
</options>
</slave>
- <slave id="if3">
+ <slave id="tap2">
<options>
<option name="ofport_request" value="6"/>
</options>
diff --git a/recipes/regression_tests/phase3/novirt_ovs_vxlan.py b/recipes/regression_tests/phase3/novirt_ovs_vxlan.py
index f69e77f..d3b0ac9 100644
--- a/recipes/regression_tests/phase3/novirt_ovs_vxlan.py
+++ b/recipes/regression_tests/phase3/novirt_ovs_vxlan.py
@@ -80,8 +80,9 @@ if ipv in [ 'ipv4', 'both' ]:
result_tcp = perf_api.new_result("tcp_ipv4_id",
"tcp_ipv4_result",
hash_ignore=[
- 'kernel_release',
- 'redhat_release'])
+ r'kernel_release',
+ r'redhat_release',
+ r'interface_ovs\d+\.hwaddr'])
result_tcp.add_tag(product_name)
if nperf_num_parallel > 1:
result_tcp.add_tag("multithreaded")
@@ -111,8 +112,9 @@ if ipv in [ 'ipv4', 'both' ]:
result_udp = perf_api.new_result("udp_ipv4_id",
"udp_ipv4_result",
hash_ignore=[
- 'kernel_release',
- 'redhat_release'])
+ r'kernel_release',
+ r'redhat_release',
+ r'interface_ovs\d+\.hwaddr'])
result_udp.add_tag(product_name)
if nperf_num_parallel > 1:
result_udp.add_tag("multithreaded")
@@ -144,8 +146,9 @@ if ipv in [ 'ipv6', 'both' ]:
result_tcp = perf_api.new_result("tcp_ipv6_id",
"tcp_ipv6_result",
hash_ignore=[
- 'kernel_release',
- 'redhat_release'])
+ r'kernel_release',
+ r'redhat_release',
+ r'interface_ovs\d+\.hwaddr'])
result_tcp.add_tag(product_name)
if nperf_num_parallel > 1:
result_tcp.add_tag("multithreaded")
@@ -175,8 +178,9 @@ if ipv in [ 'ipv6', 'both' ]:
result_udp = perf_api.new_result("udp_ipv6_id",
"udp_ipv6_result",
hash_ignore=[
- 'kernel_release',
- 'redhat_release'])
+ r'kernel_release',
+ r'redhat_release',
+ r'interface_ovs\d+\.hwaddr'])
result_udp.add_tag(product_name)
if nperf_num_parallel > 1:
result_udp.add_tag("multithreaded")
diff --git a/recipes/regression_tests/phase3/vxlan_multicast.py b/recipes/regression_tests/phase3/vxlan_multicast.py
index 9cfa900..293e8ec 100644
--- a/recipes/regression_tests/phase3/vxlan_multicast.py
+++ b/recipes/regression_tests/phase3/vxlan_multicast.py
@@ -54,7 +54,7 @@ if nperf_cpupin:
g1.run("service irqbalance stop")
m1_phy1 = m1.get_interface("eth1")
- m1_phy2 = m1.get_interface("eth2")
+ m1_phy2 = m1.get_interface("tap1")
m2_phy1 = m2.get_interface("eth1")
g1_phy1 = g1.get_interface("eth1")
dev_list = [(m1, m1_phy1), (m1, m1_phy2), (m2, m2_phy1), (g1, g1_phy1)]
@@ -102,8 +102,12 @@ if ipv in [ 'ipv4', 'both' ]:
result_tcp = perf_api.new_result("tcp_ipv4_id",
"tcp_ipv4_result",
hash_ignore=[
- 'kernel_release',
- 'redhat_release'])
+ r'kernel_release',
+ r'redhat_release',
+ r'testmachine\d+\.interface_tap\d+.hwaddr',
+ r'guest\d+\.hostname',
+ r'guest\d+\.interface_eth\d+\.hwaddr',
+ r'test_if\.hwaddr'])
result_tcp.add_tag(product_name)
if nperf_num_parallel > 1:
result_tcp.add_tag("multithreaded")
@@ -133,8 +137,12 @@ if ipv in [ 'ipv4', 'both' ]:
result_udp = perf_api.new_result("udp_ipv4_id",
"udp_ipv4_result",
hash_ignore=[
- 'kernel_release',
- 'redhat_release'])
+ r'kernel_release',
+ r'redhat_release',
+ r'testmachine\d+\.interface_tap\d+.hwaddr',
+ r'guest\d+\.hostname',
+ r'guest\d+\.interface_eth\d+\.hwaddr',
+ r'test_if\.hwaddr'])
result_udp.add_tag(product_name)
if nperf_num_parallel > 1:
result_udp.add_tag("multithreaded")
@@ -165,8 +173,12 @@ if ipv in [ 'ipv6', 'both' ]:
result_tcp = perf_api.new_result("tcp_ipv6_id",
"tcp_ipv6_result",
hash_ignore=[
- 'kernel_release',
- 'redhat_release'])
+ r'kernel_release',
+ r'redhat_release',
+ r'testmachine\d+\.interface_tap\d+.hwaddr',
+ r'guest\d+\.hostname',
+ r'guest\d+\.interface_eth\d+\.hwaddr',
+ r'test_if\.hwaddr'])
result_tcp.add_tag(product_name)
if nperf_num_parallel > 1:
result_tcp.add_tag("multithreaded")
@@ -196,8 +208,12 @@ if ipv in [ 'ipv6', 'both' ]:
result_udp = perf_api.new_result("udp_ipv6_id",
"udp_ipv6_result",
hash_ignore=[
- 'kernel_release',
- 'redhat_release'])
+ r'kernel_release',
+ r'redhat_release',
+ r'testmachine\d+\.interface_tap\d+.hwaddr',
+ r'guest\d+\.hostname',
+ r'guest\d+\.interface_eth\d+\.hwaddr',
+ r'test_if\.hwaddr'])
result_udp.add_tag(product_name)
if nperf_num_parallel > 1:
result_udp.add_tag("multithreaded")
diff --git a/recipes/regression_tests/phase3/vxlan_multicast.xml b/recipes/regression_tests/phase3/vxlan_multicast.xml
index cfdb4ac..87b2cb3 100644
--- a/recipes/regression_tests/phase3/vxlan_multicast.xml
+++ b/recipes/regression_tests/phase3/vxlan_multicast.xml
@@ -17,11 +17,11 @@
<host id="testmachine1">
<interfaces>
<eth id="eth1" label="tnet"/>
- <eth id="eth2" label="to_guest1"/>
+ <eth id="tap1" label="to_guest1"/>
<bridge id="br0">
<slaves>
<slave id="eth1"/>
- <slave id="eth2"/>
+ <slave id="tap1"/>
</slaves>
<addresses>
<address value="{$net}.1/24" />
diff --git a/recipes/regression_tests/phase3/vxlan_remote.py b/recipes/regression_tests/phase3/vxlan_remote.py
index 9086a1e..712c34b 100644
--- a/recipes/regression_tests/phase3/vxlan_remote.py
+++ b/recipes/regression_tests/phase3/vxlan_remote.py
@@ -76,8 +76,9 @@ if ipv in [ 'ipv4', 'both' ]:
result_tcp = perf_api.new_result("tcp_ipv4_id",
"tcp_ipv4_result",
hash_ignore=[
- 'kernel_release',
- 'redhat_release'])
+ r'kernel_release',
+ r'redhat_release',
+ r'test_if\.hwaddr'])
result_tcp.add_tag(product_name)
if nperf_num_parallel > 1:
result_tcp.add_tag("multithreaded")
@@ -107,8 +108,9 @@ if ipv in [ 'ipv4', 'both' ]:
result_udp = perf_api.new_result("udp_ipv4_id",
"udp_ipv4_result",
hash_ignore=[
- 'kernel_release',
- 'redhat_release'])
+ r'kernel_release',
+ r'redhat_release',
+ r'test_if\.hwaddr'])
result_udp.add_tag(product_name)
if nperf_num_parallel > 1:
result_udp.add_tag("multithreaded")
@@ -143,8 +145,9 @@ if ipv in [ 'ipv6', 'both' ]:
result_tcp = perf_api.new_result("tcp_ipv6_id",
"tcp_ipv6_result",
hash_ignore=[
- 'kernel_release',
- 'redhat_release'])
+ r'kernel_release',
+ r'redhat_release',
+ r'test_if\.hwaddr'])
result_tcp.add_tag(product_name)
if nperf_num_parallel > 1:
result_tcp.add_tag("multithreaded")
@@ -174,8 +177,9 @@ if ipv in [ 'ipv6', 'both' ]:
result_udp = perf_api.new_result("udp_ipv6_id",
"udp_ipv6_result",
hash_ignore=[
- 'kernel_release',
- 'redhat_release'])
+ r'kernel_release',
+ r'redhat_release',
+ r'test_if\.hwaddr'])
result_udp.add_tag(product_name)
if nperf_num_parallel > 1:
result_udp.add_tag("multithreaded")
--
2.9.0
7 years, 9 months