aboutsummaryrefslogtreecommitdiffstats
path: root/conf/integration/01b_dpdk_regression_tests.conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf/integration/01b_dpdk_regression_tests.conf')
-rw-r--r--conf/integration/01b_dpdk_regression_tests.conf115
1 files changed, 91 insertions, 24 deletions
diff --git a/conf/integration/01b_dpdk_regression_tests.conf b/conf/integration/01b_dpdk_regression_tests.conf
index 2e63d677..abc56c28 100644
--- a/conf/integration/01b_dpdk_regression_tests.conf
+++ b/conf/integration/01b_dpdk_regression_tests.conf
@@ -1,4 +1,4 @@
-# Copyright 2017 Intel Corporation.
+# Copyright 2017-2018 Intel Corporation., Tieto
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -170,9 +170,6 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [
['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show',
'|Error attaching device.*$NICS[0]["pci"]'],
['tools', 'assert', 'not len(#STEP[-1])'],
- # clean up
- ['vswitch', 'del_port', 'int_br0', '#STEP[port2][0]'],
- ['vswitch', 'del_switch', 'int_br0'],
]
},
{
@@ -344,14 +341,14 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [
# frame loss with small packets should be detected
['tools', 'assert', '#STEP[-1][0]["frame_loss_percent"] > 10'],
# delete phy ports so they can be created with flow control
- ['vswitch', 'del_flow', 'br0', {}],
- ['vswitch', 'del_port', 'br0', 'dpdk0'],
- ['vswitch', 'del_port', 'br0', 'dpdk1'],
+ ['vswitch', 'del_flow', '$VSWITCH_BRIDGE_NAME', {}],
+ ['vswitch', 'del_port', '$VSWITCH_BRIDGE_NAME', 'dpdk0'],
+ ['vswitch', 'del_port', '$VSWITCH_BRIDGE_NAME', 'dpdk1'],
# turn on flow control
- ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] add-port br0 dpdk0 -- set Interface dpdk0 type=dpdk options:dpdk-devargs=$NICS[0]["pci"] options:rx-flow-ctrl=true'],
- ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] add-port br0 dpdk1 -- set Interface dpdk1 type=dpdk options:dpdk-devargs=$NICS[1]["pci"] options:rx-flow-ctrl=true'],
- ['vswitch', 'add_flow', 'br0', {'in_port': '3', 'actions': ['output:4'], 'idle_timeout': '0'}],
- ['vswitch', 'add_flow', 'br0', {'in_port': '4', 'actions': ['output:3'], 'idle_timeout': '0'}],
+ ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] add-port $VSWITCH_BRIDGE_NAME dpdk0 -- set Interface dpdk0 type=dpdk options:dpdk-devargs=$NICS[0]["pci"] options:rx-flow-ctrl=true'],
+ ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] add-port $VSWITCH_BRIDGE_NAME dpdk1 -- set Interface dpdk1 type=dpdk options:dpdk-devargs=$NICS[1]["pci"] options:rx-flow-ctrl=true'],
+ ['vswitch', 'add_flow', '$VSWITCH_BRIDGE_NAME', {'in_port': '3', 'actions': ['output:4'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', '$VSWITCH_BRIDGE_NAME', {'in_port': '4', 'actions': ['output:3'], 'idle_timeout': '0'}],
['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show'],
['trafficgen', 'send_traffic', {}],
['trafficgen', 'get_results'],
@@ -671,15 +668,17 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [
"TestSteps": [
# send traffic to verify correct PVP configuration
['trafficgen', 'send_traffic', {}],
- ['vswitch', 'dump_flows', 'br0'],
+ ['vswitch', 'dump_flows', '$VSWITCH_BRIDGE_NAME'],
# restart vswitchd, ovsdb is kept untouched, so ovs configuration
# (except flows) will be restored
['vswitch', 'restart'],
- ['vswitch', 'del_flow', 'br0'],
- ['vswitch', 'add_flow', 'br0', {'in_port': '1', 'actions': ['output:3'], 'idle_timeout': '0'}],
- ['vswitch', 'add_flow', 'br0', {'in_port': '3', 'actions': ['output:1'], 'idle_timeout': '0'}],
- ['vswitch', 'add_flow', 'br0', {'in_port': '2', 'actions': ['output:4'], 'idle_timeout': '0'}],
- ['vswitch', 'add_flow', 'br0', {'in_port': '4', 'actions': ['output:2'], 'idle_timeout': '0'}],
+ ['vswitch', 'del_flow', '$VSWITCH_BRIDGE_NAME', {}],
+ ['vswitch', 'dump_flows', '$VSWITCH_BRIDGE_NAME'],
+ ['vswitch', 'add_flow', '$VSWITCH_BRIDGE_NAME', {'in_port': '1', 'actions': ['output:3'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', '$VSWITCH_BRIDGE_NAME', {'in_port': '3', 'actions': ['output:1'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', '$VSWITCH_BRIDGE_NAME', {'in_port': '2', 'actions': ['output:4'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', '$VSWITCH_BRIDGE_NAME', {'in_port': '4', 'actions': ['output:2'], 'idle_timeout': '0'}],
+ ['vswitch', 'dump_flows', '$VSWITCH_BRIDGE_NAME'],
# send traffic to verify that OVS works correctly after restart
['trafficgen', 'send_traffic', {}],
],
@@ -718,13 +717,13 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [
"VSWITCH_VHOSTUSER_SERVER_MODE" : True,
},
"TestSteps": [
- ['vswitch', 'add_switch', 'br0'],
+ ['vswitch', 'add_switch', '$VSWITCH_BRIDGE_NAME'],
['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Open_vSwitch . '
'other_config:vhost-sock-dir=test_dir'],
# enforce vswitchd to read new configuration
['vswitch', 'restart'],
['tools', 'exec_shell', 'sudo mkdir $TOOLS["ovs_var_tmp"]/test_dir'],
- ['vswitch', 'add_vport', 'br0'],
+ ['vswitch', 'add_vport', '$VSWITCH_BRIDGE_NAME'],
['tools', 'exec_shell', 'ls -1 $TOOLS["ovs_var_tmp"]/test_dir',
'|dpdkvhostuser0'],
['tools', 'assert', 'len(#STEP[-1])'],
@@ -1297,7 +1296,7 @@ _OVSDPDK_RATE_confirm_multiple_rate_limit_setup = \
# check that traffic rate is no longer limited
['trafficgen', 'get_results'],
['tools', 'assert', 'int(#STEP[-1][0]["throughput_rx_mbps"])>500'],
- ['vswitch', 'dump_flows', 'br0'],
+ ['vswitch', 'dump_flows', '$VSWITCH_BRIDGE_NAME'],
]
INTEGRATION_TESTS = INTEGRATION_TESTS + [
@@ -1603,8 +1602,8 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [
"Parameters" : {},
"TestSteps": [
# Setup switch,port and logs
- ['vswitch', 'add_switch', 'br0'],
- ['vswitch', 'add_vport', 'br0'],
+ ['vswitch', 'add_switch', '$VSWITCH_BRIDGE_NAME'],
+ ['vswitch', 'add_vport', '$VSWITCH_BRIDGE_NAME'],
['#LOG_MARK', 'tools', 'exec_shell',
'echo $((1+`wc -l $_OVSDPDK_VSWITCH_LOG | cut -d" " -f1`))', '(\d+)'],
@@ -1633,8 +1632,8 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [
"Parameters" : {},
"TestSteps": [
# Setup switch,port and logs
- ['vswitch', 'add_switch', 'br0'],
- ['vswitch', 'add_vport', 'br0'],
+ ['vswitch', 'add_switch', '$VSWITCH_BRIDGE_NAME'],
+ ['vswitch', 'add_vport', '$VSWITCH_BRIDGE_NAME'],
['#LOG_MARK', 'tools', 'exec_shell',
'echo $((1+`wc -l $_OVSDPDK_VSWITCH_LOG | cut -d" " -f1`))', '(\d+)'],
@@ -1686,4 +1685,72 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [
},
"TestSteps": _OVSDPDK_QOS_confirm_multiple_qos_setup
},
+ ############################################################
+ #
+ # Custom statistics
+ #
+ ############################################################
+ {
+ "Name": "ovsdpdk_custstat_check",
+ "Deployment": "clean",
+ "Description": "Test if custom statistics are supported.",
+ "vSwitch" : "OvsDpdkVhost",
+ "TestSteps": [
+ # enable custom statistics
+ ['vswitch', 'add_switch', 'int_br0', [
+ 'protocols=OpenFlow10,OpenFlow11,OpenFlow12,'
+ 'OpenFlow13,OpenFlow14,OpenFlow15']],
+ ['#port', 'vswitch', 'add_phy_port', 'int_br0'],
+ # check that custom statistics are available for given interface
+ ['tools', 'exec_shell', 'sudo $TOOLS["ovs-ofctl"] -O OpenFlow14 '
+ 'dump-ports int_br0 #STEP[port][1]',
+ '|CUSTOM Statistics'],
+ ['tools', 'assert', 'len(#STEP[-1])'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[port][0]'],
+ ['vswitch', 'del_switch', 'int_br0'],
+ ]
+ },
+ {
+ "Name": "ovsdpdk_custstat_rx_error",
+ "Deployment": "clean",
+ "Description": "Test bad ethernet CRC counter 'rx_crc_errors' exposed by custom statistics.",
+ "vSwitch" : "OvsDpdkVhost",
+ "Parameters" : {
+ "OVS_OFCTL_ARGS" : [],
+ "TRAFFICGEN" : "IxNet",
+ "TRAFFIC" : {
+ "traffic_type" : "rfc2544_continuous",
+ "frame_rate" : 10,
+ },
+ "TRAFFICGEN_DURATION" : 10,
+ "TRAFFICGEN_IXNET_TCL_SCRIPT" : "ixnetrfc2544_bad_l2_crc.tcl",
+ },
+ "TestSteps": [
+ # enable custom statistics
+ ['vswitch', 'add_switch', 'int_br0', [
+ 'protocols=OpenFlow10,OpenFlow11,OpenFlow12,'
+ 'OpenFlow13,OpenFlow14,OpenFlow15']],
+ ['#port1', 'vswitch', 'add_phy_port', 'int_br0'],
+ ['#port2', 'vswitch', 'add_phy_port', 'int_br0'],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '1', 'actions': ['output:2']}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '2', 'actions': ['output:1']}],
+ ['#crc_old', 'tools', 'exec_shell', 'sudo $TOOLS["ovs-ofctl"] -O OpenFlow14 '
+ 'dump-ports int_br0 #STEP[port1][1]',
+ '|rx_crc_errors=(\d+)'],
+ # frames will be dropped by NIC, so we have to suppress send_traffic validation
+ # to avoid test failure
+ ['!trafficgen', 'send_traffic', {}],
+ # check that custom statistics are available for given interface
+ ['#crc_new', 'tools', 'exec_shell', 'sudo $TOOLS["ovs-ofctl"] -O OpenFlow14 '
+ 'dump-ports int_br0 #STEP[port1][1]',
+ '|rx_crc_errors=(\d+)'],
+ ['tools', 'assert', '#STEP[crc_new] > #STEP[crc_old]'],
+ # tear down the environment
+ ['vswitch', 'dump_flows', 'int_br0'],
+ ['vswitch', 'del_flow', 'int_br0', {}],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[port1][0]'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[port2][0]'],
+ ['vswitch', 'del_switch', 'int_br0'],
+ ]
+ },
]